/* START OF FILE static/css/styles.css */

/* --- Global Styles & Variables --- */
:root {
    --dark-bg: #06060f;
    --dark-bg-secondary: #0d1117;
    --primary-accent: #8b5cf6;
    --secondary-accent: #d946ef;
    --light-text: #f3f4f6;
    --medium-text: #9ca3af;
    --card-bg: #ffffff;
    --card-border: #1a1f2e;

    /* Elevation System */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);

    /* Standardized Radius */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 50px;

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
}

/* --- Accessibility: Focus Indicators --- */
:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
[role="tab"]:focus-visible {
    outline: 2px solid var(--primary-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.2s;
    border-radius: 0 0 8px 8px;
}
.skip-link:focus {
    transform: translateY(0);
}

body {
    font-family: 'Outfit', 'Assistant', sans-serif;
    line-height: 1.6;
    padding: 0;
    direction: rtl;
    text-align: right;
    background-color: var(--dark-bg);
    color: var(--light-text);
    margin: 0;
    position: relative;
}

/* Grid pattern overlay — Design B Glassmorphism */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* Glass utility classes — Design B */
.glass-panel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl, 24px);
    backdrop-filter: blur(20px);
}

.display-heading {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #8b5cf6 0%, #d946ef 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#app-initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--dark-bg);
    z-index: 2000;
    font-size: 1.2em;
    color: var(--light-text);
}


h2 {
    color: var(--light-text);
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 700;
}

label {
    display: inline-block;
    margin-bottom: 5px;
    min-width: 80px;
    font-weight: 600;
    color: #4b5563; /* Darker text for light cards */
}

input[type="email"],
input[type="password"],
input[type="file"] {
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db; /* Lighter border for inputs */
    border-radius: 6px;
    width: 280px;
    box-sizing: border-box;
    background-color: #f9fafb;
}

button {
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 50px; /* Rounded buttons */
    cursor: pointer;
    font-size: 0.8em;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: inline-flex; /* Ensures icon and text align nicely */
    align-items: center;
    justify-content: center;
    min-height: 44px; /* WCAG touch target minimum */
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
button:disabled {
    background: #4b5563; /* Dark gray for disabled */
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* --- Logged-in User Section --- */
#sticky-header-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 25px;
    background-color: var(--dark-bg-secondary);
    border-bottom: 1px solid var(--card-border);
}

.user-header .user-details-group {
    order: 3;
}
.user-header h1 {
    order: 2;
}
.user-header .header-actions {
    order: 1;
}

.user-header h1 {
    font-size: 1.8em;
    font-weight: 900;
    margin: 0;
    flex-grow: 1;
    text-align: center;
    color: white;
    border-bottom: none;
}

.user-header .user-details-group {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}

.user-header .user-details-group p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

#user-email {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 15ch;
}

#user-credits-display-container {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

.credits-label { display: none; }
#user-credits-value {
    color: var(--primary-accent);
    font-weight: 700;
    background: none;
    border: none;
    padding: 0;
}
#user-credits-value.credits-error {
    color: #ef4444;
}
#user-credits-value.credits-na {
    color: var(--medium-text);
}
#user-credits-value::before {
    content: '\f005'; /* FontAwesome star icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    color: #facc15;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Desktop - show language switcher in header-actions, hide in user-details */
.language-switcher-mobile {
    display: none;
}

.language-switcher-desktop {
    display: block;
}

/* Desktop - show credits inline in header-actions, hide mobile credits */
.credits-display-desktop {
    display: inline-block;
}

.credits-display-mobile {
    display: none;
}

#user-credits-value-mobile::before {
    content: '\f005'; /* FontAwesome star icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    color: #facc15;
}

/* Desktop - hide mobile logout, show desktop logout */
.logout-mobile {
    display: none;
}

.logout-desktop {
    display: inline-flex;
}

#logout-button,
#logout-button-desktop {
    background: var(--dark-bg);
    color: var(--medium-text);
    padding: 8px 16px;
    border: 1px solid var(--card-border);
    gap: 8px;
    border-radius: 50px;
    align-items: center;
}
#logout-button:hover,
#logout-button-desktop:hover {
    background-color: var(--card-border);
    color: white;
}

/* --- Tab Navigation Styles --- */
.tab-navigation {
    display: flex;
    justify-content: center;
    background-color: var(--dark-bg);
    padding: 0 20px;
    border-bottom: 1px solid var(--card-border);
    margin-top: -8px;
}

.tab-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
}

.tab-navigation a {
    display: block;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    color: var(--medium-text);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease, border-color 0.2s ease;
    border: none;
    border-bottom: 3px solid transparent;
}

.tab-navigation a:hover {
    color: white;
}
.tab-navigation a.active {
    color: white;
    font-weight: 700;
    border-bottom: 3px solid var(--primary-accent);
}

/* --- Tab Content Base Styles --- */
#tab-content-wrapper { padding: 0; position: relative; z-index: 1; }
#landing-section, #auth-section, #user-section { position: relative; z-index: 1; }
.tab-content { display: none; }
.tab-content.active { display: block; }


/* --- General Message Styles --- */
.status-message {
    font-weight: 500;
    margin: 15px auto;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95em;
    max-width: 600px;
    position: relative;
}

/* Close button for dismissible messages */
.status-message-close {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 2px 6px;
    border-radius: 4px;
    color: inherit;
    transition: opacity 150ms;
}
[dir="rtl"] .status-message-close { left: auto; right: 10px; }
.status-message-close:hover { opacity: 1; }
.error, .status-message.error { color: #000000; background-color: #fca5a5; border-color: #dc2626; font-weight: 500; }
.success, .status-message.success { color: #4ade80; background-color: #14532d; border-color: #166534; }
.info, .status-message.info { color: #60a5fa; background-color: #1e3a8a; border-color: #1e40af; }
.warning, .status-message.warning { color: #facc15; background-color: #78350f; border-color: #92400e; }

#global-error-message { margin: 15px auto; }
#upload-status, #login-error, #register-error, #resend-status, #reset-status { margin-top: 15px; }


/* --- MODAL STYLES - COMPLETE FIX --- */
.modal {
    /* הגדרות מיקום וגודל - הכרחי למודאל */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1150;

    /* מרכוז המודאל */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;

    /* עיצוב הרקע */
    background-color: rgba(6, 6, 15, 0.8);
    backdrop-filter: blur(5px);
}

.modal-dialog {
    background-color: var(--dark-bg-secondary);
    color: var(--light-text);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);

    /* הגדרות גודל ותצוגה */
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
}

.modal-dialog h3 {
    color: white;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    margin-bottom: 20px;
    margin-top: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--medium-text);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    width: auto;
    height: auto;
}

.modal-close:hover {
    color: white;
    transform: none;
    box-shadow: none;
}

/* שדות טופס במודאל */
.modal-dialog .form-group {
    margin-bottom: 20px;
}

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

.modal-dialog textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background-color: var(--dark-bg);
    color: var(--light-text);
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

/* כפתורים במודאל */
.modal-dialog button {
    margin-top: 10px;
}

/* Primary/Secondary action buttons used in the auth partial */
.auth-action-buttons .primary-action {
    background: linear-gradient(90deg, var(--primary-accent), #4f46e5);
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    width: 100%;
}
.auth-action-buttons .secondary-action {
    background: transparent;
    color: var(--medium-text);
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    font-weight: 700;
    width: 100%;
}
.auth-action-buttons { flex-direction: column; }

/* Responsive עבור מובייל */
@media (max-width: 767px) {
    .modal-dialog {
        width: 95%;
        padding: 20px;
        margin: 10px;
    }

    .request-fix-modal-dialog {
        max-width: none;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
}
/* --- START OF MODIFICATION --- */
/* --- RESPONSIVE ADJUSTMENTS for Mobile Header --- */
@media (max-width: 767px) {
    /* Main header layout using CSS Grid for precise centering */
    .user-header {
        padding: 10px 15px;
        display: grid;
        grid-template-columns: 1fr auto 1fr; /* Left, Center, Right columns */
        align-items: start; /* Align items to the top of their cells */
        gap: 10px;
    }

    /* Reset flex properties from desktop view */
    .user-header > *, .user-header .user-details-group, .user-header .header-actions {
        flex-basis: auto;
        order: initial; /* Reset order for mobile grid layout */
    }

    /* Center: Logo */
    .user-header h1 {
        grid-column: 2 / 3;
        text-align: center;
        margin: 0;
        padding-top: 5px; /* Small adjustment for vertical alignment */
        font-size: 1.5rem;
    }

    /* Right Column: User Name and Language Switcher */
    .user-header .user-details-group {
        grid-column: 3 / 4; /* CORRECTED: Move to the right column */
        justify-self: end; /* Align group to the end (right) */
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Align content inside to the right */
        gap: 8px;
        width: auto;
    }

    .user-header .user-details-group p {
        margin: 0;
        display: flex;
        justify-content: flex-end;
    }

    /* Hide the mobile versions of logout/credits which are in the wrong container */
    .user-details-group .logout-mobile,
    .user-details-group .credits-display-mobile {
        display: none !important;
    }

    /* Left Column: Logout Button and Credits */
    .header-actions {
        grid-column: 1 / 2; /* CORRECTED: Move to the left column */
        justify-self: start; /* Align group to the start (left) */
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Align content inside to the left */
        gap: 8px;
        width: auto;
    }

    /* Note: mobile-redesign.css is authoritative for mobile header.
       Do NOT use !important here as it would override mobile-redesign.css rules. */
    .header-actions .logout-desktop {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .header-actions .credits-display-desktop {
        font-size: 0.8rem;
        text-align: left;
    }

    /* Ensure desktop language switcher remains hidden on mobile */
    .header-actions .language-switcher-desktop {
        display: none !important;
    }

    /* Tab navigation למובייל - תיקון אופקי עם גלילה */
    .tab-navigation {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--primary-accent) transparent;
        padding: 0 10px;
    }

    .tab-navigation::-webkit-scrollbar {
        height: 4px;
    }

    .tab-navigation::-webkit-scrollbar-track {
        background: transparent;
    }

    .tab-navigation::-webkit-scrollbar-thumb {
        background-color: var(--primary-accent);
        border-radius: 4px;
    }

    .tab-navigation ul {
        display: flex;
        flex-wrap: nowrap;
        min-width: min-content;
        gap: 0;
    }

    .tab-navigation li {
        margin: 0;
    }

    .tab-navigation a {
        white-space: nowrap;
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
        display: inline-block;
    }
}
/* --- END OF MODIFICATION --- */


@media (max-width: 767px) {
    /* אותו מבנה כמו דסקטופ - Flexbox עם 3 אזורים */
    .user-header {
        padding: 12px 15px;
        display: flex; /* שינוי מ-grid ל-flex */
        justify-content: space-between;
        align-items: flex-start; /* יישור לראש - כולם באותו גובה */
        gap: 10px;
    }

    /* איפוס order מהגרסה הדסקטופית */
    .user-header > * {
        order: initial;
    }

    /* שמאל: התנתק + קרדיטים */
    .header-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        order: 1; /* שמאל */
    }

    /* מרכז: לוגו TryLa */
    .user-header h1 {
        order: 2; /* מרכז */
        text-align: center;
        margin: 0;
        font-size: 2.11rem; /* גדול ב-25% נוסף (1.69 * 1.25) */
        flex-grow: 0; /* לא תופס מקום נוסף */
    }

    /* ימין: אימייל + מחליף שפה */
    .user-header .user-details-group {
        order: 3; /* ימין */
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 5px;
        justify-content: flex-start; /* יישור לראש */
        margin-top: -8px !important; /* הזזת כל הקבוצה למעלה */
    }

    /* שם המשתמש באותה גובה של כפתור התנתקות */
    .user-header .user-details-group p {
        margin: 0 !important;
        line-height: 1.2;
        padding: 0 !important;
        display: flex;
        align-items: center;
        min-height: 32px; /* אותו גובה כמו כפתור */
        transform: translateY(-3px); /* הזזה נוספת למעלה */
    }

    #user-email {
        display: inline-flex;
        align-items: center;
    }

    /* Note: mobile-redesign.css is authoritative for mobile header.
       Do NOT use !important on display here as it would override mobile-redesign.css. */
    .header-actions .logout-desktop {
        padding: 6px 12px;
        font-size: 0.60rem;
    }

    .header-actions .credits-display-desktop {
        font-size: 1.17rem;
    }

    /* Credits value sizing - no !important to let mobile-redesign.css control layout */
    .header-actions .credits-display-desktop #user-credits-value {
        font-size: 1.3em;
        padding: 4px 8px;
    }

    .header-actions .credits-display-desktop #user-credits-value::before {
        font-size: 1.2em;
    }

    /* הסתרת גרסת מובייל של logout */
    .user-details-group .logout-mobile {
        display: none !important;
    }

    /* הסתרת גרסת מובייל של credits */
    .user-details-group .credits-display-mobile {
        display: none !important;
    }

    /* הסתרת language switcher דסקטופ מ-header-actions */
    .header-actions .language-switcher-desktop {
        display: none !important;
    }

    /* הצגת language switcher במובייל בצד ימין */
    .user-details-group .language-switcher-mobile {
        display: block !important;
    }

    /* הקטנת כפתור השפה במובייל */
    .user-details-group .language-switcher-mobile select,
    .user-details-group .language-switcher-mobile button {
        font-size: 0.7rem;
        padding: 4px 8px;
        min-height: auto;
    }

    /* אימייל קומפקטי יותר */
    #user-email {
        font-size: 1.2rem; /* אותו גודל כמו כפתור התנתקות */
        max-width: 12ch;
    }
/* שינוי כיוון הכפתורים לעמודה */
    .landing-nav-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: flex-end !important;
    }

    /* תיקון ה-wrapper הפנימי שעוטף את הכפתורים */
    .landing-nav-buttons > div {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: flex-end !important;
    }
}

/* דף הנחיתה */
@media (max-width: 767px) {
    .landing-nav-buttons-wrapper {
        flex-direction: column !important;
        align-items: flex-end !important;
    }
}

/* --- Reduced Motion: Respect user preference for less animation --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    button:hover {
        transform: none;
    }
}

/* --- Loading spinner for buttons --- */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
    margin-inline-start: 8px;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* --- Touch target minimum sizes --- */
a.nav-item,
.sidebar-item,
.tab-navigation a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* --- Button Press Feedback --- */
button:active:not(:disabled),
.landing-cta-button:active,
.upload-option-btn:active {
    transform: scale(0.97);
}

/* --- Tab Content Transition --- */
.tab-content {
    opacity: 0;
    transition: opacity var(--duration-normal, 300ms) ease;
}
.tab-content.active {
    opacity: 1;
}

/* --- Branded Loading Animation --- */
@keyframes branded-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes branded-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.branded-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 2rem;
}

.branded-loader-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid rgba(139, 92, 246, 0.15);
    border-top-color: var(--primary-accent, #8b5cf6);
    border-right-color: var(--secondary-accent, #d946ef);
    animation: branded-spin 0.8s linear infinite;
}

.branded-loader-text {
    color: var(--medium-text);
    font-size: 0.9rem;
    animation: branded-pulse 1.5s ease-in-out infinite;
}

/* --- Skeleton Loading States --- */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--dark-bg-secondary, #0d1117) 25%,
        rgba(139, 92, 246, 0.08) 50%,
        var(--dark-bg-secondary, #0d1117) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md, 14px);
}

.skeleton-card {
    aspect-ratio: 3/4;
    border-radius: var(--radius-lg, 20px);
}

.skeleton-text {
    height: 1em;
    border-radius: var(--radius-xs, 6px);
    margin-bottom: 0.5em;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* --- Drag & Drop Visual Feedback --- */
.drag-over {
    border-color: var(--primary-accent, #8b5cf6) !important;
    border-style: solid !important;
    background: rgba(139, 92, 246, 0.08) !important;
    box-shadow: inset 0 0 30px rgba(139, 92, 246, 0.1), 0 0 20px rgba(139, 92, 246, 0.15) !important;
    transition: all var(--duration-fast, 150ms) ease !important;
}

/* --- Gallery Empty State --- */
.gallery-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

.gallery-empty-state .empty-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: branded-pulse 2s ease-in-out infinite;
}

.gallery-empty-state h3 {
    color: var(--light-text);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.gallery-empty-state p {
    color: var(--medium-text);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    line-height: 1.6;
}

.gallery-empty-state .empty-cta {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    padding: 12px 32px;
    border-radius: var(--radius-pill, 50px);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.gallery-empty-state .empty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* --- Before/After Comparison Slider --- */
.comparison-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md, 14px);
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.comparison-slider img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.comparison-slider .comparison-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.comparison-slider .comparison-after img {
    width: 200%;
    max-width: none;
}

.comparison-slider .comparison-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    transform: translateX(-50%);
    z-index: 2;
}

.comparison-slider .comparison-handle::before,
.comparison-slider .comparison-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.comparison-slider .comparison-handle::before {
    left: -14px;
}

.comparison-slider .comparison-handle::after {
    right: -14px;
}

.comparison-slider .comparison-label {
    position: absolute;
    bottom: 12px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 3;
    pointer-events: none;
}

.comparison-slider .comparison-label.label-before {
    right: 12px;
}

.comparison-slider .comparison-label.label-after {
    left: 12px;
}

/* --- Processing Storytelling --- */
.processing-storytelling {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 2rem;
}

.processing-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
}

.processing-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm, 8px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border, #1a1f2e);
    opacity: 0.4;
    transition: all var(--duration-normal, 300ms) ease;
}

.processing-step.active {
    opacity: 1;
    border-color: var(--primary-accent, #8b5cf6);
    background: rgba(139, 92, 246, 0.08);
}

.processing-step.done {
    opacity: 0.7;
    border-color: #22c55e;
}

.processing-step .step-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.processing-step .step-icon.pending-icon {
    border: 2px solid var(--card-border);
    color: var(--medium-text);
}

.processing-step.active .step-icon {
    border: none;
    background: var(--primary-accent);
    color: white;
    animation: branded-spin 1s linear infinite;
}

.processing-step.done .step-icon {
    border: none;
    background: #22c55e;
    color: white;
}

.processing-step .step-text {
    font-size: 0.9rem;
    color: var(--medium-text);
}

.processing-step.active .step-text {
    color: var(--light-text);
    font-weight: 600;
}

.processing-step.done .step-text {
    color: var(--medium-text);
    text-decoration: line-through;
}

/* --- Fix Reason Chips --- */
.fix-reason-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.fix-reason-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-pill, 50px);
    border: 1px solid var(--card-border, #1a1f2e);
    background: rgba(255, 255, 255, 0.03);
    color: var(--medium-text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--duration-fast, 150ms) ease;
    user-select: none;
    -webkit-user-select: none;
}

.fix-reason-chip:hover {
    border-color: var(--primary-accent);
    color: var(--light-text);
}

.fix-reason-chip.selected {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    font-weight: 600;
}

.fix-reason-chip input[type="checkbox"] {
    display: none;
}

/* --- Onboarding Tour --- */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

.onboarding-tooltip {
    position: fixed;
    z-index: 9999;
    background: var(--dark-bg-secondary, #0d1117);
    border: 1px solid var(--primary-accent, #8b5cf6);
    border-radius: var(--radius-md, 14px);
    padding: 20px 24px;
    max-width: 320px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    color: var(--light-text);
}

.onboarding-tooltip h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: white;
}

.onboarding-tooltip p {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: var(--medium-text);
    line-height: 1.5;
}

.onboarding-tooltip .onboarding-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.onboarding-tooltip .onboarding-skip {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--medium-text);
    padding: 6px 16px;
    border-radius: var(--radius-pill, 50px);
    font-size: 0.85rem;
    cursor: pointer;
}

.onboarding-tooltip .onboarding-next {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    padding: 6px 20px;
    border: none;
    border-radius: var(--radius-pill, 50px);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.onboarding-tooltip .onboarding-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 12px;
}

.onboarding-tooltip .onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-border);
}

.onboarding-tooltip .onboarding-dot.active {
    background: var(--primary-accent);
}

/* --- PWA & Branding --- */
.app-icon-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

