:root {
    /* Core Backgrounds - Deep navy, not pure black */
    --bg-main: #0B0E14;
    --bg-surface: #121826;
    --bg-surface-alt: #182036;

    /* Brand Blues */
    --brand-primary: #4DA3FF;
    --brand-primary-soft: #6FB6FF;
    --brand-primary-dark: #2C6FDB;

    /* Premium Gold Accent */
    --accent-gold: #FFB800;
    --accent-gold-soft: #FFCA3A;
    --accent-gold-deep: #E5A600;

    /* Legacy alias for compatibility */
    --accent-cyan: var(--accent-gold);
    --accent-cyan-soft: var(--accent-gold-soft);

    /* Text Hierarchy */
    --text-primary: #E6F0FF;
    --text-secondary: #A9B4C7;
    --text-muted: #7D889A;

    /* Borders */
    --border-default: rgba(255,255,255,0.08);
    --border-accent: rgba(255,184,0,0.45);

    /* Effects */
    --glow-gold: 0 0 24px rgba(255,184,0,0.35);
    --glow-blue: 0 0 32px rgba(77,163,255,0.25);
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.45);

    /* Legacy alias */
    --glow-cyan: var(--glow-gold);

    /* Utilities */
    --success: #4caf50;
    --error: #f44336;
    --radius: 8px;
    --radius-lg: 16px;

    /* Premium: Glassmorphism */
    --glass-bg: rgba(18, 24, 38, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    /* Premium: Depth & Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(255, 184, 0, 0.3);

    /* Premium: Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Page Layout for Ads */
.page-layout {
    display: block;
    min-height: 100vh;
    padding-bottom: 100px; /* Space for mobile bottom ad */
}

/* Side Ad Banners (Desktop/Large screens) */
.ad-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 160px;
    display: none;
    z-index: 10;
    padding: 20px 10px;
}

.ad-sidebar.ad-left {
    left: 0;
}

.ad-sidebar.ad-right {
    right: 0;
}

.ad-sidebar .ad-slot {
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Bottom Ad Banner (Mobile/Tablet) */
.ad-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Hide bottom ad on large screens, show side ads */
@media (min-width: 1400px) {
    .ad-sidebar {
        display: block;
    }
    .ad-bottom {
        display: none;
    }
    .page-layout {
        padding-bottom: 0;
    }
}

/* Wider sidebars on very large screens */
@media (min-width: 1800px) {
    .ad-sidebar {
        width: 200px;
    }
}

@media (min-width: 2200px) {
    .ad-sidebar {
        width: 250px;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-accent);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    width: 44px;
    height: auto;
    filter: drop-shadow(var(--glow-cyan));
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-sub {
    font-weight: 600;
}

.logo-context {
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
}

.header-btn svg {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    stroke: currentColor;
}

.header-btn:hover {
    color: var(--accent-cyan);
    background: var(--bg-surface-alt);
}

#account-status {
    color: var(--accent-cyan);
    font-size: 0.85rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Premium Glassmorphic Sections */
.section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.section:hover {
    border-color: rgba(255, 184, 0, 0.15);
    box-shadow: var(--shadow-lg);
}

.section h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.hidden {
    display: none !important;
}

/* Premium Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), #2d7dd2);
    color: white;
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(77, 163, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Button shimmer effect */
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--accent-cyan);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-text {
    background: none;
    color: var(--text-secondary);
}

.btn-text:hover {
    color: var(--text-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
    margin-top: 1.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Drop Zone */
.drop-zone {
    border: 1px dashed var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(180deg, var(--bg-surface), #0F1420);
    max-width: 720px;
    margin: 0 auto;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
    background: linear-gradient(180deg, var(--bg-surface-alt), var(--bg-surface));
}

.drop-zone p {
    color: var(--text-secondary);
}

/* File Info */
.file-info {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.file-item .filename {
    font-weight: 500;
}

.file-item .detected {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.file-item .remove-file {
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.file-item .remove-file:hover {
    color: var(--error);
}

/* Config */
.config-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.config-row label {
    flex-shrink: 0;
}

select, input[type="text"], input[type="password"] {
    padding: 0.6rem 1rem;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
}

select {
    min-width: 200px;
}

input[type="text"], input[type="password"] {
    flex: 1;
}

/* Movie Detection */
.movie-detection {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
}

.movie-card {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.movie-card img {
    width: 100px;
    border-radius: var(--radius);
}

.movie-card .info {
    flex: 1;
}

.movie-card .title {
    font-size: 1.2rem;
    font-weight: 600;
}

.movie-card .year {
    color: var(--text-secondary);
}

.movie-card .genres {
    color: var(--brand-primary);
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

.movie-card .overview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.movie-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Movie Search */
.movie-search {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.movie-search input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.movie-search label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
}

.search-results {
    width: 100%;
    margin-top: 1rem;
}

.search-result {
    display: flex;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--bg-surface);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result:hover {
    background: var(--bg-surface-alt);
}

.search-result img {
    width: 60px;
    border-radius: 4px;
}

.search-result .info {
    flex: 1;
}

.search-result .title {
    font-weight: 500;
}

.search-result .year {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-result .genres {
    color: var(--brand-primary);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Premium Progress Bar */
.progress-container {
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    overflow: hidden;
    height: 24px;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-primary), var(--accent-cyan), var(--brand-primary));
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 184, 0, 0.5);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Glowing border effect */
.progress-container::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--brand-primary), var(--accent-cyan));
    opacity: 0.3;
    z-index: -1;
    filter: blur(4px);
}

#progress-text {
    text-align: center;
    color: var(--text-secondary);
}

/* Download */
.download-list {
    margin-bottom: 1rem;
}

.download-actions {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.download-actions .btn-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.download-actions .btn-text:hover {
    color: var(--accent-cyan);
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.download-item .status {
    color: var(--success);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 420px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Login/Create View */
.btn-block {
    width: 100%;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-default);
}

.divider span {
    padding: 0 0.75rem;
}

.login-row {
    display: flex;
    gap: 0.5rem;
}

.login-row input {
    flex: 1;
    margin: 0;
}

/* Account Info Card */
.account-info-card {
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.account-info-row:not(:last-child) {
    border-bottom: 1px solid var(--border-default);
}

.account-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.account-info-row code {
    background: var(--bg-main);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    user-select: all;
    color: var(--accent-cyan);
}

/* Collapsible Settings Sections */
.settings-section {
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.settings-section summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.settings-section summary::-webkit-details-marker {
    display: none;
}

.settings-section summary::before {
    content: '▸';
    margin-right: 0.5rem;
    transition: transform 0.2s;
    color: var(--text-muted);
}

.settings-section[open] summary::before {
    transform: rotate(90deg);
}

.settings-section summary:hover {
    color: var(--accent-cyan);
}

.section-content {
    padding: 0 1rem 1rem;
}

.section-content .hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Status Badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: var(--success);
    color: white;
}

.status-badge:empty {
    display: none;
}

.status-badge.subtle {
    background: var(--bg-main);
    color: var(--text-muted);
}

.status-badge.error {
    background: var(--error);
}

/* Key Input Rows */
.key-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.key-input-row input {
    flex: 1;
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* API Key Items */
.api-key-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-default);
}

.api-key-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.api-key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.api-key-header label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Small Buttons */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
}

.btn-danger:hover {
    background: var(--error);
    color: white;
}

/* Account Actions */
.account-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

.account-actions .btn {
    flex: 1;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .header-row {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .logo-section {
        flex-shrink: 0;
    }

    .logo-icon {
        width: 32px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .header-actions {
        gap: 0.5rem;
    }

    /* Hide donate text on mobile, show only icon */
    .btn-donate {
        padding: 0.5rem;
        border-radius: 50%;
        font-size: 0;
    }

    .btn-donate svg {
        width: 20px;
        height: 20px;
    }

    .header-btn {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }

    .header-btn svg {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }

    .tagline {
        font-size: 0.8rem;
        flex: 1;
    }

    #account-status {
        font-size: 0.7rem;
        text-align: right;
    }

    .movie-card {
        flex-direction: column;
    }

    .movie-card img {
        width: 80px;
    }

    .config-row {
        flex-direction: column;
        align-items: flex-start;
    }

    select {
        width: 100%;
    }

    /* Mobile tabs */
    .main-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .main-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    /* Mobile platform stats */
    .platform-stats {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
}

/* Model selector */
.model-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

select option:disabled {
    color: var(--text-secondary);
}

/* Cancel button */
.btn-cancel {
    margin-top: 1rem;
    background: var(--error);
    border-color: var(--error);
}

.btn-cancel:hover {
    background: #d32f2f;
}

/* ETA text */
.eta-text {
    text-align: center;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Indeterminate progress animation for concurrent processing */
.progress-bar.indeterminate {
    width: 100% !important;
    background: linear-gradient(90deg, var(--bg-surface-alt) 25%, var(--brand-primary) 50%, var(--bg-surface-alt) 75%);
    background-size: 200% 100%;
    animation: indeterminate 1.5s ease-in-out infinite;
}

@keyframes indeterminate {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Cancel button states */
.btn-cancel.cancelling {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Community Cache Section */
.cache-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
}

.cache-section h3 {
    margin-bottom: 0.5rem;
}

.cache-list {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cache-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--bg-surface);
    border-radius: var(--radius);
    gap: 0.5rem;
    min-width: 120px;
}

.cache-lang {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cache-lang .flag {
    font-size: 1.2rem;
}

.cache-lang .lang-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cache-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.cache-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cache-model {
    font-weight: 500;
    color: var(--brand-primary);
}

.cache-contributor {
    font-style: italic;
}

.cache-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.cache-actions .use-cache-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.vote-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.vote-btn {
    background: none;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.vote-btn:hover {
    background: var(--bg-surface-alt);
}

.vote-btn.active-up {
    color: var(--success);
    border-color: var(--success);
}

.vote-btn.active-down {
    color: var(--error);
    border-color: var(--error);
}

.flag-btn {
    background: none;
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.flag-btn:hover {
    color: var(--error);
    border-color: var(--error);
}

.flag-btn.flagged {
    color: var(--error);
    border-color: var(--error);
}

/* Share Section */
.share-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
}

.share-section h3 {
    margin-bottom: 0.5rem;
}

.share-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.share-form input {
    flex: 1;
    min-width: 150px;
}

#share-status {
    font-size: 0.9rem;
}

#share-status.success {
    color: var(--success);
}

#share-status.error {
    color: var(--error);
}

/* Flag Modal */
.flag-modal-content {
    padding: 1rem;
}

.flag-reasons {
    margin: 1rem 0;
}

.flag-reason {
    display: block;
    margin: 0.5rem 0;
    cursor: pointer;
}

.flag-reason input {
    margin-right: 0.5rem;
}

.flag-details {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-default);
    border-radius: var(--radius);
    color: var(--text-primary);
    resize: vertical;
    min-height: 60px;
}

/* Memory Modal */
.modal-wide {
    max-width: 600px;
}

.memory-add-form {
    background: var(--bg-surface-alt);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.memory-form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.memory-form-row:last-child {
    margin-bottom: 0;
}

.memory-form-row .arrow {
    color: var(--accent-cyan);
    font-weight: bold;
}

.memory-form-row input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-default);
}

.memory-form-row input:focus {
    border-color: var(--accent-cyan);
    outline: none;
}

.memory-form-row select {
    min-width: 120px;
    background: var(--bg-main);
}

.memory-search {
    margin-bottom: 1rem;
}

.memory-search input {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-default);
}

.memory-search input:focus {
    border-color: var(--accent-cyan);
    outline: none;
}

.memory-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.memory-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 1rem;
}

.memory-group {
    margin-bottom: 1rem;
}

.memory-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-default);
}

.memory-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    gap: 0.5rem;
}

.memory-item .term {
    flex: 1;
    font-weight: 500;
}

.memory-item .translation {
    flex: 1;
    color: var(--accent-cyan);
}

.memory-item .usage {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.memory-item .delete-term {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.25rem;
}

.memory-item .delete-term:hover {
    color: var(--error);
}

.memory-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-default);
}

.memory-actions label {
    cursor: pointer;
}

/* Shortcuts Modal */
.shortcuts-modal {
    max-width: 400px;
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
}

.shortcut-item span {
    margin-left: auto;
    color: var(--text-secondary);
}

kbd {
    background: var(--bg-main);
    border: 1px solid var(--border-default);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    box-shadow: 0 2px 0 var(--border-default);
}

/* Main Navigation Tabs */
.main-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-default);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    outline: none;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--accent-cyan);
    background: transparent;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-cyan);
}

/* Platform Stats */
.platform-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    margin-bottom: 1rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.platform-stats span {
    color: var(--text-muted);
}

.platform-stats span:not(.stat-divider) {
    color: var(--text-secondary);
}

.stat-divider {
    color: var(--border-default);
    font-size: 0.7rem;
}

/* Browse Section */
.browse-header {
    margin-bottom: 1rem;
}

.browse-header h2 {
    margin-bottom: 0;
}

.browse-search {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.browse-search input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-default);
}

.browse-search input:focus {
    border-color: var(--accent-cyan);
    outline: none;
}

.browse-filters {
    margin-bottom: 1rem;
}

.browse-filters select {
    min-width: 180px;
    background: var(--bg-main);
}

.browse-results {
    min-height: 200px;
}

.browse-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

/* Movie Cards Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.movie-card-browse {
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.movie-card-browse:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.movie-card-browse .poster {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.movie-card-browse .poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card-browse .info {
    padding: 0.75rem;
}

.movie-card-browse .title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card-browse .year {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.movie-card-browse .languages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.movie-card-browse .lang-badge {
    font-size: 1rem;
    cursor: default;
}

.movie-card-browse .more-langs {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.15rem 0.3rem;
    background: var(--bg-main);
    border-radius: 4px;
}

/* Browse Pagination */
.browse-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

#browse-page-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Movie Translations Modal */
.movie-translations-list {
    max-height: 400px;
    overflow-y: auto;
}

.movie-translations-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-default);
}

.movie-translations-header img {
    width: 80px;
    border-radius: var(--radius);
}

.poster-small {
    width: 60px;
    height: 90px;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.poster-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Preview Section */
.preview-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.preview-header h2 {
    margin: 0;
    flex: 1;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.btn-back:hover {
    color: var(--text-primary);
    background: var(--bg-surface-alt);
}

.btn-back svg {
    stroke: currentColor;
}

.preview-actions-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.preview-actions-top input {
    width: 200px;
    background: var(--bg-main);
    border: 1px solid var(--border-default);
}

.preview-actions-top input:focus {
    border-color: var(--accent-cyan);
    outline: none;
}

.preview-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.preview-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-default);
}

.preview-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.preview-toggle input {
    cursor: pointer;
}

.preview-list {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--border-default);
    border-radius: var(--radius);
}

.preview-item {
    display: grid;
    grid-template-columns: 50px 1fr 1fr;
    gap: 0.75rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-default);
    align-items: start;
}

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

.preview-item:hover {
    background: var(--bg-surface-alt);
}

.preview-item.edited {
    background: rgba(255, 184, 0, 0.05);
}

.preview-item.hidden {
    display: none;
}

.preview-index {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
    padding-top: 0.3rem;
}

.preview-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.preview-original {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0.3rem;
}

.preview-translated {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0.3rem;
    background: var(--bg-main);
    border: 1px solid transparent;
    border-radius: 4px;
    min-height: 2em;
    cursor: text;
    transition: border-color 0.2s;
}

.preview-translated:hover {
    border-color: var(--border-default);
}

.preview-translated:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: var(--bg-surface-alt);
}

.preview-translated.changed {
    border-left: 2px solid var(--accent-cyan);
}

.preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-default);
}

.preview-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* Preview responsive */
@media (max-width: 600px) {
    .preview-item {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
    }

    .preview-original {
        grid-column: 2;
    }

    .preview-translated {
        grid-column: 1 / -1;
    }

    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-actions-top {
        width: 100%;
    }

    .preview-actions-top input {
        flex: 1;
    }
}

.movie-translations-header .title {
    font-size: 1.3rem;
    font-weight: 600;
}

.movie-translations-header .year {
    color: var(--text-secondary);
}

.translation-lang-group {
    margin-bottom: 1rem;
}

.translation-lang-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--accent-cyan);
}

.translation-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    gap: 0.75rem;
}

.translation-item .meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.translation-item .model {
    font-weight: 500;
    color: var(--brand-primary);
    font-size: 0.85rem;
}

.translation-item .contributor {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.translation-item .score {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.translation-item .score.positive {
    color: var(--success);
}

.translation-item .score.negative {
    color: var(--error);
}

.translation-item .translation-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.translation-item .vote-row {
    display: flex;
    gap: 0.25rem;
}

/* Quality Indicators */
.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.quality-badge.unrated {
    background: var(--bg-main);
    color: var(--text-muted);
}

.quality-badge.excellent {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
}

.quality-badge.good {
    background: rgba(139, 195, 74, 0.15);
    color: #8bc34a;
}

.quality-badge.fair {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.quality-badge.poor {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.quality-stars {
    letter-spacing: -1px;
    font-size: 0.7rem;
}

.quality-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.quality-indicator.unrated {
    color: var(--text-muted);
}

.quality-bar {
    width: 50px;
    height: 4px;
    background: var(--bg-main);
    border-radius: 2px;
    overflow: hidden;
}

.quality-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

.quality-indicator.excellent .quality-fill { background: #4caf50; }
.quality-indicator.good .quality-fill { background: #8bc34a; }
.quality-indicator.fair .quality-fill { background: #ffc107; }
.quality-indicator.poor .quality-fill { background: #f44336; }

.quality-text {
    min-width: 30px;
}

.quality-indicator.excellent .quality-text { color: #4caf50; }
.quality-indicator.good .quality-text { color: #8bc34a; }
.quality-indicator.fair .quality-text { color: #ffc107; }
.quality-indicator.poor .quality-text { color: #f44336; }

/* Mini quality badge for translation list */
.quality-mini {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.quality-mini.unrated {
    background: var(--bg-main);
    color: var(--text-muted);
}

.quality-mini.excellent {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.quality-mini.good {
    background: rgba(139, 195, 74, 0.2);
    color: #8bc34a;
}

.quality-mini.fair {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.quality-mini.poor {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Top rated translation highlight */
.translation-item.top-rated {
    border-left: 2px solid #4caf50;
    background: rgba(76, 175, 80, 0.05);
}

/* Model Recommendation */
.model-recommendation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-default);
}

.model-recommendation .rec-icon {
    font-size: 1rem;
}

.model-recommendation .rec-text {
    flex: 1;
    color: var(--text-secondary);
}

.model-recommendation .rec-text strong {
    color: var(--brand-primary);
}

.btn-apply-rec {
    background: transparent;
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-apply-rec:hover {
    background: var(--brand-primary);
    color: white;
}

/* Rating Prompt */
.rating-prompt {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.rating-prompt.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.rating-prompt-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-soft), var(--glow-cyan);
    min-width: 280px;
    position: relative;
}

.rating-prompt-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.rating-prompt-close:hover {
    color: var(--text-primary);
}

.rating-prompt-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    padding-right: 1.5rem;
}

.rating-prompt-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.rating-prompt-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.rating-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-default);
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.rating-btn:hover {
    border-color: var(--accent-cyan);
}

.rating-btn.rating-up:hover {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
}

.rating-btn.rating-down:hover {
    background: rgba(244, 67, 54, 0.15);
    border-color: #f44336;
}

.rating-btn span {
    font-size: 1.1rem;
}

.rating-later-btn {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

.rating-later-btn:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 300;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* History Section */
.history-header {
    margin-bottom: 1.5rem;
}

.history-header h2 {
    margin-bottom: 0.25rem;
}

.history-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pending-ratings {
    margin-bottom: 2rem;
}

.pending-ratings h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.pending-ratings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.pending-rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    gap: 1rem;
}

.pending-rating-info {
    flex: 1;
    min-width: 0;
}

.pending-rating-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-rating-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.pending-rating-model {
    color: var(--brand-primary);
}

.pending-rating-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.pending-rating-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pending-rating-actions .rating-btn {
    padding: 0.4rem 0.6rem;
    min-width: auto;
}

.pending-rating-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    line-height: 1;
}

.pending-rating-dismiss:hover {
    color: var(--error);
}

/* User Stats */
.user-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-default);
}

.user-stats h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-surface-alt);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-cyan);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Responsive history */
@media (max-width: 600px) {
    .pending-rating-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pending-rating-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

/* ========================================
   PREMIUM UI ENHANCEMENTS
   ======================================== */

/* Donation Button */
.btn-donate {
    background: linear-gradient(135deg, #ffdd00, #ff9500);
    color: #000;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(255, 221, 0, 0.3);
    transition: all var(--transition-normal);
}

.btn-donate:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.4);
}

.btn-donate svg {
    width: 18px;
    height: 18px;
}

/* Cookie Consent Banner */
.consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

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

.consent-banner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.consent-banner a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.consent-banner a:hover {
    text-decoration: underline;
}

.consent-buttons {
    display: flex;
    gap: 0.75rem;
}

.consent-banner .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
}

.consent-banner.hidden {
    display: none;
}

/* Focus Rings for Accessibility */
.btn:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* Enhanced Input Fields */
select, input[type="text"], input[type="password"] {
    transition: all var(--transition-normal);
}

select:hover, input[type="text"]:hover, input[type="password"]:hover {
    border-color: rgba(255,255,255,0.2);
}

select:focus, input[type="text"]:focus, input[type="password"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(255, 184, 0, 0.1);
    outline: none;
}

/* Enhanced Drop Zone */
.drop-zone {
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 184, 0, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.drop-zone:hover::before,
.drop-zone.dragover::before {
    opacity: 1;
}

/* Loading Skeleton Animation */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface-alt) 25%, var(--bg-surface) 50%, var(--bg-surface-alt) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: var(--radius);
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
}

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

.skeleton-button {
    height: 40px;
    width: 120px;
}

/* Celebration Confetti Container */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Animated Stats Counter */
.stat-value {
    transition: all var(--transition-slow);
}

.stat-value.counting {
    animation: count-pulse 0.3s ease;
}

@keyframes count-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Enhanced Card Hover Effects */
.movie-card-browse {
    transition: all var(--transition-normal);
}

.movie-card-browse:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Premium Modal Styling */
.modal-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
    animation: modal-enter 0.3s ease;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Enhanced Header */
header {
    position: relative;
}

.logo-section {
    transition: transform var(--transition-normal);
}

.logo-section:hover {
    transform: scale(1.02);
}

.logo-icon {
    transition: filter var(--transition-normal);
}

.logo-section:hover .logo-icon {
    filter: drop-shadow(0 0 12px rgba(255, 184, 0, 0.6));
}

/* Tab Hover Effects */
.tab-btn {
    transition: all var(--transition-normal);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active::after {
    animation: tab-underline 0.3s ease;
}

@keyframes tab-underline {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Success Animation */
@keyframes success-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.btn-success-animated {
    animation: success-pulse 0.6s ease;
}

/* File Item Enhanced */
.file-item {
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.file-item:hover {
    border-color: var(--glass-border);
    background: var(--bg-surface);
}

/* Translation Item Hover */
.translation-item {
    transition: all var(--transition-normal);
}

.translation-item:hover {
    background: var(--bg-surface);
    transform: translateX(4px);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Platform Stats Enhancement */
.platform-stats {
    opacity: 0;
    animation: fadeIn 0.5s ease 0.3s forwards;
}

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

/* Footer spacing for consent banner */
body.has-consent-banner {
    padding-bottom: 80px;
}

/* Hide bottom ad when consent banner is showing */
body.has-consent-banner .ad-bottom {
    display: none;
}

/* Consent banner above bottom ad on mobile */
.consent-banner {
    bottom: 90px; /* Above bottom ad */
}

@media (min-width: 1400px) {
    .consent-banner {
        bottom: 0; /* No bottom ad on large screens */
    }
}

/* Ad placeholder styling when no ad */
.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 1rem;
    letter-spacing: 0.5px;
}

/* Mobile responsive adjustments for consent */
@media (max-width: 768px) {
    .consent-banner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
        bottom: 90px; /* Above bottom ad */
    }

    .consent-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   MOBILE RESPONSIVE OVERRIDES
   (Must be at end for proper cascade)
   ======================================== */

@media (max-width: 480px) {
    /* Header fixes for small screens */
    .header-row:first-child {
        gap: 0.5rem;
    }

    .logo-icon {
        width: 28px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    /* Hide donate text, show only icon */
    .btn-donate {
        padding: 0.4rem;
        border-radius: 50%;
        min-width: 36px;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-donate svg {
        width: 18px;
        height: 18px;
    }

    /* Hide text using clip */
    .btn-donate {
        font-size: 0;
        line-height: 0;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .header-btn {
        width: 34px;
        height: 34px;
        padding: 0.3rem;
    }

    /* Second header row */
    .header-row:last-child {
        margin-top: 0.25rem;
    }

    .tagline {
        font-size: 0.75rem;
    }

    #account-status {
        font-size: 0.65rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Tabs - prevent History clipping */
    .main-tabs {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 2rem; /* Extra padding to prevent last tab clipping */
    }

    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .tab-btn:last-child {
        margin-right: 1rem; /* Extra margin on last tab */
    }

    /* Stats */
    .platform-stats {
        font-size: 0.7rem;
        gap: 0.3rem;
    }

    /* Section padding */
    .section {
        padding: 1rem;
    }

    .section h2 {
        font-size: 1.1rem;
    }

    /* Drop zone */
    .drop-zone {
        padding: 1.5rem 1rem;
    }

    .drop-zone p {
        font-size: 0.85rem;
    }
}
