/* Navigation Icon Links */
.nav-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.nav-icon-link:hover {
    color: var(--text-color);
    transform: scale(1.05);
}

.nav-icon-link i {
    font-size: 18px;
}

.nav-icon-link .unread-indicator,
.nav-icon-link .notification-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: #dc3545;
    border-radius: 8px;
    border: 2px solid var(--card-background);
    font-size: 10px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}

.nav-icon-link .notification-indicator {
    background: #ffc107;
    color: #333;
}

/* Pulse animation for indicators */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Button Icon Links (for notification button) */
.btn-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
}

.btn-icon:hover {
    color: var(--text-color);
    transform: scale(1.05);
}

.btn-icon i {
    font-size: 18px;
}

.btn-icon .notification-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: #ffc107;
    border-radius: 8px;
    border: 2px solid var(--card-background);
    font-size: 10px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}

/* Mobile navigation adjustments */
@media (max-width: 768px) {
    .nav-icon-link {
        width: 44px;
        height: 44px;
    }

    .nav-icon-link i {
        font-size: 20px;
    }

    .nav-icon-link .unread-indicator,
    .nav-icon-link .notification-indicator {
        min-width: 18px;
        height: 18px;
        font-size: 11px;
        top: 2px;
        right: 2px;
    }

    .btn-icon {
        width: 44px;
        height: 44px;
    }

    .btn-icon i {
        font-size: 20px;
    }

    .btn-icon .notification-indicator {
        min-width: 18px;
        height: 18px;
        font-size: 11px;
        top: 2px;
        right: 2px;
    }
}

.chat-sidebar {
    width: 350px;
    border-right: 1px solid var(--border-color);
    background: var(--card-background);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card-background);
}

/* Icon styles for messages */
.placeholder-icon,
.no-messages-icon,
.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
    display: block;
}

.chat-placeholder,
.no-messages,
.error-message {
    text-align: center;
    padding: 2rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content,
.no-messages-content {
    max-width: 300px;
}

.chat-placeholder h3,
.no-messages h4,
.error-message h4 {
    margin: 1rem 0 0.5rem 0;
    color: var(--text-color);
}

.chat-placeholder p,
.no-messages p {
    color: #666;
    margin: 0.5rem 0 0 0;
}

.error-message p {
    color: var(--error-color);
    margin: 0.5rem 0 1rem 0;
}

:root {
    --background-color: #f9f9f9;
    --text-color: #333;
    --card-background: #fff;
    --header-background: var(--primary-gradient);
    --border-color: rgba(0, 0, 0, 0.05);
    --form-control-background: #f9f9f9;
    --form-control-border: #e0e0e0;
    --secondary-btn-background: #eef0f2;
    --secondary-btn-color: #333;
    --primary-gradient: linear-gradient(45deg, #ff4bda, #ff9a4b);
    --primary-color: #ff4bda;
    --primary-color-hover: #ff9a4b;
    --shadow-color: rgba(255, 75, 218, 0.3);
    --shadow-color-hover: rgba(255, 75, 218, 0.4);
    --focus-shadow-color: rgba(255, 75, 218, 0.2);
    --success-color: #28a745;
    --error-color: #dc3545;
    --hover-background: rgba(194, 3, 156, 0.3);
}

.dark-theme {
    --background-color: #121212;
    --text-color: #e0e0e0;
    --card-background: #1e1e1e;
    --header-background: var(--primary-gradient);
    --border-color: rgba(255, 255, 255, 0.1);
    --form-control-background: #2a2a2a;
    --form-control-border: #444;
    --secondary-btn-background: #333;
    --secondary-btn-color: #e0e0e0;
}

/* General Body Styles */
html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    direction: ltr;
    /* Default direction */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s, color 0.3s;
}

body.rtl {
    direction: rtl;
    font-family: 'Tajawal Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header and Navigation */
header {
    background-color: var(--header-background);
    backdrop-filter: saturate(180%) blur(25px);
    -webkit-backdrop-filter: saturate(180%) blur(25px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: -1px;
}

header nav {
    display: flex;
}

header nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

header nav ul li {
    margin: 0 5px;
}

header nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    padding: 25px 15px;
    display: block;
    position: relative;
    transition: color 0.3s;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-image: var(--primary-gradient);
    transition: width 0.3s;
}

header nav ul li a:hover {
    color: var(--primary-color);
}

header nav ul li a:hover::after {
    width: 50%;
}

.header-right {
    display: flex;
    align-items: center;
}

.auth-buttons a {
    text-decoration: none;
    color: #fff;
    background-image: var(--primary-gradient);
    padding: 10px 20px;
    border-radius: 20px;
    margin-left: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.auth-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-color-hover);
}

.mobile-nav-item {
    display: none;
}

#theme-switcher,
#mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    /* margin-left: 20px; */
}

.lang-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    margin-left: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.lang-btn:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

#mobile-menu-btn {
    display: none;
}

/* Main Content */
main {
    flex: 1;
    padding: 0px 30px;
    margin: 25px 0;
}

.container {
    /* max-width: 1200px; */
    margin: 0 auto;
}

/* Cards */
.card {
    background-color: var(--card-background);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    margin-bottom: 35px;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: 1px solid var(--border-color);
    padding: 20px;
}

.guidenospace {
    padding: 0 !important;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.card p {
    color: var(--text-color);
    line-height: 1.6;
    opacity: 0.8;
}

/* Buttons */
.btn {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    background-image: var(--primary-gradient);
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-color);
    position: relative;
    z-index: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-color-hover);
}

/* Image choice toggle buttons */
.btn-toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.btn-toggle input[type="radio"] {
    /* keep radios out of layout but accessible for form and JS */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.btn-toggle-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn-toggle-item:hover {
    background: rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
}

/* checked state: adjacent sibling label after checked radio */
.btn-toggle input[type="radio"]:checked+.btn-toggle-item {
    background-image: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.btn-toggle-item:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-shadow-color);
}

/* Content block specific adjustments */
.content-image-choice .btn-toggle-item {
    padding: 6px 10px;
    font-size: 0.9rem;
    border-radius: 6px;
}

.content-block .content-image-fields {
    margin-top: 8px;
}

.content-block .content-image-url-container input,
.content-block .content-image-upload-container input {
    padding: 10px;
}

.btn-secondary {
    background: var(--secondary-btn-background);
    color: var(--secondary-btn-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: var(--secondary-btn-background);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--form-control-border);
    background-color: var(--form-control-background);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-shadow-color);
    transform: scale(1.02);
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-invalid {
    border-color: var(--error-color);
}

/* Disabled Button Styles */
.btn:disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.btn:disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
    box-shadow: none !important;
}

.form-group .icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.5;
}

.form-group .form-control-icon {
    padding-left: 45px;
}

/* Error Message Styles */
.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 5px;
    font-weight: 500;
}

.error-message a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

.error-message a:hover {
    color: var(--primary-color-hover);
    border-bottom-color: var(--primary-color-hover);
}

.error-message .error-link {
    background-image: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--primary-color);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.error-message .error-link:hover {
    text-decoration-color: var(--primary-color-hover);
    transform: translateY(-1px);
}

.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Auth Card Styles */
.auth-card {
    max-width: 400px;
    margin: 50px auto;
    padding: 40px;
}

/* Toolbar and Filters */
.toolbar {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    /* Center items horizontally */
    margin-bottom: 35px;
    gap: 20px;
    /* Space between search bar and tags */
}

#tags-container .tag {
    background-color: var(--secondary-btn-background);
    color: var(--secondary-btn-color);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    flex-shrink: 0;
    white-space: nowrap;
}

#tags-container .tag:hover {
    background-image: var(--primary-gradient);
    color: #fff;
}

#tags-container .tag.active {
    background-image: var(--primary-gradient);
    color: #fff;
    font-weight: 600;
}

/* Mobile styles for tags container */
@media (max-width: 768px) {
    .tags-container-wrapper {
        justify-content: flex-start !important;
        /* Align to start on mobile for better scrolling */
        padding: 0 15px;
        /* Add some padding for better touch interaction */
        position: relative;
        scroll-behavior: auto;
        /* Disable smooth scroll on mobile for better performance */
    }

    #tags-container {
        gap: 6px;
        padding: 8px 0;
        justify-content: flex-start;
        /* Ensure tags start from the left */
        align-items: center;
    }

    #tags-container .tag:first-child {
        margin-left: 0;
        /* Ensure first tag is at the very left */
        position: relative;
        z-index: 2;
        /* Ensure it's above any gradients */
    }

    #tags-container .tag {
        padding: 6px 12px;
        font-size: 0.9rem;
        min-width: auto;
        flex-shrink: 0;
    }
}

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .tags-container-wrapper {
        justify-content: flex-start !important;
        max-width: 100%;
    }

    #tags-container {
        gap: 6px;
    }
}

/* Footer */
footer {
    /* background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
    padding: 30px; */
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    transition: background-color 0.3s, color 0.3s;
}

.language-switcher a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
    transition: color 0.3s;
}

.language-switcher a:hover {
    color: var(--primary-color-hover);
}

/* Guides Page */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Slightly smaller min-width */
    gap: 30px;
    /* Slightly reduced gap */
}

.guide-card {
    background-color: var(--card-background);
    border-radius: 15px;
    /* Slightly less rounded */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    /* Enhanced shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Smooth transition */
    position: relative;
    /* For absolute positioning of share button */
}

.guide-card:hover {
    transform: translateY(-5px);
    /* Lift effect on hover */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    /* Deeper shadow on hover */
}

.guide-card .guide-image {
    width: 100%;
    height: 180px;
    /* Slightly reduced height */
    object-fit: cover;
    border-top-left-radius: 15px;
    /* Match card border-radius */
    border-top-right-radius: 15px;
    /* Match card border-radius */
    transition: opacity 0.3s ease-in-out;
}

.guide-card .guide-image.lazy {
    opacity: 0.7;
}

.guide-card .guide-image.lazy.loaded {
    opacity: 1;
}

/* Placeholder overlay styles */
.guide-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    overflow: hidden;
}

.guide-image-container.placeholder-overlay {
    background: linear-gradient(45deg, #ff4bda, #ff9a4b);
}

.guide-image-container .placeholder-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    padding: 20px;
    z-index: 2;
}

.guide-image-container .placeholder-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    max-height: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
}

.guide-card .card-content {
    padding: 20px;
    /* Reduced padding */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.guide-card .guide-tags {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    /* Use flex for tags */
    flex-wrap: wrap;
    /* Allow tags to wrap */
    gap: 8px;
    /* Gap between tags */
}

.guide-card .guide-tags .tag {
    background-color: var(--secondary-btn-background);
    color: var(--secondary-btn-color);
    padding: 6px 12px;
    /* Slightly more padding */
    border-radius: 20px;
    /* More rounded */
    font-size: 0.75rem;
    /* Slightly smaller font */
    font-weight: 500;
    transition: background-color 0.3s;
}

.guide-card .guide-tags .tag:hover {
    background-color: var(--primary-color);
    /* Highlight on hover */
    color: #fff;
}

/* Progress bar in guide cards */
.guide-card .guide-progress {
    margin: 15px 0;
    padding: 0;
}

.guide-card .guide-progress .progress-bar {
    height: 6px;
    margin-bottom: 8px;
}

.guide-card .guide-progress .progress-text {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-color);
}

.guide-card .guide-progress .progress-text i {
    margin-right: 5px;
    color: var(--success-color);
}

/* Guide View Page */

.guide-progress {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-btn-background);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background-image: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 75, 218, 0.3);
    min-width: 5px;
}

.progress-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.8;
}

.progress-text span {
    color: var(--primary-color);
}

/* Dashboards */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 35px;
}

.dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav ul li a {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: background-image 0.3s, color 0.3s;
}

.dashboard-nav ul li a.active,
.dashboard-nav ul li a:hover {
    background-image: var(--primary-gradient);
    color: #fff;
}

/* RTL Specific Styles */
body.rtl header nav ul li {
    margin: 0 5px;
}

body.rtl .auth-buttons a {
    margin-left: 0;
    margin-right: 15px;
}

/* Animations */
.card,
.btn,
header {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-background);
        backdrop-filter: saturate(180%) blur(25px);
        -webkit-backdrop-filter: saturate(180%) blur(25px);
        border-bottom: 1px solid var(--border-color);
    }

    @supports (backdrop-filter: blur(1px)) {
        header nav {
            background: transparent;
            background-image: var(--primary-gradient);
            backdrop-filter: saturate(180%) blur(25px);
            -webkit-backdrop-filter: saturate(180%) blur(25px);
        }
    }

    header nav.active {
        display: block;
    }

    header nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    header nav ul li a {
        padding: 15px 30px;
    }

    .mobile-nav-item {
        display: list-item;
    }

    #mobile-menu-btn {
        display: block !important;
    }

    .lang-btn {
        margin-left: 10px;
        font-size: 1rem;
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .tags-filter {
        margin-top: 20px;
    }

    .card {
        padding: 25px;
        /* Reduced padding for general cards */
    }

    .guide-card .card-content {
        padding: 15px;
        /* Reduced padding for guide card content */
    }

    .guide-card .guide-image {
        height: 150px;
        /* Slightly smaller image height */
    }

    .stacked-guide-steps .step-card {
        width: 90%;
        /* Wider for better readability on small screens */
        max-width: none;
        /* Remove max-width constraint */
    }

    .step-card .step-content {
        max-height: calc(100vh - 200px);
        /* Adjust max-height for mobile */
    }


    .rating-card h3 {
        font-size: 1.6rem;
    }

    .stars {
        font-size: 2rem;
        gap: 5px;
    }

    .guides-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive Table Styles */
    .guides-grid {
        grid-template-columns: 1fr;
    }

    /* Responsive Table Styles */
    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }

    .responsive-table-cell {
        border-bottom: none;
        padding: 10px 15px;
        position: relative;
        text-align: left;
        padding-top: 30px;
        /* Space for the label */
    }

    body.rtl .responsive-table-cell {
        text-align: right;
        margin-top: 20px;
    }

    .responsive-table-cell::before {
        content: attr(data-label);
        position: absolute;
        top: 10px;
        left: 15px;
        width: auto;
        font-weight: 600;
        color: var(--text-color);
        text-transform: uppercase;
        font-size: 0.8rem;
        opacity: 0.7;
    }

    body.rtl .responsive-table-cell::before {
        left: auto;
        right: 15px;
        margin: -20px;
    }

    .responsive-table-cell:last-child {
        border-bottom: 0;
    }

    .step-card {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 20px;
    }

    body.rtl .step-number {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    header {
        padding: 0 20px;
    }

    main {
        padding: 0px 20px;
        margin-top: 0px;
    }

    .guide-description {
        display: none;
    }

    .auth-buttons a {
        display: none;
    }
}

/* Code Blocks */
pre {
    background-color: #2d2d2d;
    /* Dark background for code */
    color: #f8f8f2;
    /* Light text color */
    padding: 15px;
    /* Reduced padding */
    border-radius: 8px;
    /* Smaller border-radius */
    overflow-x: auto;
    /* Enable horizontal scrolling for long lines */
    max-height: 250px;
    /* Reduced max height */
    overflow-y: auto;
    /* Enable vertical scrolling */
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.85rem;
    /* Slightly smaller font size */
    line-height: 1.4;
    /* Adjusted line height */
    margin-bottom: 20px;
    /* Reduced margin */
    position: relative;
    /* For positioning the copy button */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    /* Lighter shadow */
}

.dark-theme pre {
    background-color: #1a1a1a;
}

pre code.code-block {
    display: block;
    /* Ensure code takes full width */
    white-space: pre-wrap;
    /* Preserve whitespace and wrap long lines */
}

/* Code Header and Copy Button */
.copy-btn {
    position: absolute;
    /* Position it within the pre */
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.15);
    /* Subtle background */
    color: #f8f8f2;
    /* Light text color */
    border: none;
    padding: 8px;
    /* Equal padding for a square/circle */
    border-radius: 50%;
    /* Circular button */
    cursor: pointer;
    font-size: 0.9rem;
    /* Icon size */
    display: flex;
    /* For centering icon */
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s;
    width: 32px;
    /* Fixed width for circular button */
    height: 32px;
    /* Fixed height for circular button */
}

.copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    /* Darker on hover */
    transform: scale(1.1);
    /* Slightly enlarge on hover */
}

.copy-btn i {
    margin-right: 0;
    /* No margin, as it's just an icon */
}

/* Stacked Guide Steps */
.guide-carousel {
    position: relative;
    height: 65vh;
    /* Adjust as needed to fit viewport */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Hide overflow for smooth transitions */
}

.stacked-guide-steps {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    /* For 3D transformations */
}

.stacked-guide-steps .step-card {
    position: absolute;
    width: 65%;
    /* Smaller width for non-active cards */
    max-width: 800px;
    opacity: 0;
    /* default: hidden */
    transform: translateY(0) scale(0.8);
    /* Smaller and slightly offset */
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Smooth transitions */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    pointer-events: none;
    /* Disable clicks on non-active cards */
    z-index: 1;
}

.stacked-guide-steps .step-card.active {
    opacity: 1;
    /* fully visible */
    width: 100%;
    /* Smaller width for non-active cards */
    transform: translateY(0) scale(1);
    /* Full size for active card */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    /* Enable clicks on active card */
    z-index: 20;
    /* bring to top */
}

.stacked-guide-steps .step-card.previous {
    opacity: 0.25;
    /* dim previous card */
    transform: translateY(-100px) scale(0.7);
    /* Move up and make smaller */
    z-index: 10;
    border: 1px solid rgba(40, 167, 69, 0.18);
    /* subtle green border */
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.08), 0 0 24px rgba(40, 167, 69, 0.12);
    /* green glow */
}

.stacked-guide-steps .step-card.next {
    opacity: 0.25;
    /* dim next card */
    transform: translateY(100px) scale(0.7);
    /* Move down and make smaller */
    z-index: 10;
}

/* Ensure cards beyond previous/next stay fully hidden and non-interactive */
.stacked-guide-steps .step-card:not(.active):not(.previous):not(.next) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(0) scale(0.8);
}

/* Ensure content within cards is scrollable if needed */
.step-card .step-content {
    max-height: calc(80vh - 150px);
    /* Adjust based on card padding and header */
    overflow-y: auto;
    padding-right: 15px;
    /* For scrollbar */
}

/* Limited Guide Steps - Show only current, previous, and next */
.limited-guide-steps {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.limited-guide-steps .step-card {
    position: absolute;
    width: 100%;
    max-width: 800px;
    opacity: 0;
    /* default: hidden */
    transform: translateY(0) scale(0.9);
    transition: all 0.5s ease;
    pointer-events: none;
    /* Disable clicks on hidden cards */
    z-index: 1;
    display: none;
    /* Hide all cards by default */
}

.limited-guide-steps .step-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    z-index: 20;
    display: block;
    /* Show active card */
    height: auto;
    /* Allow full height for active step */
    overflow: visible;
    /* Show all content for active step */
}

.limited-guide-steps .step-card.previous {
    opacity: 0.7;
    transform: translateY(-50px) scale(0.85);
    pointer-events: auto;
    z-index: 10;
    display: block;
    /* Show previous card */
    height: 300px;
    /* Fixed height for previous step */
    overflow: hidden;
    /* Hide overflow content */
}

.limited-guide-steps .step-card.next {
    opacity: 0.7;
    transform: translateY(50px) scale(0.85);
    pointer-events: auto;
    z-index: 10;
    display: block;
    /* Show next card */
    height: 300px;
    /* Fixed height for next step */
    overflow: hidden;
    /* Hide overflow content */
}

/* All other steps are hidden by the base rule with display: none */

/* Step header inside carousel cards */
.step-card .step-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.step-card .step-number {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-image: var(--primary-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.step-card .step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* Content block styles inside step cards */
.content-block {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.content-block .content-text p {
    margin: 0;
    line-height: 1.7;
}

.content-block .content-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.content-block .content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.content-block .content-code pre {
    margin: 0;
    background: #111315;
    color: #e6eef3;
    padding: 12px;
    border-radius: 8px;
    overflow: auto;
}

.content-block .copy-btn {
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
}

/* Responsive tweaks for narrow screens */
@media (max-width: 768px) {
    .step-card .step-header {
        gap: 12px;
    }

    .step-card .step-number {
        width: 44px;
        height: 44px;
    }

    .step-card .step-title {
        font-size: 1.1rem;
    }

    .content-block {
        padding: 10px;
    }
}

/* Hide scrollbar for a cleaner look, but allow scrolling */
.step-card .step-content::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.step-card .step-content {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.guide-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.guide-card-footer span {
    display: flex;
    align-items: center;
}

.guide-card-footer span i {
    margin: 5px;
    color: var(--primary-color);
}

.guide-card a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.guide-card a:hover {
    color: var(--primary-color);
}

.search-bar-container {
    width: 100%;
    max-width: 600px;
    /* Limit search bar width */
}

.tags-container-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    /* Center the tags */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    scrollbar-width: none;
    /* Hide scrollbar on Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar on IE/Edge */
    scroll-behavior: smooth;
    /* Smooth scrolling */
}

.tags-container-wrapper::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar on Webkit browsers */
}

.tags-container-wrapper.scrollable-start::before {
    opacity: 1;
}

.tags-container-wrapper.scrollable-end::after {
    opacity: 1;
}

.tags-container-wrapper::before,
.tags-container-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: linear-gradient(to right, var(--background-color), transparent);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tags-container-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--background-color), transparent);
}

#tags-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 0;
    min-width: max-content;
    white-space: nowrap;
    justify-content: flex-start;
    /* Ensure tags start from the left */
    align-items: center;
}

#tags-container .tag {
    background-color: var(--secondary-btn-background);
    color: var(--secondary-btn-color);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Rating Card Styles */
.rating-card {
    text-align: center;
    /* padding: 40px 30px;  */
    background-color: var(--card-background);
    border-radius: 25px;
    /* Consistent with other cards */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    /* More prominent shadow */
    margin-top: 30px;
    /* Space from previous content */
}

.rating-card h3 {
    margin-bottom: 25px;
    font-size: 1.9rem;
    /* Slightly larger */
    color: var(--text-color);
    /* Use text color for consistency */
    font-weight: 600;
}

.stars {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.8rem;
    /* Larger stars */
    margin-bottom: 20px;
    gap: 8px;
    /* Space between stars */
}

.stars i {
    color: var(--text-color);
    /* Default star color from theme */
    opacity: 0.3;
    /* Faded for empty stars */
    cursor: pointer;
    transition: color 0.3s ease-in-out, transform 0.2s ease-in-out, opacity 0.3s ease-in-out;
}

.stars i:hover {
    transform: scale(1.15);
    /* More pronounced hover effect */
    opacity: 0.6;
}

.stars i.fas {
    color: #FFD700;
    /* Vibrant gold for filled stars */
    opacity: 1;
    /* Fully opaque when filled */
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    /* Subtle glow */
}

.rating-message {
    font-size: 1.1rem;
    /* Slightly larger font */
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 15px;
    min-height: 25px;
    /* Reserve space to prevent layout shift */
}


/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1001;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4);
    /* Lighter overlay matching app style */
    backdrop-filter: blur(8px);
    /* Enhanced blur */
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-background);
    margin: auto;
    padding: 20px;
    /* Remove padding for card-style layout */
    border-radius: 25px;
    /* Match card border radius */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    /* Match card shadow */
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: left;
    /* Left align for better UX */
    transform: translateY(20px);
    opacity: 0;
    animation: modalFadeIn 0.3s forwards;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    /* Add subtle border */
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    /* Match card transitions */
}

.modal-content:hover {
    transform: translateY(-2px);
    /* Subtle hover effect */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    /* Enhanced shadow on hover */
}

.modal-content h2 {
    color: var(--text-color);
    margin: 0;
    /* Remove default margins */
    font-size: 1.5rem;
    /* Match card h2 size */
    font-weight: 600;
    /* Match card font weight */
    font-family: 'Inter', sans-serif;
    /* Ensure consistent font */
}

.modal-content p {
    color: var(--text-color);
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0.8;
    /* Match card paragraph opacity */
}

.modal-content .btn {
    margin-top: 15px;
    font-family: 'Inter', sans-serif;
    /* Ensure consistent font */
    font-weight: 500;
    /* Match button font weight */
    transition: transform 0.3s, box-shadow 0.3s;
    /* Match button transitions */
}

.modal-content .btn:hover {
    transform: translateY(-3px);
    /* Match button hover effect */
    box-shadow: 0 6px 20px var(--shadow-color-hover);
    /* Match button hover shadow */
}

.close-button {
    color: var(--text-color);
    position: absolute;
    top: 20px;
    /* Better spacing */
    right: 25px;
    /* Better spacing */
    font-size: 24px;
    /* Slightly smaller, more refined */
    font-weight: 400;
    /* Lighter weight */
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
    /* Add transform transition */
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    background-color: var(--background-color);
    transform: scale(1.1);
    /* Subtle scale effect */
    text-decoration: none;
    cursor: pointer;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
        /* More pronounced entrance */
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        /* Higher z-index for mobile */
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
    }

    .modal.show {
        display: flex !important;
    }

    .modal-content {
        width: 95vw;
        max-width: none;
        max-height: 90vh;
        margin: 0;
        padding: 20px;
        border-radius: 20px;
        position: relative;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scrolling on iOS */
        transform: none;
        opacity: 1;
        animation: none;
        /* Disable animation on mobile for better performance */
    }

    .modal-content .modal-header {
        margin-bottom: 20px;
    }

    .modal-content .modal-body {
        margin-bottom: 20px;
    }

    .modal-content .modal-footer {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
    }

    .modal-content .btn {
        flex: 1;
        min-height: 44px;
        /* Touch-friendly button size */
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

/* Additional mobile modal fixes */
@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        width: 100vw;
        padding: 15px;
        border-radius: 15px;
    }
}

/* Chat layout fixes to ensure input stays above floating mobile footer */
:root {
    --mobile-footer-height: 72px; /* reasonable default; used on small screens */
}

@media (max-width: 768px) {
    /* Make room inside chat-main so content doesn't go under the floating footer */
    .chat-main {
        padding-bottom: calc(var(--mobile-footer-height) + 24px);
    }

    /* Ensure messages area is scrollable and fills available space */
    .chat-messages,
    #chat-messages {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px; /* small gap below messages */
    }

    /* Keep the input area visible above the floating footer */
    .message-input-area {
        position: sticky;
        bottom: calc(var(--mobile-footer-height) + 12px);
        z-index: 10002;
        display: flex;
        gap: 8px;
        align-items: center;
        padding: 8px 12px;
        background: var(--card-background, #fff);
        box-shadow: 0 -6px 18px rgba(0,0,0,0.06);
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    .message-input-container {
        flex: 1 1 auto;
    }

    .message-input-area textarea,
    .message-input-area input {
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure send button doesn't shrink and stays visible */
    #send-btn, .send-btn {
        flex: 0 0 auto;
    }
}

/* Share Modal Styles */
.share-modal-content {
    padding: 30px;
    text-align: center;
}

.share-modal-content h2 {
    margin-bottom: 20px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--card-background);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.share-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.share-btn.shared {
    background-color: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.share-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.share-btn span {
    font-size: 0.8rem;
}

/* Guide Card Share Button */
.guide-share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.219);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.guide-share-btn:hover {
    color: var(--primary-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transform: scale(1.1);
}

/* RTL Support for Share Modal */
body.rtl .share-modal-content {
    direction: rtl;
}

/* Analytics Modal Styles */
.analytics-modal-content {
    padding: 30px;
    text-align: center;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.analytics-modal-content h2 {
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 600;
}

/* Analytics Summary Section */
.analytics-summary {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.analytics-stat {
    flex: 1;
    min-width: 150px;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(255, 75, 218, 0.02) 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analytics-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 16px 16px 0 0;
}

.analytics-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

.analytics-stat h3 {
    font-size: 2.2rem;
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.analytics-stat p {
    margin: 0;
    color: var(--text-color);
    font-size: 0.95rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Platform Breakdown Section */
.platform-breakdown {
    text-align: left;
    margin-bottom: 30px;
}

.platform-breakdown h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-breakdown h3::before {
    content: '📊';
    font-size: 1.2rem;
}

.platform-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background-color: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.platform-stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.platform-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-color);
    border-color: var(--primary-color);
}

.platform-stat:hover::before {
    width: 8px;
}

.platform-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.05rem;
    text-transform: capitalize;
}

.platform-metrics {
    display: flex;
    gap: 20px;
    align-items: center;
}

.platform-metrics .metric {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    padding: 4px 8px;
    background-color: rgba(255, 75, 218, 0.1);
    border-radius: 6px;
    font-weight: 500;
}

/* Detailed Shares Section */
.private-shares-section {
    text-align: left;
    margin-top: 25px;
}

.private-shares-section h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.private-shares-section h3::before {
    content: '🔗';
    font-size: 1.2rem;
}

/* Regular Shares List */
.regular-shares-list {
    margin-bottom: 25px;
}

.regular-share-item {
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(255, 75, 218, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.regular-share-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 12px 12px 0 0;
}

.regular-share-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.2);
    border-color: #28a745;
}

/* Private Shares List */
.private-shares-list {
    margin-bottom: 25px;
}

.private-share-item {
    background: linear-gradient(135deg, var(--card-background) 0%, rgba(220, 53, 69, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.private-share-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #dc3545 0%, #e83e8c 100%);
    border-radius: 12px 12px 0 0;
}

.private-share-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
}

/* Share Item Headers */
.share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.share-platform {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-recipient {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.share-token {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--primary-color);
    background-color: rgba(255, 75, 218, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Share Details */
.share-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.share-details span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-weight: 500;
}

.share-views {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
    opacity: 1 !important;
}

.share-created {
    background-color: rgba(0, 123, 255, 0.1) !important;
    color: #007bff !important;
    opacity: 1 !important;
}

.share-last-viewed {
    background-color: rgba(255, 193, 7, 0.1) !important;
    color: #ffc107 !important;
    opacity: 1 !important;
}

.share-expires {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    opacity: 1 !important;
}

.share-status {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
}

.status-expired {
    background-color: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

.status-revoked {
    background-color: rgba(108, 117, 125, 0.1) !important;
    color: #6c757d !important;
}

/* Share Actions */
.share-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.copy-share-url {
    background: linear-gradient(45deg, #007bff, #0056b3) !important;
}

.copy-share-url:hover {
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

/* Empty State */
.private-shares-section p {
    text-align: center;
    color: var(--text-color);
    opacity: 0.6;
    font-style: italic;
    padding: 40px 20px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-modal-content {
        padding: 20px;
        max-width: 95vw;
    }

    .analytics-summary {
        flex-direction: column;
        gap: 15px;
    }

    .analytics-stat {
        min-width: unset;
    }

    .platform-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .platform-metrics {
        flex-wrap: wrap;
        gap: 10px;
    }

    .share-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .share-details {
        flex-direction: column;
        gap: 8px;
    }

    .share-actions {
        justify-content: flex-start;
    }
}

/* RTL Support for Analytics Modal */
body.rtl .analytics-modal-content {
    direction: rtl;
}

body.rtl .platform-breakdown {
    text-align: right;
}

body.rtl .platform-stat {
    direction: rtl;
}

body.rtl .platform-stat::before {
    left: auto;
    right: 0;
}

body.rtl .share-header {
    direction: rtl;
}

body.rtl .share-details {
    direction: rtl;
}

body.rtl .share-actions {
    justify-content: flex-start;
}

body.rtl .private-shares-section {
    text-align: right;
}

body.rtl .regular-shares-list,
body.rtl .private-shares-list {
    direction: rtl;
}

body.rtl .platform-breakdown h3::before,
body.rtl .private-shares-section h3::before {
    margin-left: 10px;
    margin-right: 0;
}

/* Desktop improvements for guide editor modal */
@media (min-width: 769px) {
    #guide-editor-modal .modal-content {
        width: 95%;
        max-width: 1400px;
        max-height: 90vh;
        padding: 0;
        border-radius: 25px;
        /* Match card border radius */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
        /* Match card shadow */
        transition: transform 0.3s, box-shadow 0.3s;
        /* Match card transitions */
    }

    #guide-editor-modal .modal-content:hover {
        transform: translateY(-2px);
        /* Subtle hover effect */
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        /* Enhanced shadow on hover */
        padding: 20px;
    }

    #guide-editor-modal .card-header {
        padding: 25px 30px;
        background: var(--card-background);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 25px 25px 0 0;
        /* Match modal border radius */
    }

    #guide-editor-modal .card-header .header-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #guide-editor-modal .card-header .header-actions .btn {
        font-size: 0.85rem;
        padding: 8px 16px;
        border-radius: 20px;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    #guide-editor-modal .card-header .header-actions .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    #guide-editor-modal .card-header h2 {
        font-size: 1.5rem;
        /* Match card h2 size */
        margin: 0;
        font-weight: 600;
        /* Match card font weight */
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
        color: var(--text-color);
    }

    #guide-editor-modal .card-header .btn-icon {
        padding: 10px;
        font-size: 1.4rem;
        border-radius: 50%;
        /* Circular buttons */
        transition: all 0.2s ease;
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-color);
    }

    #guide-editor-modal .card-header .btn-icon:hover {
        background: var(--background-color);
        transform: scale(1.1);
        color: var(--primary-color);
        border-color: var(--primary-color);
    }

    /* Desktop form layout */
    #guide-editor-modal .form-row {
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 25px;
    }

    #guide-editor-modal .form-group.col-md-6 {
        flex: 0 0 100%;
        /* Full width on desktop */
        width: 100%;
        /* Full width on desktop */
        margin-bottom: 0;
    }

    #guide-editor-modal .form-group {
        margin-bottom: 20px;
        width: 100%;
        /* Ensure full width */
    }

    /* Ensure form takes full width */
    #guide-editor-modal form {
        width: 100%;
        box-sizing: border-box;
    }

    #guide-editor-modal .form-control {
        padding: 15px 20px;
        /* Match form-control padding */
        font-size: 1rem;
        /* Match form-control font size */
        border: 1px solid var(--form-control-border);
        /* Match form-control border */
        border-radius: 12px;
        /* Match form-control border radius */
        transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
        /* Match form-control transitions */
        background: var(--form-control-background);
        /* Match form-control background */
        font-family: 'Inter', sans-serif;
        /* Match form-control font */
        color: var(--text-color);
        /* Match form-control color */
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    #guide-editor-modal .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px var(--focus-shadow-color);
        /* Match form-control focus shadow */
        outline: none;
        transform: scale(1.02);
        /* Match form-control focus scale */
        transition: all 0.2s ease;
    }

    #guide-editor-modal textarea.form-control {
        min-height: 100px;
        resize: vertical;
        line-height: 1.5;
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    #guide-editor-modal label {
        font-weight: 600;
        /* Match app label weight */
        margin-bottom: 8px;
        display: block;
        color: var(--text-color);
        font-size: 0.9rem;
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    /* Enhanced button toggles for desktop */
    #guide-editor-modal .btn-toggle {
        margin-bottom: 15px;
        border-radius: 12px;
        /* Match form-control border radius */
        overflow: hidden;
        border: 1px solid var(--form-control-border);
        /* Match form-control border */
        background: var(--form-control-background);
        /* Match form-control background */
        padding: 4px;
        /* Add padding for better appearance */
    }

    #guide-editor-modal .btn-toggle-item {
        padding: 12px 20px;
        font-size: 0.9rem;
        font-weight: 500;
        /* Match button font weight */
        border: none;
        background: transparent;
        color: var(--text-color);
        transition: all 0.2s ease;
        cursor: pointer;
        flex: 1;
        border-radius: 8px;
        /* Slightly smaller radius for toggle items */
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    #guide-editor-modal .btn-toggle-item:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-1px);
        /* Subtle hover effect */
    }

    #guide-editor-modal .btn-toggle input:checked+.btn-toggle-item {
        background: var(--primary-gradient);
        /* Use gradient for active state */
        color: white;
        font-weight: 600;
        box-shadow: 0 2px 8px var(--shadow-color);
        /* Add shadow for active state */
    }

    /* Desktop fieldset styling */
    #guide-editor-modal fieldset {
        margin-bottom: 30px;
        padding: 25px;
        border: 1px solid var(--border-color);
        /* Match card border */
        border-radius: 12px;
        /* Match form-control border radius */
        background: var(--card-background);
        position: relative;
        transition: border-color 0.3s, box-shadow 0.3s;
        /* Add transitions */
    }

    #guide-editor-modal fieldset:hover {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--focus-shadow-color);
        /* Subtle focus effect */
    }

    #guide-editor-modal fieldset legend {
        font-size: 1.1rem;
        font-weight: 600;
        padding: 0 15px;
        margin-bottom: 20px;
        background: var(--card-background);
        color: var(--primary-color);
        border-radius: 6px;
        width: auto;
        border: none;
        position: absolute;
        top: -12px;
        left: 20px;
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    /* Desktop step blocks */
    #guide-editor-modal .step-block {
        margin-bottom: 25px;
        border: 1px solid var(--border-color);
        /* Match card border */
        border-radius: 12px;
        /* Match form-control border radius */
        overflow: hidden;
        background: var(--card-background);
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        /* Subtle shadow */
    }

    #guide-editor-modal .step-block:hover {
        border-color: var(--primary-color);
        box-shadow: 0 4px 15px rgba(255, 75, 218, 0.1);
        transform: translateY(-1px);
        /* Subtle hover effect */
    }

    #guide-editor-modal .step-header {
        padding: 20px 25px;
        background: var(--background-color);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #guide-editor-modal .step-title {
        font-size: 1.1rem;
        margin: 0;
        font-weight: 600;
        color: var(--text-color);
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    #guide-editor-modal .step-actions {
        display: flex;
        gap: 8px;
    }

    #guide-editor-modal .step-actions .btn-icon {
        padding: 8px 12px;
        border-radius: 8px;
        /* Match form-control border radius */
        transition: all 0.2s ease;
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-color);
    }

    #guide-editor-modal .step-actions .btn-icon:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.05);
        border-color: var(--primary-color);
    }

    #guide-editor-modal .step-content {
        padding: 25px;
    }

    /* Desktop content blocks */
    #guide-editor-modal .content-block {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        /* Match card border */
        border-radius: 12px;
        /* Match form-control border radius */
        overflow: hidden;
        background: var(--background-color);
        transition: all 0.2s ease;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
        /* Subtle shadow */
    }

    #guide-editor-modal .content-block:hover {
        border-color: var(--primary-color);
        box-shadow: 0 2px 10px rgba(255, 75, 218, 0.08);
        transform: translateY(-1px);
        /* Subtle hover effect */
    }

    #guide-editor-modal .content-block-header {
        padding: 15px 20px;
        background: var(--card-background);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #guide-editor-modal .content-block-title {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-color);
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    #guide-editor-modal .content-block .card-body {
        padding: 20px;
    }

    /* Desktop form actions */
    #guide-editor-modal .form-actions {
        padding: 25px 30px;
        background: var(--background-color);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: flex-end;
        gap: 15px;
        margin: 0 -30px -30px -30px;
        border-radius: 0 0 25px 25px;
        /* Match modal border radius */
    }

    #guide-editor-modal .form-actions .btn {
        padding: 12px 24px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 25px;
        /* Match button border radius */
        transition: transform 0.3s, box-shadow 0.3s;
        min-width: 120px;
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    #guide-editor-modal .form-actions .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px var(--shadow-color-hover);
    }

    #guide-editor-modal .form-actions .btn-primary {
        background: var(--primary-gradient);
        border: none;
        color: white;
    }

    #guide-editor-modal .form-actions .btn-primary:hover {
        box-shadow: 0 8px 25px var(--shadow-color-hover);
    }

    /* Desktop tag system */
    #guide-editor-modal .tag-input-container {
        position: relative;
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    #guide-editor-modal .selected-tags-display {
        min-height: 50px;
        padding: 12px 16px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 15px;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        background: var(--background-color);
        transition: all 0.2s ease;
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    #guide-editor-modal .selected-tags-display:focus-within {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(255, 75, 218, 0.1);
    }

    #guide-editor-modal .available-tags-dropdown {
        max-height: 250px;
        overflow-y: auto;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        background: var(--card-background);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        z-index: 100;
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    /* Desktop file inputs */
    #guide-editor-modal .form-control-file {
        padding: 12px 16px;
        border: 2px solid var(--border-color);
        border-radius: 8px;
        background: var(--background-color);
        transition: all 0.2s ease;
        cursor: pointer;
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    #guide-editor-modal .form-control-file:hover {
        border-color: var(--primary-color);
        background: var(--background-color);
    }

    #guide-editor-modal .form-control-file:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(255, 75, 218, 0.1);
        outline: none;
    }

    /* Desktop select styling */
    #guide-editor-modal select.form-control {
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.75rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 3rem;
        cursor: pointer;
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
    }

    #guide-editor-modal select.form-control:hover {
        border-color: var(--primary-color);
    }

    #guide-editor-modal select.form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(255, 75, 218, 0.1);
        outline: none;
    }

    /* Desktop scrollbar styling */
    #guide-editor-modal .modal-content::-webkit-scrollbar {
        width: 10px;
    }

    #guide-editor-modal .modal-content::-webkit-scrollbar-track {
        background: var(--background-color);
        border-radius: 5px;
    }

    #guide-editor-modal .modal-content::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 5px;
        transition: all 0.2s ease;
    }

    #guide-editor-modal .modal-content::-webkit-scrollbar-thumb:hover {
        background: var(--primary-color);
    }
}

/* Large desktop screens */
@media (min-width: 1200px) {
    #guide-editor-modal .modal-content {
        max-width: 1600px;
    }

    #guide-editor-modal .form-group.col-md-6 {
        flex: 0 0 calc(50% - 12.5px);
    }

    #guide-editor-modal .form-actions {
        padding: 30px 40px;
    }

    #guide-editor-modal .form-actions .btn {
        padding: 14px 28px;
        font-size: 1.05rem;
        min-width: 140px;
    }
}

/* Mobile styles for guide editor modal */
@media (max-width: 768px) {
    #guide-editor-modal .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        overflow-x: hidden;
        /* Prevent horizontal overflow */
        border-radius: 0;
        /* Full screen on mobile */
        box-shadow: none;
        /* Remove shadow for full screen */
    }

    #guide-editor-modal .card-header {
        padding: 15px 20px;
        margin: 0;
        position: sticky;
        top: 0;
        background: var(--card-background);
        border-bottom: 1px solid var(--border-color);
        z-index: 10;
        border-radius: 0;
        /* No border radius for sticky header */
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #guide-editor-modal .card-header .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    #guide-editor-modal .card-header .header-actions .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
        border-radius: 16px;
        font-weight: 500;
        min-width: auto;
    }

    #guide-editor-modal .card-header h2 {
        font-size: 1.2rem;
        margin: 0;
        font-weight: 600;
        font-family: 'Inter', sans-serif;
        color: var(--text-color);
        flex: 1;
    }

    /* Mobile styles for header actions */
    @media (max-width: 768px) {
        #guide-editor-modal .card-header .header-actions {
            flex-direction: column;
            align-items: stretch;
            gap: 6px;
            width: 100%;
        }

        #guide-editor-modal .card-header .header-actions .btn {
            width: 100%;
            justify-content: center;
        }

        #guide-editor-modal .card-header {
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
        }

        #guide-editor-modal .card-header h2 {
            text-align: center;
            font-size: 1.1rem;
        }
    }

    #guide-editor-modal .card-header .btn-icon {
        padding: 8px;
        font-size: 1.2rem;
        border-radius: 50%;
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-color);
        transition: all 0.2s ease;
    }

    #guide-editor-modal .card-header .btn-icon:hover {
        background: var(--background-color);
        transform: scale(1.1);
        color: var(--primary-color);
        border-color: var(--primary-color);
    }

    /* Form improvements for mobile */
    #guide-editor-modal .form-row {
        flex-direction: column;
        gap: 15px;
    }

    #guide-editor-modal .form-group {
        margin-bottom: 15px;
        width: 100%;
        /* Ensure full width on mobile */
    }

    #guide-editor-modal .form-group.col-md-6 {
        flex: 1;
        width: 100%;
        margin: 0;
    }

    #guide-editor-modal .form-control {
        font-size: 16px;
        /* Prevent zoom on iOS */
        padding: 15px 20px;
        /* Match form-control padding */
        height: auto;
        min-height: 44px;
        /* Better touch target */
        width: 100%;
        /* Ensure full width */
        box-sizing: border-box;
        /* Include padding in width calculation */
        border: 1px solid var(--form-control-border);
        /* Match form-control border */
        border-radius: 12px;
        /* Match form-control border radius */
        background-color: var(--form-control-background);
        /* Match form-control background */
        font-family: 'Inter', sans-serif;
        /* Match form-control font */
        color: var(--text-color);
        /* Match form-control color */
        transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
        /* Match form-control transitions */
    }

    #guide-editor-modal .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px var(--focus-shadow-color);
        /* Match form-control focus shadow */
        outline: none;
        transform: scale(1.02);
        /* Match form-control focus scale */
        transition: all 0.2s ease;
    }

    #guide-editor-modal textarea.form-control {
        min-height: 80px;
        resize: vertical;
        width: 100%;
        box-sizing: border-box;
    }

    #guide-editor-modal label {
        font-weight: 600;
        /* Match app label weight */
        margin-bottom: 8px;
        display: block;
        font-size: 0.9rem;
        color: var(--text-color);
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    /* Button toggle improvements */
    #guide-editor-modal .btn-toggle {
        margin-bottom: 10px;
        display: flex;
        width: 100%;
        box-sizing: border-box;
        border-radius: 12px;
        /* Match form-control border radius */
        overflow: hidden;
        border: 1px solid var(--form-control-border);
        /* Match form-control border */
        background: var(--form-control-background);
        /* Match form-control background */
        padding: 4px;
        /* Add padding for better appearance */
    }

    #guide-editor-modal .btn-toggle-item {
        padding: 10px 15px;
        font-size: 0.9rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        box-sizing: border-box;
        border-radius: 8px;
        /* Slightly smaller radius for toggle items */
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
        font-weight: 500;
        /* Match button font weight */
        transition: all 0.2s ease;
        cursor: pointer;
        background: transparent;
        border: none;
        color: var(--text-color);
    }

    #guide-editor-modal .btn-toggle-item:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-1px);
    }

    #guide-editor-modal .btn-toggle input:checked+.btn-toggle-item {
        background: var(--primary-gradient);
        color: white;
        font-weight: 600;
        box-shadow: 0 2px 8px var(--shadow-color);
    }

    /* Fieldset improvements */
    #guide-editor-modal fieldset {
        margin-bottom: 25px;
        padding: 15px;
        border: 1px solid var(--border-color);
        /* Match card border */
        border-radius: 12px;
        /* Match form-control border radius */
        width: 100%;
        box-sizing: border-box;
        background: var(--card-background);
        transition: border-color 0.3s, box-shadow 0.3s;
        /* Add transitions */
    }

    #guide-editor-modal fieldset:hover {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--focus-shadow-color);
    }

    #guide-editor-modal fieldset legend {
        font-size: 1rem;
        font-weight: 600;
        padding: 0 10px;
        margin-bottom: 15px;
        width: auto;
        border: none;
        color: var(--primary-color);
        font-family: 'Inter', sans-serif;
        /* Ensure consistent font */
    }

    /* Step blocks mobile improvements */
    #guide-editor-modal .step-block {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        /* Match card border */
        border-radius: 12px;
        /* Match form-control border radius */
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
        background: var(--card-background);
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        /* Subtle shadow */
    }

    #guide-editor-modal .step-block:hover {
        border-color: var(--primary-color);
        box-shadow: 0 4px 15px rgba(255, 75, 218, 0.1);
        transform: translateY(-1px);
    }

    #guide-editor-modal .step-header {
        padding: 15px;
        background: var(--background-color);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    #guide-editor-modal .step-title {
        font-size: 1rem;
        margin: 0;
        font-weight: 600;
        color: var(--text-color);
        font-family: 'Inter', sans-serif;
        flex: 1;
    }

    #guide-editor-modal .step-actions {
        margin-top: 10px;
        display: flex;
        gap: 5px;
    }

    #guide-editor-modal .step-actions .btn-icon {
        padding: 8px;
        margin-left: 5px;
        border-radius: 8px;
        /* Match form-control border radius */
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-color);
        transition: all 0.2s ease;
    }

    #guide-editor-modal .step-actions .btn-icon:hover {
        background: var(--primary-color);
        color: white;
        transform: scale(1.05);
        border-color: var(--primary-color);
    }

    #guide-editor-modal .step-content {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Content blocks mobile improvements */
    #guide-editor-modal .content-block {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        /* Match card border */
        border-radius: 12px;
        /* Match form-control border radius */
        overflow: hidden;
        width: 100%;
        box-sizing: border-box;
        background: var(--background-color);
        transition: all 0.2s ease;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
        /* Subtle shadow */
    }

    #guide-editor-modal .content-block:hover {
        border-color: var(--primary-color);
        box-shadow: 0 2px 10px rgba(255, 75, 218, 0.08);
        transform: translateY(-1px);
    }

    #guide-editor-modal .content-block-header {
        padding: 12px 15px;
        background: var(--card-background);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #guide-editor-modal .content-block-title {
        margin: 0;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-color);
        font-family: 'Inter', sans-serif;
    }

    #guide-editor-modal .content-block .card-body {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Form actions mobile improvements */
    #guide-editor-modal .form-actions {
        padding: 20px;
        background: var(--background-color);
        border-top: 1px solid var(--border-color);
        position: sticky;
        bottom: 0;
        margin: 0 -20px -20px -20px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: calc(100% + 40px);
        /* Account for negative margins */
        box-sizing: border-box;
    }

    #guide-editor-modal .form-actions .btn {
        width: 100%;
        min-height: 44px;
        font-size: 1rem;
        padding: 12px;
        margin: 0;
        border-radius: 25px;
        /* Match button border radius */
        font-family: 'Inter', sans-serif;
        font-weight: 500;
        transition: transform 0.3s, box-shadow 0.3s;
        box-sizing: border-box;
    }

    #guide-editor-modal .form-actions .btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px var(--shadow-color-hover);
    }

    #guide-editor-modal .form-actions .btn-primary {
        background: var(--primary-gradient);
        border: none;
        color: white;
    }

    #guide-editor-modal .form-actions .btn-primary:hover {
        box-shadow: 0 8px 25px var(--shadow-color-hover);
    }

    /* Tag input improvements */
    #guide-editor-modal .tag-input-container {
        position: relative;
        width: 100%;
        box-sizing: border-box;
    }

    #guide-editor-modal .selected-tags-display {
        min-height: 44px;
        padding: 8px 12px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        margin-bottom: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    #guide-editor-modal .available-tags-dropdown {
        max-height: 200px;
        overflow-y: auto;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--card-background);
        width: 100%;
        box-sizing: border-box;
    }

    /* File input improvements */
    #guide-editor-modal .form-control-file {
        padding: 10px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--background-color);
        width: 100%;
        box-sizing: border-box;
    }

    /* Select improvements */
    #guide-editor-modal select.form-control {
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.5rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 2.5rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #guide-editor-modal .modal-content {
        padding: 0;
    }

    #guide-editor-modal .card-header {
        padding: 12px 15px;
    }

    #guide-editor-modal .card-header h2 {
        font-size: 1.1rem;
        font-weight: 600;
        font-family: 'Inter', sans-serif;
        color: var(--text-color);
    }

    #guide-editor-modal fieldset {
        padding: 12px;
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        background: var(--card-background);
    }

    #guide-editor-modal .form-control {
        padding: 12px 15px;
        /* Slightly smaller padding for very small screens */
        font-size: 16px;
        border: 1px solid var(--form-control-border);
        border-radius: 12px;
        background-color: var(--form-control-background);
        font-family: 'Inter', sans-serif;
        color: var(--text-color);
    }

    #guide-editor-modal .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px var(--focus-shadow-color);
        outline: none;
        transform: scale(1.02);
    }

    #guide-editor-modal .btn {
        padding: 10px 15px;
        font-size: 0.95rem;
        border-radius: 25px;
        font-family: 'Inter', sans-serif;
        font-weight: 500;
    }

    #guide-editor-modal .btn-toggle-item {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: 40px;
        /* Slightly smaller for very small screens */
        border-radius: 8px;
        font-family: 'Inter', sans-serif;
        font-weight: 500;
    }

    #guide-editor-modal .btn-toggle-item:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-1px);
    }

    #guide-editor-modal .btn-toggle input:checked+.btn-toggle-item {
        background: var(--primary-gradient);
        color: white;
        font-weight: 600;
        box-shadow: 0 2px 8px var(--shadow-color);
    }
}

/* Guide Editor Modal Styles */
#guide-editor-modal {
    overflow: hidden;
    /* Prevent background scrolling */
}

#guide-editor-modal .modal-content {
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal overflow */
    box-sizing: border-box;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: var(--border-color) transparent;
    /* Firefox */
}

#guide-editor-modal .modal-content::-webkit-scrollbar {
    width: 8px;
    /* Chrome, Safari, Edge */
}

#guide-editor-modal .modal-content::-webkit-scrollbar-track {
    background: transparent;
}

#guide-editor-modal .modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#guide-editor-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Additional overflow fixes for modal content */
#guide-editor-modal .modal-content * {
    box-sizing: border-box;

}

#guide-editor-modal .modal-content .form-control,
#guide-editor-modal .modal-content .form-control-file,
#guide-editor-modal .modal-content select,
#guide-editor-modal .modal-content textarea {
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
}

#guide-editor-modal .modal-content .btn-toggle {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

#guide-editor-modal .card-header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 30px;
    margin: -30px -30px 30px -30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#guide-editor-modal .card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

#guide-editor-modal .close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
    padding: 0;
    width: auto;
    height: auto;
}

#guide-editor-modal .close-button:hover {
    color: var(--primary-color);
}

.guide-card .placeholder-image h3 {
    color: #fff;
    /* White text for contrast on gradient */
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    /* Remove default margin */
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments for placeholder image */
@media (max-width: 768px) {
    .guide-card .placeholder-image {
        height: 150px;
        /* Match guide-image height on mobile */
    }

    .guide-card .placeholder-image h3 {
        font-size: 1.2rem;
    }

    .guide-card .guide-progress {
        margin: 12px 0;
    }

    .guide-card .guide-progress .progress-text {
        font-size: 0.75rem;
    }
}


/* Guide Creator Info */
.guide-creator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.guide-creator .creator-link {
    display: flex;
    align-items: center;
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid var(--primary-color);
    transition: opacity 0.3s ease-in-out;
}

.creator-avatar.lazy {
    opacity: 0.7;
}

.creator-avatar.lazy.loaded {
    opacity: 1;
}

.creator-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.9;
    margin: 8px;
}


/* Admin Dashboard Specific Styles */
.admin-dashboard-section {
    margin-bottom: 40px;
}

.admin-dashboard-section h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.table th {
    background-color: var(--secondary-btn-background);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.01);
}

.dark-theme .table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.01);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);

}

.dark-theme .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.table .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    margin-right: 5px;
}

.table input[type="text"],
.table select {
    padding: 8px;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    background-color: var(--form-control-background);
    color: var(--text-color);
    margin-right: 5px;
    width: 120px;
    /* Adjust as needed */
}

.table select {
    width: 100px;
}

/* Responsive table headers */
.responsive-table-header {
    display: none;
}

.responsive-table-cell {
    display: table-cell;
}

@media (max-width: 768px) {
    .responsive-table-header {
        display: block;
        font-weight: bold;
        background-color: var(--secondary-btn-background);
        padding: 8px 15px;
        border-bottom: 1px solid var(--border-color);
    }

    .responsive-table-cell {
        display: block;
        padding: 8px 15px;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding-left: 65%;
    }

    .responsive-table-cell[data-label]:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 15px;
        right: 35%;
        font-weight: bold;
        color: var(--primary-color);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 10px;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
    }
}

.message {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}



/* Creator Dashboard Specific Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    /* Sidebar and content */
    gap: 35px;
    align-items: start;
    /* Align items to the start of the grid */
}

.dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav ul li a {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: background-image 0.3s, color 0.3s;
}

.dashboard-nav ul li a.active,
.dashboard-nav ul li a:hover {
    background-image: var(--primary-gradient);
    color: #fff;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 35px;
    /* Space between cards */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-color);
}

.guide-item {
    /* display: flex; */
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.guide-item:last-child {
    border-bottom: none;
}

.guide-item h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.guide-actions .btn {
    margin-left: 10px;
}

.status-published,
.status-draft {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.status-published {
    background-color: #d4edda;
    /* Light green */
    color: #155724;
    /* Dark green */
}

.status-draft {
    background-color: #fff3cd;
    /* Light yellow */
    color: #856404;
    /* Dark yellow */
}

/* Guide Editor Form */
#guide-editor h2 {
    margin-bottom: 25px;
}

#guide-editor hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 30px 0;
}

#guide-editor .btn {
    margin-right: 10px;
}

/* Responsive adjustments for Creator Dashboard */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        /* Stack sidebar and content */
    }

    .dashboard-nav {
        margin-bottom: 30px;
    }

    .dashboard-nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .dashboard-nav ul li {
        margin: 5px;
    }

    .guide-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-actions {
        margin-top: 15px;
    }

    .guide-actions .btn,
    .guide-actions .status-published,
    .guide-actions .status-draft {
        margin-left: 0;
        margin-right: 10px;
        margin-bottom: 10px;
    }

    .guide-item {
        display: block;
        /* Override flex for mobile */
    }

    .guide-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        /* Space between stacked buttons */
    }
}


/* Header User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
}

.user-avatar-header {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.logo-image {
    width: 35px;
    height: 35px;
    object-fit: cover;
    margin-top: 20px;
}

.user-name-header {
    font-weight: 600;
    color: var(--text-color);
}

.user-info .btn-sm {
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* Responsive adjustments for header user info */
@media (max-width: 576px) {
    .user-info {
        margin-right: 10px;
    }

    .user-name-header {
        display: none;
        /* Hide name on very small screens */
    }

    .user-info .btn-sm {
        padding: 6px 12px;
    }
}

/* Hide logout button on mobile - users can logout from mobile side menu */
@media (max-width: 768px) {
    .user-info .btn-secondary[href="/logout"] {
        display: none !important;
    }
}


/* Profile Page Styles */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 0 6px rgba(255, 75, 218, 0.2);
}

.profile-header h2 {
    margin-top: 15px;
    font-size: 2rem;
    color: var(--text-color);
}

.profile-header .text-muted {
    color: var(--text-color);
    opacity: 0.7;
}

.badge {
    display: inline-block;
    padding: 0.5em 0.75em;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge.bg-primary {
    background-image: var(--primary-gradient);
    color: #fff;
}

/* Creator Profile Page Styles */
.creator-profile-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.creator-header-card {
    padding: 0;
    /* Remove padding from the card itself */
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.creator-cover-image-area {
    width: 100%;
    height: 150px;
    /* Height of the visible cover image part */
    background-size: cover;
    background-position: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    position: relative;
    z-index: 1;
}

.no-cover-placeholder-card {
    width: 100%;
    height: 100%;
    background-image: var(--primary-gradient);
    /* Use the primary gradient */
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.creator-header-card .profile-avatar {
    position: absolute;
    /* Absolute positioning */
    left: 50%;
    transform: translateX(-50%);
    top: 15px;
    /* Position to overlap cover and overlay */
    z-index: 3;
    /* Ensure it's above everything */
    border-color: #fff;
    /* White border for avatar */
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.3);
    /* Lighter shadow */
}

.creator-details-overlay {
    padding: 30px;
    padding-top: 75px;
    /* Space for the avatar to sit above content */
    margin-top: -60px;
    /* Pull it up to overlap the cover image and avatar */
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    position: relative;
    z-index: 2;
    /* Ensure it's above the cover image area */
    text-align: center;
    max-width: 800px;
    /* Limit content width */
    margin-left: auto;
    /* Center the overlay */
    margin-right: auto;
    /* Center the overlay */
}

/* Creator Stats */
.creator-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.8;
}

.stat-item i {
    color: var(--primary-color);
}

/* Follow Button */
#follow-button {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .creator-header-card .profile-avatar {
        top: 15px;
        /* Adjust for smaller avatar */
        width: 70px;
        height: 70px;
    }

    .creator-details-overlay {
        padding-top: 50px;
        /* Adjust for smaller avatar */
        margin-top: 0px;
        padding: 20px;
    }

    .creator-cover-image-area,
    .no-cover-placeholder-card {
        height: 100px;
    }

    .creator-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Generic Modal Styles */
#generic-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1001;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.6);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

#generic-modal .modal-content {
    background-color: var(--card-background);
    margin: auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    position: relative;
    text-align: center;
    transform: translateY(20px);
    opacity: 0;
    animation: modalFadeIn 0.3s forwards;
}

#generic-modal .close-button {
    color: var(--text-color);
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

#generic-modal .close-button:hover,
#generic-modal .close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

#generic-modal p {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

#confirm-modal .modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Creator Dashboard Table */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.guide-table th,
.guide-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.guide-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.7;
}

.guide-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.dark-theme .guide-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-published {
    background-color: #d4edda;
    color: #155724;
}

.status-draft {
    background-color: #fff3cd;
    color: #856404;
}

.status-private {
    background-color: #d1ecf1;
    color: #0c5460;
}

.guide-actions .btn-icon {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.guide-actions .btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.guide-actions .btn-icon:hover::before {
    width: 100%;
    height: 100%;
}

.guide-actions .btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.guide-actions .btn-icon:active {
    transform: scale(0.95);
}

/* Edit Button - Blue theme */
.guide-actions .btn-icon.edit-guide-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.guide-actions .btn-icon.edit-guide-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* Delete Button - Red theme */
.guide-actions .btn-icon.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.guide-actions .btn-icon.btn-danger:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e74c3c 100%);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    color: #fff;
}

/* Publish/Private Button - Green theme */
.guide-actions .btn-icon.btn-info {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(81, 207, 102, 0.3);
}

.guide-actions .btn-icon.btn-info:hover {
    background: linear-gradient(135deg, #40c057 0%, #2f9e44 100%);
    box-shadow: 0 4px 20px rgba(81, 207, 102, 0.4);
    color: #fff;
}

/* Make Draft Button - Orange theme */
.guide-actions .btn-icon.btn-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 212, 59, 0.3);
}

.guide-actions .btn-icon.btn-warning:hover {
    background: linear-gradient(135deg, #fab005 0%, #f59f00 100%);
    box-shadow: 0 4px 20px rgba(255, 212, 59, 0.4);
    color: #fff;
}

/* Success Button - Emerald theme */
.guide-actions .btn-icon.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.guide-actions .btn-icon.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    color: #fff;
}

/* Primary Button - Purple theme */
.guide-actions .btn-icon.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.guide-actions .btn-icon.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    color: #fff;
}

/* Icon animations */
.guide-actions .btn-icon i {
    transition: transform 0.3s ease;
    z-index: 1;
    position: relative;
}

.guide-actions .btn-icon:hover i {
    transform: scale(1.1);
}

/* Specific icon colors for better visibility */
.guide-actions .btn-icon.edit-guide-btn i {
    color: #fff;
}

.guide-actions .btn-icon.btn-danger i {
    color: #fff;
}

.guide-actions .btn-icon.btn-info i {
    color: #fff;
}

.guide-actions .btn-icon.btn-warning i {
    color: #fff;
}

.guide-actions .btn-icon.btn-success i {
    color: #fff;
}

.guide-actions .btn-icon.btn-primary i {
    color: #fff;
}

/* Guide Editor Form Enhancements */
#guide-editor fieldset {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

#guide-editor legend {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0 10px;
    margin-left: 15px;
}

body.rtl #guide-editor legend {
    margin-left: 0;
    margin-right: 15px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    min-width: 250px;
}

.form-row .form-group {
    flex: 1;
    min-width: calc(50% - 10px);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

#close-editor-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    border: none !important;
}

#close-editor-btn:hover {
    opacity: 1;
    border: none !important;
}

.text-center {
    text-align: center;
}

/* Step & Content Blocks in Editor */
.step-block {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    margin-bottom: 20px;
    background-color: var(--background-color);
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--secondary-btn-background);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.step-header:hover {
    /* background-color: var(--primary-color); */
    color: #fff;
}

.step-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.step-actions {
    display: flex;
    gap: 10px;
}

.step-content {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.content-blocks-container {
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    margin-top: 20px;
    margin-bottom: 20px;
}

.content-block {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: var(--card-background);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.content-block:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.content-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--secondary-btn-background);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.content-block-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

/* Tag Input Component */
.tag-input-container {
    position: relative;
    border: 1px solid var(--form-control-border);
    border-radius: 12px;
    background-color: var(--form-control-background);
    padding: 10px;
    min-height: 50px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.tag-input-container .form-control {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 5px 10px;
    height: auto;
    min-width: 100px;
}

.tag-input-container .form-control:focus {
    box-shadow: none;
}

.selected-tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    background-image: var(--primary-gradient);
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
}

.tag-badge .remove-tag {
    margin-left: 5px;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0.8;
}

.tag-badge .remove-tag:hover {
    opacity: 1;
}

.available-tags-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    /* Hidden by default */
}

.available-tags-dropdown.show {
    display: block;
}

.dropdown-tag-item {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.dropdown-tag-item:hover {
    background-color: var(--secondary-btn-background);
}

.guide-creator-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    text-align: center;
}

.guide-creator-info .creator-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 0 10px 0;
}

.guide-creator-info .creator-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.guide-creator-info .creator-details .guide-stats {
    margin-top: 5px;
}

.guide-creator-info .creator-details a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.guide-creator-info .creator-details a:hover {
    text-decoration: underline;
}

/* User Dashboard Progress Styles */
.progress-item {
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: var(--card-background);
    transition: transform 0.3s, box-shadow 0.3s;
}

.progress-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.progress-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: var(--text-color);
}

.progress-item .guide-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.progress-item .guide-link:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

.progress-item .progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--secondary-btn-background);
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-item .progress-fill {
    height: 100%;
    background-image: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.progress-item .status-completed {
    color: var(--success-color);
    font-weight: 600;
}

.progress-item .status-inprogress {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-item .status-notstarted {
    color: var(--text-color);
    opacity: 0.6;
}

.no-progress {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-color);
    opacity: 0.7;
}

.no-progress h3 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.no-progress p {
    margin: 0 0 20px 0;
    font-size: 1rem;
}

/* Ensure table headers are visible on larger screens */
@media (min-width: 769px) {
    .table thead {
        display: table-header-group !important;
    }

    .table,
    .table tbody,
    .table tr {
        /* display: table !important; */
        width: 100%;
    }

    .table tr {
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .responsive-table-cell {
        border-bottom: 1px solid var(--border-color) !important;
        padding: 12px 15px !important;
        position: static !important;
        text-align: left !important;
        padding-top: 12px !important;
    }

    .responsive-table-cell::before {
        display: none !important;
    }
}

/* Action Button Styles */
.guide-actions .btn-icon {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-right: 5px;
}

.guide-actions .btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.guide-actions .btn-icon:hover::before {
    width: 100%;
    height: 100%;
}

.guide-actions .btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.guide-actions .btn-icon:active {
    transform: scale(0.95);
}

/* Edit Button - Blue theme */
.guide-actions .btn-icon.edit-guide-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.guide-actions .btn-icon.edit-guide-btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* Delete Button - Red theme */
.guide-actions .btn-icon.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

.guide-actions .btn-icon.btn-danger:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e74c3c 100%);
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
    color: #fff;
}

/* Publish/Private Button - Green theme */
.guide-actions .btn-icon.btn-info {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(81, 207, 102, 0.3);
}

.guide-actions .btn-icon.btn-info:hover {
    background: linear-gradient(135deg, #40c057 0%, #2f9e44 100%);
    box-shadow: 0 4px 20px rgba(81, 207, 102, 0.4);
    color: #fff;
}

/* Make Draft Button - Orange theme */
.guide-actions .btn-icon.btn-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 212, 59, 0.3);
}

.guide-actions .btn-icon.btn-warning:hover {
    background: linear-gradient(135deg, #fab005 0%, #f59f00 100%);
    box-shadow: 0 4px 20px rgba(255, 212, 59, 0.4);
    color: #fff;
}

/* Success Button - Emerald theme */
.guide-actions .btn-icon.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.guide-actions .btn-icon.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    color: #fff;
}

/* Primary Button - Purple theme */
.guide-actions .btn-icon.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
}

.guide-actions .btn-icon.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    color: #fff;
}

/* Icon animations */
.guide-actions .btn-icon i {
    transition: transform 0.3s ease;
    z-index: 1;
    position: relative;
}

.guide-actions .btn-icon:hover i {
    transform: scale(1.1);
}

/* Specific icon colors for better visibility */
.guide-actions .btn-icon.edit-guide-btn i,
.guide-actions .btn-icon.btn-danger i,
.guide-actions .btn-icon.btn-info i,
.guide-actions .btn-icon.btn-warning i,
.guide-actions .btn-icon.btn-success i,
.guide-actions .btn-icon.btn-primary i {
    color: #fff;
}

/* User Dashboard Progress Styles */
.progress-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-background);
}

.progress-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-link {
    color: var(--primary-color);
    text-decoration: none;
    flex: 1;
}

.guide-link:hover {
    text-decoration: underline;
}

.completed-icon {
    color: #28a745;
    font-size: 1.2rem;
    animation: checkmarkPulse 2s ease-in-out;
}

@keyframes checkmarkPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-hover));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.status-completed {
    color: #28a745;
    font-weight: 600;
}

.status-in_progress {
    color: #ffc107;
    font-weight: 500;
}

.status-not_started {
    color: #6c757d;
}

.status-completed i,
.status-in_progress i,
.status-not_started i {
    margin-right: 5px;
}

.status-completed i.fa-trophy {
    color: #ffd700;
}

.status-in_progress i.fa-play-circle {
    color: #007bff;
}

.status-not_started i.fa-circle {
    color: #6c757d;
}

/* Verified Badge Styles */
.verified-badge {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.verified-badge-small {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.verified-creator-badge {
    background: linear-gradient(135deg, #ff4bda, #ff9a4b) !important;
    color: white !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-top: 10px !important;
}

.verified-creator-badge img {
    width: 20px !important;
    height: 20px !important;
    filter: brightness(0) invert(1);
}

/* Guide Layout Styles */
.guide-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.guide-carousel {
    margin-top: 30px;
}

.guide-steps.stacked-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.step-card.current-step {
    box-shadow: 0 8px 25px var(--shadow-color);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.step-card:not(.current-step) {
    opacity: 0.8;
}

.step-header {
    /* background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover)); */
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.step-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.step-content {
    padding: 25px;
    background: var(--card-background);
}

.content-block {
    margin-bottom: 20px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-text p {
    line-height: 1.6;
    margin: 0;
    color: var(--text-color);
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

.content-code {
    position: relative;
    background: var(--form-control-background);
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    overflow: hidden;
}

.content-code pre {
    margin: 0;
    padding: 15px;
    overflow-x: auto;
}

.content-code .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.content-code .copy-btn:hover {
    opacity: 1;
}

.step-navigation {
    margin-top: 25px !important;
    padding-top: 20px !important;
    border-top: 1px solid var(--border-color) !important;
}

.step-navigation .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step-navigation .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

/* Rating Card Styles */


.rating-card .step-content {
    text-align: center;
}

.guide-creator-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.creator-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.creator-details {
    flex: 1;
    text-align: left;
}

.creator-details p {
    margin: 0 0 10px 0;
    font-weight: 500;
    color: var(--text-color);
}

.guide-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.stars i {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.3s ease;
}



.rating-message {
    margin-top: 15px;
    font-weight: 500;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .guide-container {
        padding: 15px;
    }

    .step-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-content {
        padding: 20px;
    }

    .guide-creator-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .guide-stats {
        justify-content: center;
    }

    .step-navigation .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Private Share Modal Styles */
.private-share-modal .modal-content {
    max-width: 500px;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
}

.private-share-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.private-share-modal .modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.private-share-modal .modal-header .close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.private-share-modal .modal-header .close-button:hover {
    opacity: 1;
}

.private-share-modal .modal-body {
    padding: 30px;
}

.private-share-modal .form-group {
    margin-bottom: 25px;
}

.private-share-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.private-share-modal .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--form-control-border);
    border-radius: 10px;
    background-color: var(--form-control-background);
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.private-share-modal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 218, 0.1);
    outline: none;
}

.private-share-modal .form-control::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

.private-share-modal .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.private-share-modal .form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.private-share-modal .checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.private-share-modal .checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.private-share-modal .checkbox-group label {
    margin: 0;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
}

.private-share-modal .modal-footer {
    padding: 20px 30px;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.private-share-modal .btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-width: 100px;
}

.private-share-modal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 75, 218, 0.3);
}

.private-share-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 75, 218, 0.4);
}

.private-share-modal .btn-secondary {
    background-color: var(--secondary-btn-background);
    color: var(--secondary-btn-color);
    border: 2px solid var(--border-color);
}

.private-share-modal .btn-secondary:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

/* Private Share Management Modal Styles */
.private-share-management-modal .modal-content {
    max-width: 700px;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
}

.private-share-management-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.private-share-management-modal .modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.private-share-management-modal .modal-header .close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.private-share-management-modal .modal-header .close-button:hover {
    opacity: 1;
}

.private-share-management-modal .modal-body {
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
}

.private-share-list {
    margin-top: 20px;
}

.private-share-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.private-share-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.private-share-info {
    flex: 1;
}

.private-share-info .recipient-email {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.private-share-info .share-details {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 5px;
}

.private-share-info .share-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.private-share-info .share-status.active {
    background-color: #d4edda;
    color: #155724;
}

.private-share-info .share-status.expired {
    background-color: #f8d7da;
    color: #721c24;
}

.private-share-info .share-status.revoked {
    background-color: #fff3cd;
    color: #856404;
}

.private-share-actions {
    display: flex;
    gap: 10px;
}

.private-share-actions .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.private-share-actions .btn-icon.revoke-btn {
    background-color: #dc3545;
    color: white;
}

.private-share-actions .btn-icon.revoke-btn:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

.private-share-actions .btn-icon.copy-btn {
    background-color: var(--primary-color);
    color: white;
}

.private-share-actions .btn-icon.copy-btn:hover {
    background-color: var(--primary-color-hover);
    transform: scale(1.1);
}

.private-share-management-modal .modal-footer {
    padding: 20px 30px;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.private-share-management-modal .no-shares {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-color);
    opacity: 0.7;
}

.private-share-management-modal .no-shares i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    opacity: 0.5;
}

/* RTL Support for Private Share Modals */
body.rtl .private-share-modal .modal-header .close-button {
    left: 20px;
    right: auto;
}

body.rtl .private-share-management-modal .modal-header .close-button {
    left: 20px;
    right: auto;
}

body.rtl .private-share-item {
    direction: rtl;
}

body.rtl .private-share-actions {
    flex-direction: row-reverse;
}

/* Mobile Responsive for Private Share Modals */
@media (max-width: 768px) {

    .private-share-modal .modal-content,
    .private-share-management-modal .modal-content {
        margin: 20px;
        max-width: none;
        width: calc(100vw - 40px);
    }

    .private-share-modal .modal-header,
    .private-share-management-modal .modal-header {
        padding: 20px;
    }

    .private-share-modal .modal-body,
    .private-share-management-modal .modal-body {
        padding: 20px;
    }

    .private-share-modal .modal-footer,
    .private-share-management-modal .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .private-share-modal .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .private-share-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .private-share-actions {
        align-self: flex-end;
    }
}

/* PWA Styles */
#pwa-install-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 25px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px var(--shadow-color) !important;
    z-index: 1000 !important;
    display: none !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

#pwa-install-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px var(--shadow-color-hover) !important;
}

#pwa-install-btn:active {
    transform: scale(0.95) !important;
}

#network-status {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--primary-color) !important;
    color: white !important;
    text-align: center !important;
    padding: 8px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    z-index: 1001 !important;
    transform: translateY(-100%) !important;
    transition: transform 0.3s ease !important;
    box-shadow: 0 2px 10px var(--shadow-color) !important;
}

/* PWA offline indicator */
.offline-indicator {
    position: fixed;
    top: 60px;
    right: 20px;
    background: var(--error-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
    display: none;
}

.offline-indicator.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* PWA install prompt styles */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--card-background);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    z-index: 1002;
    display: none;
}

.pwa-install-prompt.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pwa-install-prompt h3 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
}

.pwa-install-prompt p {
    margin: 0 0 16px 0;
    font-size: 14px;
}

.pwa-install-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.pwa-install-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-install-actions .install-btn {
    background: var(--primary-gradient);
    color: white;
}

.pwa-install-actions .install-btn:hover {
    transform: scale(1.05);
}

.pwa-install-actions .cancel-btn {
    background: var(--secondary-btn-background);
    color: var(--secondary-btn-color);
}

.pwa-install-actions .cancel-btn:hover {
    background: #ddd;
}

/* PWA loading states */
.pwa-loading {
    position: relative;
    overflow: hidden;
}

.pwa-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 75, 218, 0.1), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Standalone app adjustments */
@media all and (display-mode: standalone) {
    body {
        padding-bottom: 20px;
        /* Prevent content from being hidden behind iOS home indicator */
    }

    .guide-progress {
        display: block !important;
        visibility: visible !important;
    }

    .progress-fill {
        min-width: 5px !important;
    }
}

/* Dark theme PWA adjustments */
.dark-theme #pwa-install-btn {
    box-shadow: 0 4px 15px rgba(255, 75, 218, 0.5) !important;
}

.dark-theme #network-status {
    box-shadow: 0 2px 10px rgba(255, 75, 218, 0.5) !important;
}

/* Mobile progress bar fix */
@media (max-width: 768px) {
    .guide-progress {
        display: block !important;
        visibility: visible !important;
    }

    .progress-fill {
        min-width: 5px !important;
    }

    .auth-buttons {
        display: none !important;
    }
}

/* Chat Interface Styles */
.chat-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
    background-color: var(--background-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.chat-sidebar {
    width: 350px;
    background-color: var(--card-background);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--background-color);
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-background);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    color: var(--text-color);
}

.unread-count {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Mobile-like scrollbar styling for conversations list */
.conversations-list::-webkit-scrollbar {
    width: 6px;
}

.conversations-list::-webkit-scrollbar-track {
    background: transparent;
}

.conversations-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.conversations-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.conversation-item:hover {
    background-color: var(--form-control-background);
    border-color: var(--border-color);
}

.conversation-item.unread {
    background-color: rgba(255, 75, 218, 0.05);
    border-color: var(--primary-color);
}

.conversation-avatar {
    margin-right: 15px;
}

.avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.conversation-status {
    display: flex;
    align-items: center;
    margin-top: 2px;
    font-size: 0.75rem;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-indicator.active {
    background-color: #28a745;
    box-shadow: 0 0 4px rgba(40, 167, 69, 0.4);
}

.status-indicator.inactive {
    background-color: #6c757d;
}

.status-text {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.conversation-status .status-text.active {
    color: #28a745;
}

.conversation-status .status-text.inactive {
    color: #6c757d;
}

.unread-badge {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: auto;
}

.new-chat-btn {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.chat-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
}

.placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-content h3 {
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.new-chat-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.new-chat-form .chat-header {
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: var(--form-control-background);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: var(--background-color);
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 75, 218, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Mobile-like scrollbar styling for chat messages */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    transition: all 0.2s ease;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.no-messages {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.no-messages-content {
    text-align: center;
    color: var(--text-muted);
}

.no-messages-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-messages-content h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.message-wrapper {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-end;
}

.message-wrapper.sent {
    justify-content: flex-end;
}

.message-wrapper.received {
    justify-content: flex-start;
}

.message-avatar {
    margin: 0 10px;
}

.message-wrapper.sent .message-avatar {
    order: 2;
}

.message-bubble {
    max-width: 60%;
    min-width: 120px;
}

.message-content {
    background-color: var(--card-background);
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 4px;
}

.message-wrapper.sent .message-content {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.message-wrapper.received .message-content {
    background-color: var(--card-background);
    color: var(--text-color);
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0 16px;
}

.message-wrapper.sent .message-time {
    text-align: right;
    color: var(--text-muted);
}

/* Chat Input */
.chat-input {
    padding: 20px;
    background-color: var(--card-background);
    border-top: 1px solid var(--border-color);
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 5px;
}

.message-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    min-height: 20px;
    max-height: 100px;
    overflow-y: auto;
    color: var(--text-color);
}

.message-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.send-btn:hover {
    background-color: var(--primary-hover);
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Chat User Info */
.chat-user-info {
    display: flex;
    align-items: center;
}

.chat-user-info .avatar-placeholder {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.user-details h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
}

.user-status {
    color: var(--success-color);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.user-status .status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
    transition: all 0.3s ease;
}

.user-status .status-indicator.active {
    background-color: #28a745;
    box-shadow: 0 0 4px rgba(40, 167, 69, 0.4);
}

.user-status .status-indicator.inactive {
    background-color: #6c757d;
}

.user-status .status-text {
    transition: color 0.3s ease;
}

.user-status .status-text.active {
    color: #28a745;
}

.user-status .status-text.inactive {
    color: #6c757d;
}

/* Current Conversation */
.current-conversation {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    margin: 10px;
    border-radius: 12px;
}

.current-conversation .avatar-placeholder {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.current-conversation .conversation-name {
    color: white;
}

.conversation-status {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Back Button */
.back-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.back-btn:hover {
    background-color: var(--form-control-background);
}

/* Loading and Error States */
.chat-loading,
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error-message {
    color: var(--error-color);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.error-message h4 {
    margin: 0 0 10px 0;
    color: var(--error-color);
}

.error-message p {
    margin: 0 0 20px 0;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background-color: var(--success-color);
}

.toast-error {
    background-color: var(--error-color);
}

.toast-info {
    background-color: var(--primary-color);
}

/* Icon Classes */
.icon-plus::before {
    content: "+";
}

.icon-arrow-left::before {
    content: "←";
}

.icon-send::before {
    content: "➤";
}

/* Notifications Styles */
.notifications-list {
    margin-top: 20px;
}

.notification-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: background-color 0.3s;
}

.notification-item.unread {
    border-left: 4px solid var(--primary-color);
    background-color: rgba(255, 75, 218, 0.05);
}

.notification-item.read {
    opacity: 0.7;
}

/* Social Links Styles */
.social-links-container {
    display: flex;
    gap: 30px;
}

.current-links {
    flex: 1;
}

.social-link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.link-info {
    flex: 1;
}

.link-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.link-info a:hover {
    text-decoration: underline;
}

.add-link-form {
    flex: 1;
}

/* Private Shares Styles */
.private-shares-container {
    display: flex;
    gap: 30px;
}

.current-shares {
    flex: 1;
}

.private-share-item {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.share-info p {
    margin: 5px 0;
}

.share-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.create-share-form {
    flex: 1;
}

/* Responsive adjustments for new features */
@media (max-width: 768px) {

    .messages-container,
    .social-links-container,
    .private-shares-container {
        flex-direction: column;
    }

    .social-link-item,
    .private-share-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-actions {
        margin-top: 15px;
        flex-direction: column;
    }
}

/* Notification Dropdown Styles */
.notification-container {
    position: relative;
    display: inline-block;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    margin-top: 8px;
    transform: translateX(0);
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--header-background);
    color: white;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.notification-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--background-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(255, 75, 218, 0.05);
    border-left: 3px solid var(--primary-color);
}

.notification-item .notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.notification-item .notification-message {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.notification-item .notification-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.25rem;
}

.notification-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: var(--background-color);
}

.notification-footer .btn {
    width: 100%;
}

/* Dark theme adjustments */
.dark-theme .notification-dropdown {
    background: var(--card-background);
    border-color: var(--border-color);
}

.dark-theme .notification-item:hover {
    background: var(--background-color);
}

.dark-theme .notification-item.unread {
    background: rgba(255, 75, 218, 0.1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 280px;
        right: -20px;
        left: auto;
    }

    body.rtl .notification-dropdown {
        right: auto;
        left: -20px;
    }
}

/* RTL Support for Notification Dropdown */
body.rtl .notification-dropdown {
    right: auto;
    left: 0;
    transform: none;
}

body.rtl .notification-item.unread {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

/* Ensure dropdown doesn't overflow in RTL */
body.rtl .notification-container {
    position: relative;
}

/* ===========================================
   MOBILE-FRIENDLY CHAT/MESSAGES STYLES
   =========================================== */

/* Chat Container - Mobile First */
.chat-container {
    display: flex;
    height: calc(100vh - 80px);
    /* Account for header */
    background: var(--background-color, #f8f9fa);
}

/* Chat Sidebar */
.chat-sidebar {
    width: 320px;
    background: var(--card-background, #fff);
    border-right: 1px solid var(--border-color, #e9ecef);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e9ecef);
    background: var(--card-background, #fff);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color, #333);
}

.unread-count {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Conversations List */
.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color, #f8f9fa);
    position: relative;
}

.conversation-item:hover,
.conversation-item.active {
    background: var(--hover-background, #f8f9fa);
}

.conversation-item.unread {
    background: rgba(220, 53, 69, 0.05);
    border-left: 3px solid #dc3545;
}

.conversation-avatar {
    margin-right: 12px;
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color, #007bff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    color: var(--text-color, #333);
    margin-bottom: 4px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    font-size: 13px;
    color: var(--text-muted, #666);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.conversation-time {
    font-size: 11px;
    color: var(--text-muted, #999);
}

.unread-badge {
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

/* New Chat Button */
.new-chat-btn {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color, #e9ecef);
    background: var(--card-background, #fff);
}

.new-chat-btn .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Chat Main Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--background-color, #f8f9fa);
    position: relative;
}

/* Chat Placeholder */
.chat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
}

.placeholder-content h3 {
    color: var(--text-color, #333);
    margin: 16px 0 8px 0;
    font-size: 20px;
}

.placeholder-content p {
    color: var(--text-muted, #666);
    margin: 0;
    font-size: 14px;
}

/* Messages Area */
#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-wrapper {
    display: flex;
    margin-bottom: 16px;
    max-width: 70%;
}

.message-wrapper.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-wrapper.received {
    align-self: flex-start;
}

.message-avatar {
    margin: 0 8px;
    flex-shrink: 0;
}

.message-avatar .avatar-placeholder {
    width: 36px;
    height: 36px;
    font-size: 14px;
}

.message-bubble {
    background: var(--card-background, #fff);
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    word-wrap: break-word;
}

.message-wrapper.sent .message-bubble {
    background: var(--primary-color, #007bff);
    color: white;
}

.message-content {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.message-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.message-time {
    font-size: 11px;
    color: var(--text-muted, #999);
    margin-top: 4px;
    text-align: right;
}

.message-wrapper.sent .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Message Status */
.message-status {
    font-size: 12px;
    opacity: 0.7;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
}

.message-status.sent {
    color: #666;
}

.message-status.read {
    color: #28a745;
}

/* Message Input Area */
.message-input-area {
    padding: 16px 20px;
    background: var(--card-background, #fff);
    border-top: 1px solid var(--border-color, #e9ecef);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.message-input-container {
    flex: 1;
    position: relative;
}

#message-input {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 22px;
    resize: none;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s ease;
    -ms-overflow-style: none;
    /* Hide scrollbar on IE/Edge */
    scrollbar-width: none;
    /* Hide scrollbar on Firefox */
}

/* Invisible scrollbar for message input on all devices */
#message-input::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar on Webkit browsers */
}

#message-input:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-hover, #0056b3);
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile Toggle Button */
.mobile-chat-toggle {
    display: none;
    position: fixed;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
}

.mobile-chat-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.mobile-chat-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.mobile-chat-toggle i {
    font-size: 18px;
    line-height: 1;
}

/* Pulse animation for chat button */
@keyframes chatPulse {
    0% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(0, 123, 255, 0.4);
    }

    50% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 8px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Disable pulse animation for the mobile chat toggle — it interferes with touch/click on some devices */
.mobile-chat-toggle {
    animation: none !important;
    -webkit-animation: none !important;
}

.mobile-chat-toggle:hover {
    transform: scale(1.1);
}

/* ===========================================
   MOBILE RESPONSIVE STYLES
   =========================================== */

@media (max-width: 768px) {

    /* Chat Container Mobile Layout */
    .chat-container {
        position: relative;
        height: calc(90vh - 60px);
    }

    /* Mobile Toggle Button */
    .mobile-chat-toggle {
        display: flex;
    }

    /* On touch devices avoid transform shifts which can block tap/click targets */
    .mobile-chat-toggle,
    .mobile-chat-toggle i {
        transform: translateY(-50%) !important;
        -webkit-transform: translateY(-50%) !important;
        transition: none !important;
    }

    /* Sidebar Mobile Behavior */
    .chat-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 85vh;
        width: 280px;
        z-index: 1000;
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    }

    .chat-sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Overlay for mobile sidebar */
    .chat-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .chat-sidebar.mobile-open::before {
        opacity: 1;
        visibility: visible;
    }

    /* Chat Header Mobile */
    .chat-header {
        padding: 12px 16px;
        min-height: 50px;
    }

    .chat-header h3 {
        font-size: 16px;
    }

    /* Conversation Items Mobile */
    .conversation-item {
        padding: 12px 16px;
    }

    .conversation-avatar .avatar-placeholder {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .conversation-name {
        font-size: 14px;
    }

    .conversation-preview {
        font-size: 13px;
        max-width: 150px;
    }

    /* Conversation Status Mobile */
    .conversation-status {
        font-size: 0.7rem;
    }

    .status-indicator {
        width: 5px;
        height: 5px;
        margin-right: 3px;
    }

    /* Chat Main Mobile */
    .chat-main {
        width: 100%;
    }

    /* Messages Area Mobile */
    #chat-messages {
        padding: 16px;
        gap: 8px;
    }

    .message-wrapper {
        max-width: 85%;
        margin-bottom: 12px;
    }

    .message-bubble {
        padding: 10px 14px;
        border-radius: 16px;
    }

    .message-text {
        font-size: 14px;
    }

    .message-time {
        font-size: 10px;
        margin-top: 2px;
    }

    /* User Status Mobile */
    .user-status {
        font-size: 0.75rem;
    }

    .user-status .status-indicator {
        width: 5px;
        height: 5px;
        margin-right: 3px;
    }

    /* Message Input Mobile */
    .message-input-area {
        padding: 12px 16px;
        gap: 8px;
    }

    #message-input {
        min-height: 40px;
        padding: 10px 14px;
        border-radius: 20px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .send-btn {
        width: 40px;
        height: 40px;
    }

    /* Placeholder Mobile */
    .chat-placeholder {
        padding: 20px 16px;
    }

    .placeholder-content h3 {
        font-size: 18px;
        margin: 12px 0 6px 0;
    }

    .placeholder-content p {
        font-size: 14px;
    }

    /* New Chat Button Mobile */
    .new-chat-btn {
        padding: 12px 16px;
    }

    .new-chat-btn .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

}

@media (max-width: 480px) {

    /* Extra Small Screens */
    .chat-sidebar {
        width: 260px;
    }

    .conversation-item {
        padding: 10px 12px;
    }

    .conversation-avatar .avatar-placeholder {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .conversation-name {
        font-size: 13px;
    }

    .conversation-preview {
        font-size: 12px;
        max-width: 120px;
    }

    .message-wrapper {
        max-width: 90%;
    }

    .message-bubble {
        padding: 8px 12px;
    }

    .message-text {
        font-size: 13px;
    }

    .chat-placeholder {
        padding: 16px 12px;
    }

    .placeholder-content h3 {
        font-size: 16px;
    }

    .placeholder-content p {
        font-size: 13px;
    }

    .mobile-chat-toggle {
        width: 44px;
        height: 44px;
        font-size: 18px;
        left: 12px;
    }
}

/* ===========================================
   MODAL MOBILE STYLES
   =========================================== */

/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-background, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 30px 15px;
    border-bottom: 1px solid var(--border-color, #eee);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color, #333);
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color, #666);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: var(--border-color, #f0f0f0);
    color: var(--text-color, #333);
}

.modal-body {
    padding: 20px 30px;
}

.modal-footer {
    padding: 15px 30px 25px;
    border-top: 1px solid var(--border-color, #eee);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
        margin: 10px;
        border-radius: 8px;
    }

    .modal-header {
        padding: 16px 20px 12px;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .modal-close {
        font-size: 24px;
        width: 28px;
        height: 28px;
    }

    .modal-body {
        padding: 16px 20px;
    }

    .modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }

    .modal {
        align-items: flex-end;
    }

    .modal.show {
        align-items: flex-end;
    }

    .modal-content {
        animation: slideUp 0.3s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }
}

/* ===========================================
   FORM ELEMENTS MOBILE STYLES
   =========================================== */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color, #333);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    font-size: 16px;
    /* Prevents zoom on iOS */
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s ease;
    background: var(--card-background, #fff);
    color: var(--text-color, #333);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Mobile Form Styles */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 14px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 4px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 16px;
        border-radius: 6px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 8px;
        margin-top: 16px;
    }

    .form-actions .btn {
        width: 100%;
        padding: 14px;
        font-size: 16px;
    }
}

/* ===========================================
   AUTOCOMPLETE MOBILE STYLES
   =========================================== */

.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-background, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10001;
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #eee);
    display: flex;
    align-items: center;
    transition: background-color 0.2s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: var(--hover-background, #f8f9fa);
}

.autocomplete-item.selected {
    background-color: var(--primary-color, #007bff);
    color: white;
}

.autocomplete-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color, #007bff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.autocomplete-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-name {
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-email {
    font-size: 12px;
    color: var(--text-muted, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-loading,
.autocomplete-no-results {
    padding: 16px;
    text-align: center;
    color: var(--text-muted, #666);
    font-size: 14px;
}

/* Mobile Autocomplete Styles */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        position: absolute !important;
        /* Override fixed positioning */
        top: 100% !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 200px !important;
        /* Limit height within modal */
        border-radius: 8px !important;
        border: 1px solid var(--border-color, #ddd) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        z-index: 10002 !important;
        /* Higher than modal */
        background: var(--card-background, #fff) !important;
    }

    .autocomplete-item {
        padding: 14px 16px;
        min-height: 44px;
        /* Touch-friendly */
    }

    .autocomplete-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .autocomplete-name {
        font-size: 15px;
    }

    .autocomplete-email {
        font-size: 13px;
    }

    /* Ensure autocomplete works within modal */
    .modal .autocomplete-container {
        position: relative;
    }

    .modal .autocomplete-dropdown {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        max-height: 150px !important;
        /* Smaller within modal */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ===========================================
   NOTIFICATION MOBILE STYLES
   =========================================== */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-info {
    background: #17a2b8;
}

/* Mobile Notification Styles */
@media (max-width: 768px) {
    .notification {
        top: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
        transform: translateY(-100px);
    }

    .notification.show {
        transform: translateY(0);
    }

    .notification-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .notification-close {
        align-self: flex-end;
        margin-left: 0;
        margin-top: -4px;
    }
}

/* ===========================================
   LOADING SPINNER MOBILE STYLES
   =========================================== */

.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.small {
    width: 16px;
    height: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Loading Styles */
@media (max-width: 768px) {
    .loading-spinner.small {
        width: 18px;
        height: 18px;
    }
}

/* ===========================================
   FONT AWESOME ICON STYLING
   =========================================== */

/* Ensure Font Awesome icons are properly styled */
.fas,
.far,
.fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900;
}

/* Send button icon styling */
.send-btn i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.send-btn:hover i {
    transform: translateX(2px);
}

/* ===========================================
   MOBILE FOOTER NAVIGATION
   =========================================== */

.mobile-footer-nav {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 12px 20px;
    max-width: 90%;
    width: auto;
}

.mobile-nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8a8a8a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px;
    border-radius: 50%;
    min-width: 50px;
    min-height: 50px;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    color: var(--text-color);
    background: var(--primary-gradient);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mobile-nav-item i {
    font-size: 18px;
    margin-bottom: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: inherit;
}

.mobile-nav-item:hover i {
    transform: scale(1.1);
}

.mobile-nav-item .nav-label {
    font-size: 9px;
    font-weight: 500;
    text-align: center;
    line-height: 1;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
}

.mobile-nav-item:hover .nav-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* .mobile-nav-center {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
    min-width: 60px;
    min-height: 60px;
    margin: 0 12px;
    position: relative;
    animation: centerPulse 3s ease-in-out infinite;
}

.mobile-nav-center::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.mobile-nav-center:hover {
    transform: scale(1.15) translateY(-6px);
    box-shadow: 0 16px 50px rgba(102, 126, 234, 0.6);
}

.mobile-nav-center:hover::before {
    opacity: 0.7;
} */

/* .mobile-nav-center i {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    color: inherit;
} */

/* Enhanced active state for center button */
/* .mobile-nav-center.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 16px 50px rgba(255, 107, 107, 0.6);
    animation: centerActivePulse 2s ease-in-out infinite;
}

.mobile-nav-center.active::before {
    opacity: 0.8;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
} */

@keyframes centerPulse {

    0%,
    100% {
        transform: scale(1.1);
        box-shadow: 0 12px 40px rgba(102, 126, 234, 0.5);
    }

    50% {
        transform: scale(1.12);
        box-shadow: 0 14px 45px rgba(102, 126, 234, 0.6);
    }
}

@keyframes centerActivePulse {

    0%,
    100% {
        transform: scale(1.1);
        box-shadow: 0 16px 50px rgba(255, 107, 107, 0.6);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 20px 60px rgba(255, 107, 107, 0.8);
    }
}

/* Special highlight for center button */
/* .mobile-nav-center.center-highlight {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 16px 50px rgba(255, 107, 107, 0.6);
} */

/* .mobile-nav-center.center-highlight::before {
    opacity: 0.8;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
} */

/* Mobile-specific styles */
@media (max-width: 768px) {
    .mobile-footer-nav {
        display: block;
        /* Show only on mobile */
        bottom: 20px;
        padding: 12px 16px;
    }

    /* Adjust main content to account for floating footer */
    main {
        /* padding-bottom: 120px; */
        /* Increased padding for floating nav */
    }

    .mobile-nav-item {
        min-width: 48px;
        min-height: 48px;
        padding: 10px;
    }

    .mobile-nav-center {
        min-width: 56px;
        min-height: 56px;
        margin: 0 8px;
    }

    .mobile-nav-item .nav-label {
        font-size: 8px;
        bottom: -18px;
    }

    .mobile-nav-center .nav-label {
        font-size: 9px;
        bottom: -20px;
    }
}

.container {
    padding-bottom: 20px;
}

/* Hide regular footer on mobile when footer nav is present */
footer {
    display: none;
}

/* Ensure footer nav stays above other content */
.mobile-footer-nav {
    z-index: 9999;
}

/* Adjust modal positioning for floating footer nav */
.modal {
    bottom: 120px;
    /* Leave space for floating footer nav */
    /* max-height: calc(100vh - 120px); */
}

/* Adjust autocomplete dropdown positioning */
.autocomplete-dropdown {
    bottom: 120px;
    max-height: calc(60vh - 120px);
}


/* Very small mobile devices */
@media (max-width: 360px) {
    .mobile-footer-nav {
        padding: 10px 12px;
        bottom: 15px;
    }

    .mobile-nav-container {
        gap: 4px;
    }

    .mobile-nav-item {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }

    .mobile-nav-center {
        min-width: 52px;
        min-height: 52px;
        margin: 0 6px;
    }

    .mobile-nav-item i {
        font-size: 16px;
    }

    .mobile-nav-center i {
        font-size: 20px;
    }
}

/* Dark theme support for floating navigation */
.dark-theme .mobile-footer-nav {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dark-theme .mobile-nav-item {
    color: rgba(255, 255, 255, 0.7);
}

.dark-theme .mobile-nav-item:hover,
.dark-theme .mobile-nav-item:active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme .mobile-nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.dark-theme .mobile-nav-item .nav-label {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* Small mobile devices adjustments */
@media (max-width: 480px) {
    .mobile-footer-nav {
        padding: 10px 14px;
        bottom: 15px;
    }

    main {
        /* padding-bottom: 100px; */
    }

    .modal {
        bottom: 100px;
        /* max-height: calc(100vh - 100px); */
    }

    .autocomplete-dropdown {
        bottom: 100px;
        max-height: calc(60vh - 100px);
    }
}

/* ===========================================
   MOBILE HEADER NAVIGATION HIDING
   =========================================== */

@media (max-width: 768px) {

    /* Hide navigation items from header on mobile */
    .nav-icon-link[href="/messages"],
    .notification-container,
    #theme-switcher.nav-icon-link {
        display: none !important;
    }

    /* Keep mobile menu button visible on mobile */
    #mobile-menu-btn.btn-icon {
        display: block !important;
    }

    /* Hide language switcher on mobile as well */
    .language-switcher {
        display: none !important;
    }

    /* Adjust header layout for mobile */
    .header-nav {
        justify-content: space-between;
    }

    .header-nav .logo {
        margin: 0;
    }
}

/* ===========================================
   END MOBILE HEADER NAVIGATION HIDING
   =========================================== */

/* Notification badges for floating navigation */
.mobile-nav-item .notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 8px;
    font-weight: bold;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    animation: notificationPulse 2s infinite;
    z-index: 1;
}

.mobile-nav-center .notification-badge {
    top: 4px;
    right: 4px;
    padding: 3px 7px;
    font-size: 9px;
    min-width: 18px;
    box-shadow: 0 3px 12px rgba(255, 71, 87, 0.5);
}

@keyframes notificationPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(255, 71, 87, 0.6);
    }
}

/* ===========================================
   MOBILE SIDE MENU
   =========================================== */

.mobile-side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-side-menu.active {
    display: block;
    opacity: 1;
}

.mobile-side-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.mobile-side-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100%;
    background: var(--card-background, #fff);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid var(--border-color, #e0e0e0);
}

.mobile-side-menu.active .mobile-side-menu-content {
    transform: translateX(0);
}

/* RTL Support for Mobile Side Menu */
.rtl .mobile-side-menu-content {
    right: auto;
    left: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    border-left: none;
    border-right: 1px solid var(--border-color, #e0e0e0);
}

.rtl .mobile-side-menu.active .mobile-side-menu-content {
    transform: translateX(0);
}

.mobile-side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    background: var(--background-color, #f8f9fa);
}

/* RTL Support for Mobile Side Menu Header */
.rtl .mobile-side-menu-header {
    flex-direction: row-reverse;
}

.mobile-side-menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--text-color, #333);
}

.menu-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.mobile-side-menu-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-color, #333);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.mobile-side-menu-close:hover {
    background: var(--hover-background, #f0f0f0);
    color: var(--primary-color, #007bff);
}

.mobile-side-menu-body {
    padding: 20px 0;
}

.mobile-side-menu-nav {
    display: flex;
    flex-direction: column;
}

.mobile-side-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-color, #333);
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    position: relative;
}

/* RTL Support for Mobile Side Menu Items */
.rtl .mobile-side-menu-item {
    text-align: right;
    flex-direction: row-reverse;
}

.mobile-side-menu-item:hover,
.mobile-side-menu-item:active {
    background: var(--hover-background, #f8f9fa);
    color: var(--primary-color, #007bff);
    text-decoration: none;
}

.mobile-side-menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: var(--text-muted, #666);
    transition: color 0.2s ease;
}

.mobile-side-menu-item:hover i,
.mobile-side-menu-item:active i {
    color: var(--primary-color, #007bff);
}

.mobile-side-menu-item .unread-indicator,
.mobile-side-menu-item .notification-indicator {
    margin-left: auto;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--primary-color, #007bff);
    color: white;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-side-menu-divider {
    height: 1px;
    background: var(--border-color, #e0e0e0);
    margin: 12px 20px;
}

.mobile-side-menu-language {
    padding: 8px 20px 16px;
}

/* RTL Support for Mobile Side Menu Language Section */
.rtl .mobile-side-menu-language {
    text-align: right;
}

.logout-item {
    color: var(--danger-color, #dc3545) !important;
}

.logout-item:hover,
.logout-item:active {
    background: rgba(220, 53, 69, 0.1) !important;
    color: var(--danger-color, #dc3545) !important;
}

.mobile-side-menu-profile {
    padding: 20px;
    background: var(--background-color, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.mobile-side-menu-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* RTL Support for Mobile Side Menu User Profile */
.rtl .mobile-side-menu-user {
    flex-direction: row-reverse;
}

.mobile-side-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color, #007bff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.mobile-side-menu-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.mobile-side-menu-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-side-menu-user-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color, #333);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-side-menu-user-role {
    font-size: 12px;
    color: var(--text-muted, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Role-specific colors */
.mobile-side-menu-user-role[data-role="admin"] {
    color: var(--danger-color, #dc3545);
}

.mobile-side-menu-user-role[data-role="creator"] {
    color: var(--success-color, #28a745);
}

.mobile-side-menu-user-role[data-role="user"] {
    color: var(--primary-color, #007bff);
}

/* Ensure side menu appears above footer nav */
.mobile-side-menu {
    z-index: 10001;
    /* Higher than footer nav (9999) */
}

/* Hide footer nav when side menu is active */
.mobile-side-menu.active~.mobile-footer-nav {
    display: none !important;
}

/* Mobile side menu animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

/* RTL Support for Mobile Side Menu */
[dir="rtl"] .mobile-side-menu-content {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color, #e0e0e0);
    transform: translateX(-100%);
}

[dir="rtl"] .mobile-side-menu.active .mobile-side-menu-content {
    transform: translateX(0);
}

[dir="rtl"] .mobile-side-menu-item {
    text-align: right;
}

/* ===========================================
   END MOBILE SIDE MENU
   =========================================== */

/* New message button icon */
.btn i.fas.fa-plus {
    margin-right: 6px;
}

/* Mobile chat toggle icon animation */
.mobile-chat-toggle i {
    transition: transform 0.3s ease;
}

.mobile-chat-toggle:hover i.fas.fa-comments {
    transform: scale(1.1);
}

.mobile-chat-toggle:hover i.fas.fa-times {
    transform: rotate(180deg);
}

/* Additional mobile breakpoint to ensure mobile menu button shows */
@media (max-width: 768px) {
    #mobile-menu-btn {
        display: block !important;
        z-index: 1001;
        position: relative;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ===========================================
   SOCIAL LINKS STYLES
   =========================================== */

.social-links-section {
    margin-bottom: 30px;
}

.social-links-section h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-links-section h3::before {
    content: '🔗';
    font-size: 1.2rem;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.social-link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.social-link-item:hover .social-icon {
    transform: scale(1.1);
}

.social-icon.facebook {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.social-icon.twitter {
    background: linear-gradient(135deg, #1da1f2, #42a5f5);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #e1306c, #f56040, #f77737, #fcaf45);
}

.social-icon.linkedin {
    background: linear-gradient(135deg, #0077b5, #42a5f5);
}

.social-icon.youtube {
    background: linear-gradient(135deg, #ff0000, #ff4444);
}

.social-icon.tiktok {
    background: linear-gradient(135deg, #000000, #333333);
}

.social-icon.other {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
}

.social-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--form-control-border);
    border-radius: 8px;
    background-color: var(--form-control-background);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.social-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 75, 218, 0.1);
    transform: scale(1.02);
}

.social-input::placeholder {
    color: var(--text-color);
    opacity: 0.5;
}

/* Mobile responsive for social links */
@media (max-width: 768px) {
    .social-links-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .social-link-item {
        padding: 12px;
        gap: 12px;
    }

    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .social-input {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* RTL Support for Social Links */
body.rtl .social-link-item {
    direction: rtl;
}

body.rtl .social-links-section h3::before {
    margin-left: 10px;
    margin-right: 0;
}

/* ===========================================
   END SOCIAL LINKS STYLES
   =========================================== */

/* ===========================================
   CREATOR PROFILE SOCIAL LINKS STYLES
   =========================================== */

.creator-social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.social-link-icon:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

/* .social-link-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    opacity: 0.8;
    transition: opacity 0.3s ease;
} */

.social-link-icon:hover::before {
    opacity: 1;
}

/* Platform-specific colors */
.social-link-icon[href*="facebook"],
.social-link-icon[href*="fb.com"] {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.social-link-icon[href*="twitter"],
.social-link-icon[href*="x.com"] {
background: linear-gradient(135deg, #000000, #333333);}

.social-link-icon[href*="instagram"] {
    background: linear-gradient(135deg, #e1306c, #f56040, #f77737, #fcaf45);
}

.social-link-icon[href*="linkedin"] {
    background: linear-gradient(135deg, #0077b5, #42a5f5);
}

.social-link-icon[href*="youtube"] {
    background: linear-gradient(135deg, #ff0000, #ff4444);
}

.social-link-icon[href*="tiktok"] {
    background: linear-gradient(135deg, #000000, #333333);
}

.social-link-icon:not([href*="facebook"]):not([href*="fb.com"]):not([href*="twitter"]):not([href*="x.com"]):not([href*="instagram"]):not([href*="linkedin"]):not([href*="youtube"]):not([href*="tiktok"]) {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-hover));
}

/* Mobile responsive for creator social links */
@media (max-width: 768px) {
    .creator-social-links {
        gap: 8px;
        justify-content: center;
        margin-top: 20px;
    }

    .social-link-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ===========================================
   END CREATOR PROFILE SOCIAL LINKS STYLES
   =========================================== */