/* ========================================
   MoviePotter - Modern UI Stylesheet
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #e50914;
    --primary-dark: #b2070d;
    --bg-dark: #0a0a0f;
    --bg-card: #16161e;
    --bg-card-hover: #1e1e2a;
    --bg-surface: #111118;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #666680;
    --border: #2a2a3a;
    --gradient-1: linear-gradient(135deg, #e50914, #ff6b6b);
    --gradient-2: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-hero: linear-gradient(180deg, rgba(10,10,15,0) 0%, rgba(10,10,15,0.8) 50%, #0a0a0f 100%);
    --navbar-bg: rgba(10, 10, 15, 0.85);
    --navbar-border: rgba(255,255,255,0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.5);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-dark: #f5f5f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f3;
    --bg-surface: #eaeaef;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;
    --border: #d8d8e0;
    --gradient-hero: linear-gradient(180deg, rgba(245,245,248,0) 0%, rgba(245,245,248,0.8) 50%, #f5f5f8 100%);
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --navbar-border: rgba(0,0,0,0.08);
    --shadow: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body > footer {
    margin-top: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: #ff6b6b;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 64px;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--navbar-border);
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.nav-logo-accent {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 16px;
    padding: 0;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary);
    border-color: var(--primary);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0,0,0,0.04);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0,0,0,0.08);
}

.nav-logo {
    height: 36px;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links li a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-links li a i {
    font-size: 12px;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.08);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
        z-index: 999;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(229,9,20,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(108,92,231,0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(0,152,227,0.06) 0%, transparent 50%);
    z-index: 0;
}

[data-theme="light"] .hero-bg {
    background: radial-gradient(ellipse at 50% 0%, rgba(229,9,20,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(108,92,231,0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(0,152,227,0.04) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

/* ========================================
   Search Box
   ======================================== */
.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition);
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

#favorites-container .input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    position: relative;
}

#favorites-container .input-container input {
    flex: 1;
    padding: 14px 16px 14px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition);
}

#favorites-container .input-container input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.remove-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(229, 9, 20, 0.1);
    border: 1px solid rgba(229, 9, 20, 0.2);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 18px;
    cursor: pointer;
    transition: all var(--transition);
    padding: 0;
}

.remove-btn:hover {
    background: rgba(229, 9, 20, 0.2);
    color: #ff6b6b;
}

.search-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(229, 9, 20, 0.4);
}

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

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
}

/* ========================================
   Genre Filter Pills
   ======================================== */
.genre-filter {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.filter-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 12px;
}

.genre-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
}

.genre-pill:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.15);
}

.genre-pill.active {
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.12);
    color: var(--primary);
}

.genre-pill.active:hover {
    background: rgba(229, 9, 20, 0.22);
    border-color: var(--primary);
    color: var(--primary);
}

.genre-pill i {
    font-size: 11px;
}

/* ========================================
   Autocomplete
   ======================================== */
.autocomplete-container {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.autocomplete-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.autocomplete-poster {
    width: 32px;
    height: 44px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-surface);
}

.autocomplete-info {
    display: flex;
    flex-direction: column;
}

.autocomplete-title {
    font-weight: 500;
    color: var(--text-primary);
}

.autocomplete-year {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Search Loading (inside search box)
   ======================================== */
.search-loading {
    margin-top: 16px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.search-loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.loader-ring-sm {
    display: inline-block;
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.loader-ring-sm div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 24px;
    height: 24px;
    margin: 2px;
    border: 2.5px solid transparent;
    border-radius: 50%;
    animation: ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: var(--primary) transparent transparent transparent;
}

.loader-ring-sm div:nth-child(1) { animation-delay: -0.45s; }
.loader-ring-sm div:nth-child(2) { animation-delay: -0.3s; }
.loader-ring-sm div:nth-child(3) { animation-delay: -0.15s; }

@keyframes ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-message {
    color: var(--text-secondary);
    font-size: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 80px 20px;
    scroll-margin-top: 64px;
}

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

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--primary);
    font-size: 0.85em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 40px;
}

/* ========================================
   Movie Cards (Trending & Results)
   ======================================== */
.movie-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition);
    flex-shrink: 0;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255,255,255,0.1);
}

.movie-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: var(--bg-surface);
    display: block;
}

.movie-card-info {
    padding: 14px;
}

.movie-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.movie-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f5c518;
    font-weight: 600;
}

.movie-card-rating i {
    font-size: 10px;
}

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

/* ========================================
   Streaming Platform Badges
   ======================================== */
.streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.streaming-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1.4;
    transition: all var(--transition);
    white-space: nowrap;
}

.streaming-badge svg {
    width: 14px;
    height: 14px;
    fill: #fff;
    flex-shrink: 0;
}

.streaming-badge:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ========================================
   Countdown Badge (Upcoming Movies)
   ======================================== */
.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    margin-top: 6px;
    margin-bottom: 2px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(229, 9, 20, 0.12);
    color: var(--primary);
    border: 1px solid rgba(229, 9, 20, 0.25);
    white-space: nowrap;
}

.countdown-badge i {
    font-size: 10px;
}

/* Trailer Link */
.trailer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(108, 92, 231, 0.12);
    color: #a29bfe;
    border: 1px solid rgba(108, 92, 231, 0.25);
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.trailer-link:hover {
    background: rgba(108, 92, 231, 0.2);
    color: #a29bfe;
    transform: translateY(-1px);
}

.trailer-link i {
    font-size: 11px;
}

[data-theme="light"] .countdown-badge {
    background: rgba(229, 9, 20, 0.08);
    border-color: rgba(229, 9, 20, 0.2);
}

[data-theme="light"] .trailer-link {
    background: rgba(108, 92, 231, 0.08);
    border-color: rgba(108, 92, 231, 0.2);
    color: #6c5ce7;
}

[data-theme="light"] .trailer-link:hover {
    background: rgba(108, 92, 231, 0.15);
    color: #6c5ce7;
}

/* ========================================
   Recommendations Section
   ======================================== */
.recommendations-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    scroll-margin-top: 80px;
}

/* Loading indicator inside recommendations */
.rec-loading {
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

/* Skeleton placeholders for streaming cards */
.rec-card-skeleton {
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.rec-card-skeleton .skeleton-poster {
    width: 100%;
    aspect-ratio: 2/3;
}

.rec-card-skeleton .rec-card-body {
    padding: 14px;
}

.rec-card-skeleton .skeleton-text {
    height: 14px;
    margin: 0 0 8px;
    border-radius: 4px;
}

.rec-card-skeleton .skeleton-text-sm {
    height: 10px;
    width: 60%;
    border-radius: 4px;
}

/* Card reveal animation */
.rec-card-reveal {
    animation: cardReveal 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rec-category {
    margin-bottom: 48px;
}

.rec-category-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.rec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.rec-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.rec-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(255,255,255,0.1);
}

.rec-card a {
    color: inherit;
    text-decoration: none;
}

.rec-card-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: var(--bg-surface);
    display: block;
}

.rec-card-body {
    padding: 14px;
}

.rec-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rec-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rec-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.rec-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #f5c518;
    font-weight: 600;
}

.rec-card-rating i {
    font-size: 10px;
}

.rec-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.rec-card-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 50px;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Donation prompt */
.donation-prompt {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.donation-prompt p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.donation-options {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.donation-options a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.donation-options a.donate-button {
    background: var(--gradient-1);
    color: #fff;
}

.donation-options a.donate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
}

.donation-options a:not(.donate-button) {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.donation-options a:not(.donate-button):hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
}

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

.footer-content p {
    font-size: 13px;
    color: var(--text-muted);
}

footer a {
    color: var(--text-secondary);
}

footer a:hover {
    color: var(--text-primary);
}

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

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

.skeleton-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.skeleton-poster {
    width: 100%;
    aspect-ratio: 2/3;
}

.skeleton-text {
    height: 14px;
    margin: 14px;
    border-radius: 4px;
}

.skeleton-text-sm {
    height: 10px;
    margin: 8px 14px 14px;
    width: 60%;
    border-radius: 4px;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero {
        padding: 100px 16px 60px;
    }

    .search-box {
        padding: 20px;
    }

    .search-actions {
        flex-direction: column;
    }

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

    .movie-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-bottom: 12px;
        scrollbar-width: none; /* Firefox */
    }

    .movie-carousel::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .movie-carousel .movie-card {
        min-width: 160px;
        max-width: 160px;
        scroll-snap-align: start;
    }

    .movie-carousel .skeleton-card {
        min-width: 160px;
        max-width: 160px;
        flex-shrink: 0;
    }

    .movie-card:hover {
        transform: none;
    }

    .rec-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .section {
        padding: 40px 16px;
    }

    .section-subtitle {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .movie-carousel .movie-card {
        min-width: 140px;
        max-width: 140px;
    }

    .movie-carousel .skeleton-card {
        min-width: 140px;
        max-width: 140px;
    }
}

/* ========================================
   Contact / About page overrides
   ======================================== */
.container {
    max-width: 800px;
    margin: 100px auto 40px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.container h1 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.container label {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.container input[type="text"],
.container input[type="email"],
.container textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
}

.container input:focus,
.container textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.container button {
    background: var(--gradient-1);
    border: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
}

.container button:hover {
    opacity: 0.9;
}

.contact-info {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 8px;
}

/* Logo in container pages */
#main-logo {
    max-width: 200px;
    max-height: 80px;
    display: block;
    margin: 0 auto 16px;
}

/* No-poster placeholder */
.no-poster {
    width: 100%;
    aspect-ratio: 2/3;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 32px;
}

/* ========================================
   Light Theme Overrides
   ======================================== */
[data-theme="light"] .nav-links li a:hover,
[data-theme="light"] .nav-links li a.active {
    background: rgba(0,0,0,0.06);
}

[data-theme="light"] .btn-secondary {
    background: rgba(0,0,0,0.04);
    border-color: var(--border);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.15);
}

[data-theme="light"] .genre-pill {
    background: rgba(0,0,0,0.03);
}

[data-theme="light"] .genre-pill:hover {
    background: rgba(0,0,0,0.06);
    border-color: rgba(0,0,0,0.12);
}

[data-theme="light"] .autocomplete-item:hover {
    background: rgba(0,0,0,0.04);
}

[data-theme="light"] .autocomplete-item {
    border-bottom-color: rgba(0,0,0,0.05);
}

[data-theme="light"] .rec-card-tag {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .remove-btn {
    background: rgba(229, 9, 20, 0.06);
    border-color: rgba(229, 9, 20, 0.15);
}

[data-theme="light"] .donation-options a:not(.donate-button) {
    background: rgba(0,0,0,0.04);
    border-color: var(--border);
}

[data-theme="light"] .donation-options a:not(.donate-button):hover {
    background: rgba(0,0,0,0.08);
}

[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, #e8e8ed 25%, #f0f0f5 50%, #e8e8ed 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

[data-theme="light"] .movie-card:hover {
    border-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .rec-card:hover {
    border-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .streaming-badge {
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c0c0cc;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a0a0b0;
}
