/* ==========================================================================
   K-Drama Streaming Platform -- Korean-Inspired Dark Theme
   Complete CSS matching all PHP HTML class names
   ========================================================================== */

/* ==========================================================================
   1. FONTS + VARIABLES + RESET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    /* Backgrounds */
    --bg-primary: #0f0f14;
    --bg-secondary: #15151c;
    --bg-card: #1a1a22;
    --bg-card-hover: #22222c;

    /* Accents */
    --accent: #e8b4b8;
    --accent-hover: #f0c4c8;
    --accent-glow: rgba(232, 180, 184, 0.2);
    --accent-secondary: #b8c9e8;

    /* Text */
    --text-primary: #f0ece4;
    --text-secondary: #c0bab0;
    --text-muted: #a09a90;

    /* Borders */
    --border: rgba(232, 180, 184, 0.12);
    --border-subtle: rgba(255, 255, 255, 0.04);

    /* Semantic */
    --success: #7ec89b;
    --error: #e87474;
    --warning: #e8c874;

    /* Typography */
    --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI',
        Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Layout */
    --nav-height: 64px;
    --content-max-width: 1400px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 4px 20px rgba(232, 180, 184, 0.15);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scrollbar-color: var(--accent-glow) var(--bg-card);
    scrollbar-width: thin;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, select, textarea, button {
    font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

::selection {
    background-color: var(--accent);
    color: var(--bg-primary);
}


/* ==========================================================================
   2. NAVIGATION (includes/header.php)
   Classes: site-header, scrolled, nav-container, nav-logo, logo-text,
   hangul-label, nav-links, active, nav-right, user-menu, user-menu-trigger,
   nav-dropdown, show, nav-login-btn, hamburger, mobile-open
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(21, 21, 28, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    height: var(--nav-height);
    transition: background-color var(--transition-base);
}

.site-header.scrolled {
    background-color: rgba(21, 21, 28, 0.95);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hangul-label {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--accent);
    opacity: 0.7;
    letter-spacing: 0.12em;
}

.nav-logo .hangul-label {
    display: block;
    font-size: 0.65rem;
    margin-top: -2px;
    opacity: 0.6;
    letter-spacing: 0.15em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    position: relative;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background-color: var(--border-subtle);
}

.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 1px;
}

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

.nav-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background-color: var(--accent);
    color: var(--bg-primary);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.nav-login-btn:hover {
    background-color: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

/* User menu dropdown */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.user-menu-trigger:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* nav-dropdown is the class used in header.php; show is toggled by JS */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: opacity var(--transition-fast), visibility var(--transition-fast),
        transform var(--transition-fast);
    z-index: 1010;
}

.nav-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown a:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

/* Hamburger */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.hamburger:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

/* Mobile nav open */
.nav-links.mobile-open {
    display: flex;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        background-color: var(--bg-secondary);
        padding: 20px 24px;
        gap: 0;
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-subtle);
        border-radius: 0;
    }

    .nav-links a.active::after {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}


/* ==========================================================================
   3. AUTH PAGES (login.php)
   Classes: auth-page, auth-container, auth-box, auth-logo, auth-alert,
   auth-alert--error, auth-alert--success, auth-title, auth-tabs, auth-tab,
   auth-form, auth-form--hidden, form-group, form-group--inline,
   checkbox-label, auth-link, auth-link-btn, auth-footer-text,
   auth-description, form-optional, btn, btn--primary, btn--full
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Korean lattice background pattern */
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(232, 180, 184, 0.03) 20px,
            rgba(232, 180, 184, 0.03) 21px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            rgba(184, 201, 232, 0.02) 20px,
            rgba(184, 201, 232, 0.02) 21px
        );
    pointer-events: none;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 28px;
    text-decoration: none;
}

.auth-logo .logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-logo .hangul-label {
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.7;
    letter-spacing: 0.2em;
}

/* Auth alerts */
.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert--error {
    background-color: rgba(232, 116, 116, 0.12);
    color: var(--error);
    border: 1px solid rgba(232, 116, 116, 0.2);
}

.auth-alert--success {
    background-color: rgba(126, 200, 155, 0.12);
    color: var(--success);
    border: 1px solid rgba(126, 200, 155, 0.2);
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
}

.auth-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.6;
    text-align: center;
}

/* Auth tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border-subtle);
}

.auth-tab {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.auth-tab:hover {
    color: var(--text-secondary);
}

.auth-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Auth forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-form--hidden {
    display: none !important;
}

/* Form groups (shared across auth + profile) */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group--inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.checkbox-label span {
    font-size: 0.85rem;
}

.auth-link {
    font-size: 0.85rem;
    color: var(--accent);
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.auth-link:hover {
    color: var(--accent-hover);
}

.auth-link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-link-btn:hover {
    color: var(--accent-hover);
}

.auth-footer-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
}


/* ==========================================================================
   4. BUTTONS (used site-wide)
   Classes: btn, btn--primary, btn--full, btn--danger, btn--sm, btn--ghost,
   btn--xs, btn-primary, btn-secondary (detail.php inline uses both forms)
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        opacity var(--transition-fast);
    text-decoration: none;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* BEM double-dash variants (used in login, history, profile, list, etc.) */
.btn--primary {
    background-color: var(--accent);
    color: var(--bg-primary);
}

.btn--primary:hover {
    background-color: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.btn--full {
    width: 100%;
    margin-top: 8px;
}

.btn--danger {
    background-color: var(--error);
    color: #fff;
}

.btn--danger:hover {
    background-color: #d05050;
}

.btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn--ghost:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn--sm {
    padding: 7px 16px;
    font-size: 0.82rem;
}

.btn--xs {
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* Single-dash variants (used in detail.php inline styles) */
.btn-primary {
    background-color: var(--accent);
    color: var(--bg-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

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


/* ==========================================================================
   5. SPINNER (used in multiple pages)
   ========================================================================== */

.spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(232, 180, 184, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner--sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==========================================================================
   6. HOME PAGE (index.php)
   Classes: home-main, announcements-container, announcement-banner,
   announcement-text, announcement-dismiss, dismissing, hero-banner,
   hero-overlay, hero-content, hero-title, hero-description, hero-btn,
   content-section, section-header, section-title, hangul-label,
   content-row, poster-card, poster-img, poster-placeholder,
   poster-progress, poster-progress-bar, poster-info, poster-title,
   poster-meta
   ========================================================================== */

.home-main {
    padding-top: 0;
    min-height: calc(100vh - var(--nav-height));
}

/* Announcements */
.announcements-container {
    padding: 0 24px;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.announcement-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    margin-top: 12px;
    background-color: rgba(232, 180, 184, 0.08);
    border: 1px solid rgba(232, 180, 184, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.announcement-banner.dismissing {
    opacity: 0;
    transform: translateX(20px);
}

.announcement-text {
    color: var(--text-primary);
    flex: 1;
}

.announcement-dismiss {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.announcement-dismiss:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Hero banner */
.hero-banner {
    position: relative;
    min-height: 480px;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,
            rgba(15, 15, 20, 0.95) 0%,
            rgba(15, 15, 20, 0.65) 50%,
            rgba(15, 15, 20, 0.20) 100%),
        linear-gradient(to top,
            var(--bg-primary) 0%,
            rgba(15, 15, 20, 0.70) 30%,
            transparent 60%);
    display: flex;
    align-items: flex-end;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 48px 56px;
    width: 100%;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    max-width: 600px;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 520px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    background-color: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background-color var(--transition-fast), transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.hero-btn:hover {
    background-color: var(--accent-hover);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* Content sections */
.content-section {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.content-section + .content-section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-page-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Content row (horizontal scroll) */
.content-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-glow) transparent;
}

.content-row::-webkit-scrollbar { height: 4px; }
.content-row::-webkit-scrollbar-track { background: transparent; }
.content-row::-webkit-scrollbar-thumb {
    background-color: var(--accent-glow);
    border-radius: 2px;
}

/* Poster row (alias for content-row used in variety) */
.poster-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-glow) transparent;
}

.poster-row::-webkit-scrollbar { height: 4px; }
.poster-row::-webkit-scrollbar-track { background: transparent; }
.poster-row::-webkit-scrollbar-thumb {
    background-color: var(--accent-glow);
    border-radius: 2px;
}

/* Poster card */
.poster-card {
    flex-shrink: 0;
    width: 160px;
    text-decoration: none;
    color: inherit;
    scroll-snap-align: start;
    transition: transform var(--transition-base);
}

.poster-card:hover {
    transform: scale(1.03);
}

.poster-card:hover .poster-img {
    box-shadow: 0 8px 24px rgba(232, 180, 184, 0.12);
}

.poster-img-wrap,
.poster-img-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-card);
    aspect-ratio: 2 / 3;
}

.poster-img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background-color: var(--bg-card);
    display: block;
    transition: box-shadow var(--transition-base);
}

.poster-placeholder {
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.poster-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--radius-lg);
}

.poster-card:hover .poster-overlay {
    opacity: 1;
}

.poster-play-btn {
    width: 48px;
    height: 48px;
    background-color: var(--accent);
    color: var(--bg-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
}

.poster-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fbbf24;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    z-index: 2;
}

.poster-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--accent);
    color: var(--bg-primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.poster-info {
    padding: 10px 2px 0;
}

.poster-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.poster-year {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

.poster-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Poster progress bar (continue watching) */
.poster-progress {
    width: 100%;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}

.poster-progress-bar {
    height: 100%;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width var(--transition-base);
}


/* ==========================================================================
   7. SEARCH / BROWSE PAGE (search.php)
   Classes: page-main, page-container, page-title, filter-bar,
   filter-row, filter-row--search, filter-row--chips, filter-row--selects,
   filter-row--meta, search-input-wrap, search-icon, search-input,
   search-clear, filter-label, chip-group, chip, chip--active,
   filter-select-wrap, filter-select, filter-active-label,
   results-header, results-count, results-grid, results-loading,
   results-empty, results-empty-sub, results-error,
   pagination, page-btn, page-btn--prev, page-btn--next,
   page-btn--active, page-ellipsis
   ========================================================================== */

.page-main {
    padding-top: 24px;
    padding-bottom: 60px;
    min-height: calc(100vh - var(--nav-height));
}

.page-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.page-container--narrow {
    max-width: 720px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.page-header .page-title {
    margin-bottom: 0;
}

/* Filter bar */
.filter-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-row--search {
    width: 100%;
}

.filter-row--chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row--selects {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-row--meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 52px;
}

.filter-active-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Search input */
.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 11px 40px 11px 42px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-clear {
    position: absolute;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.search-clear:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Chip group + chips */
.chip-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast),
        color var(--transition-fast);
}

.chip:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.chip--active,
.chip.chip--active {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

/* Filter selects */
.filter-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 130px;
}

.filter-select {
    padding: 9px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a09a90' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Results */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

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

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

.results-grid .poster-card {
    width: auto;
}

.results-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.results-empty {
    text-align: center;
    padding: 48px 20px;
    grid-column: 1 / -1;
    color: var(--text-secondary);
}

.results-empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.results-error {
    text-align: center;
    padding: 48px 20px;
    color: var(--error);
    grid-column: 1 / -1;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast),
        border-color var(--transition-fast);
}

.page-btn:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
}

.page-btn--active {
    background-color: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.page-btn--prev,
.page-btn--next {
    font-weight: 500;
}

.page-btn[disabled],
.page-btn[aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
    font-size: 0.9rem;
}


/* ==========================================================================
   8. VARIETY PAGE (variety.php)
   Classes: variety-hero, featured-grid, featured-card,
   featured-card__backdrop, featured-card__body, featured-card__poster,
   featured-card__info, featured-card__title, featured-card__meta,
   featured-card__overview, featured-card__cta, meta-rating,
   empty-state
   ========================================================================== */

.variety-hero {
    background-color: var(--bg-secondary);
    padding: 40px 0;
    margin-bottom: 32px;
}

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

.featured-card {
    position: relative;
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 220px;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.featured-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px rgba(232, 180, 184, 0.1);
}

.featured-card__backdrop {
    position: absolute;
    inset: 0;
    background: var(--backdrop, var(--bg-card));
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    transition: filter var(--transition-base);
}

.featured-card:hover .featured-card__backdrop {
    filter: brightness(0.5);
}

.featured-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 20px;
    padding: 24px;
    align-items: flex-start;
}

.featured-card__poster {
    width: 100px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.featured-card__info {
    flex: 1;
    min-width: 0;
}

.featured-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.featured-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.featured-card__meta span + span::before {
    content: '\00B7';
    margin-right: 8px;
}

.featured-card__meta .meta-rating {
    color: #fbbf24;
}

.featured-card__overview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card__cta {
    display: inline-flex;
}


/* ==========================================================================
   9. LIST PAGE (list.php)
   Classes: status-tabs, status-tab, status-tab__count, list-loading,
   list-total-count, poster-card--list, poster-status-badge,
   poster-card__actions, status-select, remove-btn, progress-bar-wrap,
   progress-bar, empty-state, empty-state-sub
   ========================================================================== */

.status-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 0;
}

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

.status-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.status-tab:hover {
    color: var(--text-secondary);
}

.status-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.status-tab__count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.status-tab.active .status-tab__count {
    color: var(--accent);
    opacity: 0.7;
}

.list-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.list-total-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Poster card -- list variant */
.poster-card--list {
    width: auto;
    display: flex;
    flex-direction: column;
}

.poster-card--list .poster-img-wrap {
    display: block;
}

.poster-card--list .poster-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.poster-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: fit-content;
}

.poster-status-badge--watching      { background-color: rgba(126, 200, 155, 0.15); color: var(--success); }
.poster-status-badge--completed     { background-color: rgba(184, 201, 232, 0.15); color: var(--accent-secondary); }
.poster-status-badge--plan_to_watch { background-color: rgba(232, 200, 116, 0.15); color: var(--warning); }
.poster-status-badge--on_hold       { background-color: rgba(160, 154, 144, 0.15); color: var(--text-muted); }
.poster-status-badge--dropped       { background-color: rgba(232, 116, 116, 0.15); color: var(--error); }

.poster-card__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.status-select {
    padding: 5px 10px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.78rem;
    cursor: pointer;
    font-family: var(--font-family);
}

.status-select:focus {
    outline: none;
    border-color: var(--accent);
}

.remove-btn {
    color: var(--error);
    border-color: rgba(232, 116, 116, 0.2);
}

.remove-btn:hover {
    background-color: rgba(232, 116, 116, 0.1);
    color: var(--error);
    border-color: var(--error);
}

/* Progress bar */
.progress-bar-wrap {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar {
    height: 100%;
    background-color: var(--accent);
    border-radius: 2px;
    transition: width var(--transition-base);
}

.progress-bar--complete {
    background-color: var(--success);
}


/* ==========================================================================
   10. HISTORY PAGE (history.php)
   Classes: history-list, history-item, history-item__poster-link,
   history-item__poster, history-item__body, history-item__top,
   history-item__title, history-item__time-ago, history-item__meta,
   history-item__ep, history-item__progress-text, history-item__actions,
   badge, badge--green
   ========================================================================== */

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.history-item:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border);
}

.history-item__poster-link {
    flex-shrink: 0;
}

.history-item__poster {
    width: 72px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
}

.history-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-item__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.history-item__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-item__title:hover {
    color: var(--accent);
}

.history-item__time-ago {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.history-item__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.history-item__ep {
    color: var(--accent);
    font-weight: 500;
}

.history-item__progress-text {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.history-item__actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge--green {
    background-color: rgba(126, 200, 155, 0.15);
    color: var(--success);
}


/* ==========================================================================
   11. PROFILE PAGE (profile.php)
   Classes: settings-section, settings-section__title, settings-section__body,
   settings-field, settings-field__label, settings-field__value,
   settings-form, settings-form__footer, settings-inline-msg,
   settings-inline-msg--error, settings-inline-msg--success,
   settings-description, radio-group, radio-group__label,
   radio-label, radio-custom, invite-list, invite-item,
   invite-item--used, invite-item__code-wrap, invite-code,
   invite-item__status, invite-empty, invite-actions, copy-btn
   ========================================================================== */

.settings-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
}

.settings-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background-color: rgba(255, 255, 255, 0.02);
}

.settings-section__body {
    padding: 24px;
}

.settings-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.settings-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-field:first-child {
    padding-top: 0;
}

.settings-field__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.settings-field__value {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-align: right;
}

.settings-form {
    display: flex;
    flex-direction: column;
}

.settings-form__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.settings-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.settings-inline-msg {
    font-size: 0.82rem;
    font-weight: 500;
}

.settings-inline-msg--success {
    color: var(--success);
}

.settings-inline-msg--error {
    color: var(--error);
}

/* Radio group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.radio-group__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    background-color: var(--bg-card);
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--transition-fast);
}

.radio-label input[type="radio"]:checked ~ .radio-custom {
    border-color: var(--accent);
}

.radio-label input[type="radio"]:checked ~ .radio-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--accent);
}

/* Invite codes */
.invite-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.invite-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.invite-item--used {
    opacity: 0.55;
}

.invite-item__code-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-code {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.95rem;
    color: var(--accent);
    background-color: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
}

.invite-item__status {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.invite-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

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

.copy-btn {
    font-size: 0.75rem;
}


/* ==========================================================================
   12. EMPTY STATE (shared)
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.empty-state p {
    color: var(--text-muted);
}

.empty-state-sub,
.empty-state .empty-state-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.empty-state-sub a {
    color: var(--accent);
}

.empty-state-sub a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}


/* ==========================================================================
   13. ERROR PAGE (error.php)
   Classes: error-page, hangul-label, btn-primary
   ========================================================================== */

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height));
    text-align: center;
    padding: 40px 20px;
}

.error-page h1 {
    font-size: 6rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 0 40px var(--accent-glow);
}

.error-page p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.error-page .hangul-label {
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.error-page .btn-primary,
.error-page a.btn-primary {
    margin-top: 16px;
}


/* ==========================================================================
   14. WATCH PAGE (watch.php -- inline styles handle most, but these are
       referenced in the page)
   Classes: watch-page, player-wrapper, player-container, player-loading,
   hidden, player-error, visible, watch-info, watch-header, watch-poster,
   watch-meta, episode-label, episode-title, source-selector, source-btn,
   active, episode-nav, disabled, season-selector, episode-list-section,
   episode-grid, episode-card, current, ep-num, ep-title
   ========================================================================== */

.watch-page {
    padding-top: var(--nav-height);
}


/* ==========================================================================
   15. DETAIL PAGE (detail.php)
   All detail-* classes are defined via inline <style> in detail.php itself.
   These shared classes are used:
   - .poster-card, .poster-img, .poster-info, .poster-title, .poster-year
   - .poster-img-wrapper, .poster-rating, .poster-overlay, .poster-play-btn
   - .content-row (for recommendations row)
   - .btn, .btn-primary, .btn-secondary
   ========================================================================== */

/* detail.php also references --content-max-width, --bg-secondary, --bg-card,
   --accent, etc. which are all defined in :root above */


/* ==========================================================================
   16. ADMIN PAGE (admin.php)
   All admin-* classes are defined via inline <style> in admin.php itself.
   These shared classes from the main stylesheet are used:
   - .site-header, .nav-*, header partials
   - .spinner
   - .badge
   - .empty-state
   - .pagination
   ========================================================================== */


/* ==========================================================================
   17. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-banner {
        min-height: 380px;
    }

    .hero-content {
        padding: 0 32px 40px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

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

@media (max-width: 768px) {
    .hero-banner {
        min-height: 300px;
    }

    .hero-content {
        padding: 0 20px 32px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .content-section {
        padding: 0 16px;
    }

    .page-container {
        padding: 0 16px;
    }

    .poster-card {
        width: 130px;
    }

    .filter-bar {
        padding: 14px;
    }

    .filter-row--selects {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select-wrap {
        min-width: auto;
    }

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

    .history-item {
        gap: 12px;
        padding: 12px;
    }

    .history-item__poster {
        width: 56px;
    }

    .history-item__top {
        flex-direction: column;
        gap: 4px;
    }

    .history-item__actions {
        flex-wrap: wrap;
    }

    .settings-section__body {
        padding: 16px;
    }

    .settings-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .auth-box {
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .poster-card {
        width: 110px;
    }

    .page-title {
        font-size: 1.4rem;
    }

    .status-tabs {
        gap: 0;
    }

    .status-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

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


/* ==========================================================================
   18. UTILITY CLASSES
   ========================================================================== */

.hidden,
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ==========================================================================
   19. SCROLLBAR STYLES
   ========================================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(232, 180, 184, 0.35);
}
