/* =========================================================
   CineVault — global stylesheet
   Sections:
   1. Tokens & resets
   2. Loader
   3. Animations
   4. Glass utilities & a11y
   5. Navbar (incl. mobile hamburger)
   6. Hero
   7. Movie section + cards
   8. Modal
   9. View-all status box
   10. Footer
   11. Auxiliary pages (about/contact/policy/404)
   12. Responsive breakpoints
   ========================================================= */

/* 1. Tokens & resets ------------------------------------- */
:root {
    --bg-color: #050505;
    --primary-color: #E50914;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-title: 'Cinzel', serif;
    --font-ui: 'Outfit', sans-serif;
    --navbar-h: 70px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

body > header,
body > main,
body > footer {
    transition:
        opacity 0.18s ease,
        transform 0.26s cubic-bezier(0.25, 1, 0.5, 1),
        filter 0.22s ease;
}

body.language-switching > header,
body.language-switching > main,
body.language-switching > footer {
    opacity: 0.58;
    transform: translate3d(0, 7px, 0);
    filter: blur(1px);
    pointer-events: none;
}

a { text-decoration: none; color: var(--text-main); }

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

/* Accessible focus ring */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 16px;
    z-index: 10001;
    font-weight: 600;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Anchor offset for fixed navbar */
section[id], [id] { scroll-margin-top: calc(var(--navbar-h) + 20px); }

/* 2. Loader ---------------------------------------------- */
.loader-wrapper {
    position: fixed;
    inset: 0;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loader-wrapper.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader { display: flex; gap: 10px; }

.circle {
    width: 15px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: bounce 0.5s alternate infinite ease;
}
.circle:nth-child(2) { animation-delay: 0.15s; }
.circle:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounce {
    0% { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(-20px) scale(1.2); opacity: 1; box-shadow: 0 0 15px var(--primary-color); }
}

/* 3. Intro animations ------------------------------------ */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
.delay-1 { animation-delay: 0.25s; }
.delay-2 { animation-delay: 0.45s; }

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

@media (prefers-reduced-motion: reduce) {
    .fade-in-up { animation: none; opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
    body > header,
    body > main,
    body > footer {
        transition: none;
    }
    body.language-switching > header,
    body.language-switching > main,
    body.language-switching > footer {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* 4. Glass utilities ------------------------------------- */
.glass-effect {
    background: rgba(5, 5, 5, 0.55);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}
/* Fallback when backdrop-filter is unsupported */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass-effect { background: rgba(5, 5, 5, 0.92); }
}

.glass-tag {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 1px;
}

/* 5. Navbar ---------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-h);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.35s ease, box-shadow 0.35s ease;
    min-width: 0;
}
.navbar.scrolled {
    background: rgba(5, 5, 5, 0.85);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.logo {
    font-family: var(--font-title);
    font-size: 30px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.logo span { color: var(--text-main); text-shadow: none; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-main); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-icons {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 18px;
    min-width: 0;
    flex: 0 1 auto;
}
.nav-auth-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    min-width: 0;
}
.nav-auth-link {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--glass-bg);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.nav-auth-link.is-signed-in {
    max-width: 178px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.nav-auth-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-user-avatar {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
}
.nav-auth-link:hover,
.nav-auth-link.is-signed-in { color: var(--text-main); border-color: rgba(229, 9, 20, 0.45); }
.nav-auth-logout {
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    font: 600 12px/1 var(--font-ui);
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.nav-auth-logout:hover { color: var(--primary-color); border-color: rgba(229, 9, 20, 0.45); background: rgba(229, 9, 20, 0.08); }
.mobile-nav-auth-state { display: none; }
.mobile-nav-only { display: none; }
.lang-toggle {
    position: relative;
    overflow: hidden;
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 12px/1 var(--font-ui);
    letter-spacing: 0;
    transition:
        color 0.25s ease,
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}
.lang-toggle::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 8%, rgba(229, 9, 20, 0.22), transparent 92%);
    opacity: 0;
    transform: translateX(-120%);
    transition: opacity 0.25s ease, transform 0.34s ease;
    pointer-events: none;
}
.lang-toggle:hover {
    color: var(--primary-color);
    border-color: rgba(229, 9, 20, 0.45);
    background: rgba(229, 9, 20, 0.08);
    transform: translateY(-1px);
}
.lang-toggle.is-switching {
    color: #fff;
    border-color: rgba(229, 9, 20, 0.62);
    background: rgba(229, 9, 20, 0.12);
    box-shadow: 0 0 18px rgba(229, 9, 20, 0.18);
    transform: scale(0.96);
}
.lang-toggle.is-switching::after {
    opacity: 1;
    transform: translateX(120%);
}
.lang-toggle:disabled {
    cursor: default;
}
@media (prefers-reduced-motion: reduce) {
    .lang-toggle,
    .lang-toggle::after {
        transition: none;
    }
    .lang-toggle.is-switching {
        box-shadow: none;
        transform: none;
    }
    .lang-toggle.is-switching::after {
        opacity: 0;
        transform: none;
    }
}
.nav-icon-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-main);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.nav-icon-btn:hover { color: var(--primary-color); transform: scale(1.05); background: var(--glass-bg); }
.nav-search-btn {
    width: auto;
    min-width: 38px;
    padding: 0 12px;
    gap: 7px;
    border-color: var(--glass-border);
    border-radius: 999px;
    background: var(--glass-bg);
    font: 600 13px/1 var(--font-ui);
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    object-fit: cover;
}
.profile-img:hover { border-color: var(--primary-color); }

/* Hamburger button (hidden on desktop) */
.hamburger {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. Hero ------------------------------------------------ */
.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    background: url(../img/lala.jpeg) center/cover no-repeat;
    display: flex;
    align-items: center;
    padding: 0 5%;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #050505 0%, rgba(5,5,5,0.6) 40%, rgba(5,5,5,0) 100%),
        linear-gradient(0deg, #050505 0%, rgba(5,5,5,0) 30%);
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin-top: 50px;
}

.movie-title {
    font-family: var(--font-title);
    font-size: clamp(36px, 6vw, 75px);
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.movie-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 500;
    margin-bottom: 25px;
}
.match { color: #46d369; font-weight: 700; }

.movie-desc {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 35px;
    color: #d1d1d1;
}

.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }

.btn {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    font-family: inherit;
    text-decoration: none; /* keep .btn anchors (e.g. hero details) un-underlined */
}
.btn-play { background-color: var(--text-main); color: var(--bg-color); }
.btn-play:hover {
    background-color: var(--primary-color);
    color: var(--text-main);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(229, 9, 20, 0.3);
}
.btn-glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.05); }

/* 7. Movie section + cards ------------------------------- */
.movie-section {
    padding: 50px 5% 60px;
    position: relative;
    z-index: 2;
}
.view-all-section { margin-top: var(--navbar-h); }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    gap: 16px;
    flex-wrap: wrap;
}
.section-header h1,
.section-header h2 {
    color: #ffffff;
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 600;
}

.view-all {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.view-all:hover { color: var(--primary-color); }

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

.movie-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 2 / 3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
    background: #111;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

@media (hover: hover) {
    .movie-card:hover {
        transform: translateY(-12px) scale(1.03);
        box-shadow: 0 20px 30px rgba(0,0,0,0.8), 0 0 20px rgb(107, 0, 0);
        z-index: 10;
    }
    .movie-card:hover img { transform: scale(1.1); filter: brightness(0.7); }
    .movie-card:hover .card-glass-info { bottom: 0; }
}

/* Card info glass overlay */
.card-glass-info {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 10px 8px;
    background: linear-gradient(to top, rgba(5,5,5,0.95), rgba(5,5,5,0.6));
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--glass-border);
    transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Keep the overlay (title, rating, action buttons) above the stretched
       .card-link so those controls stay tappable. */
    z-index: 2;
}

/* On touch / no-hover devices the card info (title + rating) stays visible so
   the title is never hidden on mobile. */
@media (hover: none) {
    .card-glass-info { bottom: 0; }
}

/* Title + rating row. flex-wrap + min-width:0 let the title shrink/ellipsis so
   the fixed-width rating is never pushed past the card's clipped edge on narrow
   mobile cards; if it still can't fit beside the title it wraps to its own line
   instead of being cut off. */
.info-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; row-gap: 3px; }
.info-top h3,
.info-top h4 {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.rating { color: #f5c518; font-size: 11px; font-weight: 700; flex-shrink: 0; }

/* Stretched link: makes the whole poster a real, keyboard-focusable link to the
   dedicated title page. Most reliable tap target on touch devices. The glass
   info overlay (and its buttons) sits above it via z-index so they keep working. */
.card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    font-size: 0;
    text-decoration: none;
}
.card-link:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: -3px;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    min-width: 0;
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 12px;
    font-family: inherit;
    flex-shrink: 0;
}
.icon-btn:hover { background: var(--text-main); color: var(--bg-color); }
.icon-btn.is-loading { opacity: 0.6; cursor: progress; }
.icon-btn.is-error { background: rgba(255, 138, 138, 0.16); border-color: rgba(255, 138, 138, 0.7); color: #ff8a8a; }
.play-btn:hover { background: var(--primary-color); border-color: var(--primary-color); color: var(--text-main); }
.add-btn.is-active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

/* ---- Platform buttons (Cinemana / Vodu) ---- */
.platform-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    height: 30px;
}
.platform-btn {
    --platform-color: #888;
    --platform-glow: rgba(255,255,255,0.16);
    --platform-bg: rgba(255,255,255,0.04);
    width: 100%;
    height: 30px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: var(--platform-bg);
    color: var(--text-main);
    font: 800 10px/1 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.platform-logo-mark {
    max-width: 100%;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--platform-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.7px;
    line-height: 1;
    text-transform: uppercase;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.platform-logo-img {
    width: auto;
    height: 18px;
    max-width: 42px;
    max-height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex: 0 0 auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.12));
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), filter 0.25s ease;
}

/* Per-brand colors - non-trademarked accent only */
.platform-btn--cinemana {
    --platform-color: #ffb347;
    --platform-glow: rgba(255, 179, 71, 0.35);
    --platform-bg: rgba(255, 179, 71, 0.08);
}
.platform-btn--vodu {
    --platform-color: #4ea8ff;
    --platform-glow: rgba(78, 168, 255, 0.35);
    --platform-bg: rgba(78, 168, 255, 0.08);
}

/* Hover lift + subtle glow (only on hover-capable devices) */
@media (hover: hover) {
    .platform-btn:not(.is-disabled):hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,0.07);
        border-color: var(--platform-color);
        box-shadow: 0 6px 16px var(--platform-glow), 0 0 0 1px rgba(255,255,255,0.04);
    }
    .platform-btn:not(.is-disabled):hover .platform-logo-mark,
    .platform-btn:not(.is-disabled):hover .platform-logo-img {
        transform: translateY(-3px);
    }
    .platform-btn:not(.is-disabled):hover .platform-logo-mark {
        border-color: var(--platform-color);
        box-shadow: 0 4px 12px var(--platform-glow), inset 0 0 0 1px rgba(255,255,255,0.05);
    }
    .platform-btn:not(.is-disabled):hover .platform-logo-img {
        filter: drop-shadow(0 4px 10px var(--platform-glow));
    }
}

.platform-btn:focus-visible {
    outline: 2px solid var(--platform-color);
    outline-offset: 2px;
}

.platform-btn.is-disabled {
    cursor: not-allowed;
    opacity: 0.5;
    filter: grayscale(0.4);
    background: rgba(255,255,255,0.02);
}
.platform-btn.is-disabled .platform-logo-mark {
    transform: none;
    border-color: var(--glass-border);
    background: rgba(255,255,255,0.02);
    box-shadow: none;
    color: var(--text-muted);
}
.platform-btn.is-disabled .platform-logo-img {
    transform: none;
    opacity: 0.72;
    filter: grayscale(0.65);
}

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

/* 8. Modal ----------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.is-open { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.modal-content {
    position: relative;
    max-width: 560px;
    width: 100%;
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    background: rgba(15,15,15,0.92);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 30px 26px 24px;
    color: var(--text-main);
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
}
.modal-content h2 {
    font-family: var(--font-title);
    font-size: 22px;
    margin-bottom: 12px;
    color: #fff;
}
.modal-content p,
.modal-body { color: #d1d1d1; line-height: 1.6; font-size: 15px; }
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 0;
    color: var(--text-main);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}
.modal-close:hover { background: var(--glass-bg); color: var(--primary-color); }
.modal.is-search-modal .modal-content {
    max-width: 760px;
    max-height: min(82vh, 720px);
    overflow: hidden;
}
.search-modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.search-modal-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
    padding: 12px 14px;
    font: 500 15px/1.2 var(--font-ui);
    color-scheme: dark;
}
.search-modal-input:focus {
    outline: none;
    border-color: rgba(229, 9, 20, 0.72);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16);
}
.search-modal-status {
    margin: 0;
    min-height: 22px;
    color: var(--text-muted);
    font-size: 14px;
}
.search-modal-status[hidden] { display: none; }
.search-modal-status[data-kind="error"] { color: #ffb2b2; }
.search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(52vh, 430px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.search-results::-webkit-scrollbar { width: 6px; }
.search-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
}
.search-result {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.045);
}
.search-result:focus-visible {
    outline: 2px solid rgba(229, 9, 20, 0.72);
    outline-offset: 2px;
}
.search-result-poster img {
    width: 58px;
    height: 82px;
    display: block;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
}
.search-result-main {
    min-width: 0;
}
.search-result-main h3 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-meta,
.search-result-age {
    margin: 0;
    color: #aaa;
    font-size: 12px;
    line-height: 1.45;
}
.search-result-age {
    color: #7f7f7f;
}
.search-result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}
.search-platform-row {
    max-width: 220px;
    flex: 1 1 180px;
}
.search-watch-btn {
    flex: 0 0 auto;
}

/* 9. View-all status box --------------------------------- */
.status-box {
    color: var(--text-muted);
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px dashed transparent;
    font-size: 14px;
}
.status-box:empty { display: none; }
.status-box[data-kind="loading"] { color: #ccc; border-color: var(--glass-border); background: var(--glass-bg); }
.status-box[data-kind="setup"]   { color: #ffd66e; border-color: rgba(255, 214, 110, 0.4); background: rgba(255, 214, 110, 0.08); }
.status-box[data-kind="error"]   { color: #ff8a8a; border-color: rgba(255, 138, 138, 0.4); background: rgba(255, 138, 138, 0.08); }
.status-box[data-kind="empty"]   { color: var(--text-muted); border-color: var(--glass-border); }
.status-box[data-kind="success"] { color: #89e5a2; border-color: rgba(70, 211, 105, 0.35); background: rgba(70, 211, 105, 0.08); }

/* 9b. Dedicated title page ------------------------------- */
.title-detail-page {
    max-width: 1080px;
}
.title-detail {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}
.title-detail[hidden] { display: none; }
.title-detail-poster {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #111;
    box-shadow: 0 20px 44px rgba(0,0,0,0.55);
    border: 1px solid var(--glass-border);
}
.title-detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.title-detail-info { min-width: 0; }
.title-detail-info h1 {
    font-family: var(--font-title);
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 14px;
    line-height: 1.1;
}
.title-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.title-detail-meta .glass-tag {
    font-size: 13px;
    letter-spacing: 0.5px;
}
.title-detail-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.title-detail-rating .rating-label {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.title-detail-desc {
    color: #d6d6d6;
    line-height: 1.75;
    font-size: 16px;
    margin-bottom: 22px;
}
.title-detail-platforms {
    height: auto;
    max-width: 360px;
    margin-bottom: 16px;
}
.title-detail-page .platform-btn {
    height: 44px;
    gap: 8px;
    border-radius: 10px;
    font-size: 12px;
}
.title-detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.title-detail-actions .add-btn {
    width: auto;
    height: 44px;
    border-radius: 10px;
    padding: 0 18px;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
}
.title-not-found {
    text-align: center;
    padding: 60px 20px;
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
}
.title-not-found[hidden] { display: none; }
.title-not-found h2 { font-family: var(--font-title); margin-bottom: 10px; }
.title-not-found .btn { text-decoration: none; }
.title-state-actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Back / Share topbar */
.title-topbar .btn-small {
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
}
.title-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.title-topbar .btn { text-decoration: none; }
.title-back-btn,
.title-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.title-share-btn[hidden] { display: none; }
html[dir="rtl"] .title-back-btn i,
html[dir="rtl"] .title-share-btn i { transform: scaleX(-1); }

/* Cinematic loading skeleton */
.title-loading {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}
.title-loading[hidden] { display: none; }
.title-loading-poster {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
}
.title-loading-lines {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 8px;
}
.title-loading-line { height: 18px; border-radius: 8px; width: 100%; }
.title-loading-line.is-title { height: 38px; width: 70%; }
.title-loading-line.is-short { width: 45%; }
.cv-shimmer {
    background: linear-gradient(100deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 70%);
    background-size: 200% 100%;
    animation: cvShimmer 1.4s ease-in-out infinite;
}
@keyframes cvShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .cv-shimmer { animation: none; }
}

/* Poster fallback: don't stretch the logo, contain it cleanly. */
.title-detail-poster.is-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
}
.title-detail-poster.is-fallback img {
    object-fit: contain;
    padding: 18%;
}

/* Related titles */
.title-related {
    margin-top: 40px;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.title-related[hidden] { display: none; }
.title-related h2 {
    font-family: var(--font-title);
    font-size: 22px;
    letter-spacing: 1px;
    margin-bottom: 18px;
}
.title-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}
.related-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.related-card-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    border: 1px solid var(--glass-border);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.related-card-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-card-poster.is-fallback { display: flex; align-items: center; justify-content: center; background: #0d0d0d; }
.related-card-poster.is-fallback img { object-fit: contain; padding: 20%; }
.related-card:hover .related-card-poster,
.related-card:focus-visible .related-card-poster {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.5);
}
.related-card-title {
    font-size: 13px;
    color: #d6d6d6;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Interactions: likes / ratings / comments */
.title-interactions {
    margin-top: 40px;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.title-interactions[hidden] { display: none; }
.interaction-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-main);
    font: 600 14px/1 var(--font-ui);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}
.like-btn:hover { transform: translateY(-1px); border-color: rgba(229, 9, 20, 0.45); }
.like-btn.is-active {
    color: #fff;
    border-color: rgba(229, 9, 20, 0.6);
    background: rgba(229, 9, 20, 0.16);
}
.like-btn.is-active i { color: var(--primary-color); }
.like-btn:disabled { opacity: 0.6; cursor: progress; }
.interaction-avg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cfcfcf;
    font-size: 14px;
}
.interaction-avg strong { color: #f5c518; }
.user-rating-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    margin-bottom: 28px;
}
.user-rating-box label {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.rate-stars { display: inline-flex; gap: 4px; }
.rate-star {
    background: transparent;
    border: 0;
    color: #6a6a6a;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 2px;
    transition: color 0.15s ease, transform 0.15s ease;
}
.rate-star:hover { transform: scale(1.12); }
.rate-star.is-on { color: #f5c518; }
.rate-stars.is-busy .rate-star { opacity: 0.6; cursor: progress; }
.user-rating-value { color: #cfcfcf; font-size: 13px; min-width: 3.5em; }
.comments-section h2 {
    font-family: var(--font-title);
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.comment-form { margin-bottom: 22px; }
.comment-form textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
}
.comment-form textarea:focus {
    outline: none;
    border-color: rgba(229, 9, 20, 0.6);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16);
}
.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.comment-count-hint { color: #8f8f8f; font-size: 12px; }
.comment-login-prompt {
    padding: 16px;
    border: 1px dashed var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,0.025);
    color: var(--text-muted);
    margin-bottom: 22px;
}
.comment-login-prompt a { color: var(--primary-color); text-decoration: underline; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.comment-item {
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
}
.comment-item-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}
.comment-author { color: #fff; font-weight: 600; font-size: 14px; }
.comment-date { color: #8f8f8f; font-size: 12px; flex-shrink: 0; }
.comment-body { color: #d6d6d6; line-height: 1.6; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.comments-empty { color: var(--text-muted); font-size: 14px; }

.comment-item-actions { margin-top: 8px; }
.comment-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 2px 0;
    color: #8f8f8f;
    font-size: 12px;
    cursor: pointer;
}
.comment-report-btn:hover { color: #d6d6d6; }
.comment-report-btn[disabled] { opacity: 0.5; cursor: default; }

/* Admin moderation list */
.admin-comment-list { display: flex; flex-direction: column; gap: 12px; }
.admin-comment-row {
    padding: 12px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
}
.admin-comment-row.is-hidden { opacity: 0.65; }
.admin-comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
}
.admin-comment-meta { color: #8f8f8f; font-size: 12px; }
.admin-comment-reports { color: #ffb4b4; font-size: 12px; font-weight: 600; }
.admin-comment-hidden-tag { color: #ffd27f; font-size: 12px; font-weight: 600; }
.admin-comment-body { color: #d6d6d6; line-height: 1.6; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.admin-comment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

html[dir="rtl"] .comment-item-head { flex-direction: row-reverse; }
html[dir="rtl"] .title-detail-platforms { direction: ltr; }

@media screen and (max-width: 768px) {
    .title-detail {
        grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
        gap: 20px;
    }
}
@media screen and (max-width: 540px) {
    .title-detail-page {
        /* Keep the poster clear of the fixed navbar and give the column room. */
        padding-left: 5%;
        padding-right: 5%;
    }
    .title-detail {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .title-detail-poster {
        width: 100%;
        max-width: 200px;
        max-height: 58vh;
        margin: 0 auto;
    }
    .title-detail-info { text-align: center; }
    .title-detail-info h1 {
        font-size: clamp(22px, 6vw, 30px);
        letter-spacing: 1px;
    }
    .title-detail-meta,
    .title-detail-rating,
    .title-detail-actions { justify-content: center; }
    .title-detail-desc {
        font-size: 15px;
        text-align: left;
    }
    /* Platform buttons stack full-width so the logos/labels never get crushed. */
    .title-detail-platforms {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .title-detail-page .platform-btn {
        width: 100%;
        height: 46px;
    }
    .title-detail-actions .add-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        white-space: nowrap;
    }
    /* Interactions: keep likes / rating / comments readable and full width. */
    .interaction-bar {
        gap: 12px;
        justify-content: center;
    }
    .user-rating-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }
    .user-rating-box .rate-stars { justify-content: center; }
    .comment-form textarea { width: 100%; }
    .comment-form-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
    }
    .comment-form-footer .btn { width: 100%; justify-content: center; }
    .comment-item-head { flex-wrap: wrap; }
    /* Loading skeleton stacks like the real layout. */
    .title-loading {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .title-loading-poster {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    .title-loading-lines { align-items: center; }
    .title-loading-line,
    .title-loading-line.is-title,
    .title-loading-line.is-short { width: 100%; max-width: 320px; }
    /* Related grid: tighter cards, no horizontal overflow at 360px. */
    .title-related-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
        gap: 12px;
    }
    .title-topbar { gap: 8px; }
}

/* 9c. Report-a-problem floating button ------------------- */
.report-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1500;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(135deg, #25d366, #1aa851);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(0,0,0,0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.report-fab:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 18px 32px rgba(0,0,0,0.5);
    filter: brightness(1.05);
}
.report-fab:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}
.report-fab .report-fab-label {
    position: absolute;
    right: calc(100% + 10px);
    white-space: nowrap;
    background: rgba(5,5,5,0.92);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 13px;
    color: var(--text-main);
    opacity: 0;
    transform: translateX(6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.report-fab:hover .report-fab-label,
.report-fab:focus-visible .report-fab-label {
    opacity: 1;
    transform: translateX(0);
}
html[dir="rtl"] .report-fab { right: auto; left: 18px; }
html[dir="rtl"] .report-fab .report-fab-label {
    right: auto;
    left: calc(100% + 10px);
    transform: translateX(-6px);
}
html[dir="rtl"] .report-fab:hover .report-fab-label,
html[dir="rtl"] .report-fab:focus-visible .report-fab-label { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
    .report-fab,
    .report-fab .report-fab-label { transition: none; }
}

/* 10. Footer --------------------------------------------- */
.site-footer {
    padding: 60px 5% 30px;
    color: var(--text-muted);
    background: linear-gradient(to top, #000 0%, transparent 100%);
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-family: var(--font-title);
    font-size: 14px;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--text-main); }

.social-icons {
    font-size: 20px;
    display: flex;
    gap: 18px;
    color: var(--text-main);
}
.social-icons a {
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-flex;
}
.social-icons a:hover { color: var(--primary-color); transform: scale(1.1); }

.cine { color: #c50000; }
.copyright {
    font-size: 12px;
    letter-spacing: 1px;
    font-family: var(--font-title);
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

/* 11. Auxiliary pages (about/contact/policy/404) -------- */
.page-section {
    max-width: 820px;
    margin: 0 auto;
    padding: calc(var(--navbar-h) + 50px) 5% 60px;
}
.page-section h1 {
    font-family: var(--font-title);
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.page-section h2 {
    font-family: var(--font-title);
    font-size: clamp(18px, 2.4vw, 24px);
    margin: 30px 0 12px;
    color: #fff;
    letter-spacing: 2px;
}
.page-section p,
.page-section li {
    color: #d1d1d1;
    line-height: 1.75;
    font-size: 16px;
    margin-bottom: 12px;
}
.page-section ul { padding-left: 22px; }
.page-section a { color: var(--primary-color); text-decoration: underline; }

/* Legal / info pages: hero + card sections */
.legal-hero { margin-bottom: 26px; }
.legal-hero h1 { margin-bottom: 10px; }
.legal-meta { color: var(--text-muted); font-size: 13px; letter-spacing: 0.04em; margin-bottom: 8px; }
.legal-lead { color: #e4e4e4; font-size: 17px; line-height: 1.7; max-width: 60ch; }
.legal-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 16px;
}
.legal-card h2 { margin-top: 0; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.legal-actions .btn { text-decoration: none; }
@media screen and (max-width: 540px) {
    .legal-card { padding: 16px 16px; }
    .legal-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}
.contact-form label { font-size: 14px; color: var(--text-muted); }
.contact-form input,
.contact-form select,
.contact-form textarea {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 14px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
}
.contact-form select { min-height: 46px; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button { align-self: flex-start; }
.password-field {
    position: relative;
    width: 100%;
}
.password-field input {
    display: block;
    width: 100%;
    padding-right: 52px;
}
.contact-form .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
    align-self: auto;
    font-size: 15px;
    line-height: 1;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
.contact-form .password-toggle:hover,
.contact-form .password-toggle:focus-visible {
    color: var(--primary-color);
    background: transparent;
    text-shadow: 0 0 12px rgba(229, 9, 20, 0.45);
}
.contact-form .password-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}
.form-status { font-size: 14px; color: #46d369; min-height: 1.3em; }

.error-page { text-align: center; padding-top: calc(var(--navbar-h) + 90px); }
.error-page .code {
    font-family: var(--font-title);
    font-size: clamp(80px, 14vw, 160px);
    color: var(--primary-color);
    letter-spacing: 6px;
    line-height: 1;
}

/* Auth pages (login / register) */
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: rgba(15,15,15,0.7);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 14px;
    padding: 36px 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.auth-card h1 {
    font-family: var(--font-title);
    font-size: 28px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.auth-card .auth-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}
.auth-card .auth-swap {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}
.auth-card .auth-swap a {
    color: var(--primary-color);
    text-decoration: underline;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
}
.auth-divider span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.75);
    box-shadow: 0 0 16px rgba(229, 9, 20, 0.55);
}
.google-auth-btn {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: 700 14px/1 var(--font-ui);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.google-auth-btn i {
    color: #fff;
    font-size: 16px;
}
.google-auth-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(229, 9, 20, 0.45);
    background: rgba(229, 9, 20, 0.1);
}
.google-auth-btn:disabled {
    cursor: wait;
    opacity: 0.78;
    transform: none;
}
.oauth-card { text-align: center; }
.oauth-fallback { margin-top: 16px; }
.auth-banner {
    display: block;
    margin: 0 auto 24px;
    max-width: 440px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 214, 110, 0.08);
    border: 1px dashed rgba(255, 214, 110, 0.4);
    color: #ffd66e;
    font-size: 13px;
    line-height: 1.5;
}
.auth-banner[hidden],
.auth-banner:empty,
.status-box[hidden] {
    display: none;
}

/* My List page */
.my-list-page {
    max-width: 1280px;
    padding-top: calc(var(--navbar-h) + 42px);
}
.mylist-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mylist-heading h1 {
    margin-bottom: 6px;
    line-height: 1.05;
}
.mylist-heading .user-actions {
    justify-content: flex-end;
    margin-bottom: 0;
}
.mylist-count {
    min-height: 1.4em;
    color: #b8b8b8;
    font-size: 14px;
    margin-bottom: 0;
}
.mylist-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(170px, 220px);
    gap: 12px;
    align-items: end;
    margin: 18px 0;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
        rgba(12,12,12,0.78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.mylist-toolbar[hidden] {
    display: none;
}
.mylist-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.mylist-filter-field label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.mylist-input-shell {
    position: relative;
}
.mylist-input-shell i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 13px;
    pointer-events: none;
}
.mylist-toolbar input,
.mylist-toolbar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.055);
    color: var(--text-main);
    font: 500 14px/1.2 var(--font-ui);
}
.mylist-toolbar input {
    padding: 0 14px 0 40px;
}
.mylist-toolbar select {
    padding: 0 12px;
}
.mylist-toolbar input::placeholder {
    color: #777;
}
.mylist-toolbar input:focus,
.mylist-toolbar select:focus {
    border-color: rgba(229, 9, 20, 0.58);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16);
    outline: none;
}
.mylist-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.mylist-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    min-height: 178px;
    aspect-ratio: auto;
    overflow: hidden;
    cursor: default;
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
        rgba(13,13,13,0.9);
    box-shadow: 0 16px 34px rgba(0,0,0,0.36);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (hover: hover) {
    .mylist-card:hover {
        transform: translateY(-4px);
        border-color: rgba(229, 9, 20, 0.32);
        box-shadow: 0 22px 40px rgba(0,0,0,0.46), 0 0 0 1px rgba(229, 9, 20, 0.08);
    }
}
.mylist-poster-frame {
    min-height: 100%;
    background: #111;
}
.mylist-poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mylist-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 13px;
}
.mylist-card-heading h2 {
    color: #fff;
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mylist-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.mylist-meta-item {
    min-width: 0;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.045);
    color: #cfcfcf;
    font-size: 12px;
    line-height: 1.1;
}
.mylist-meta-item i {
    color: #8f8f8f;
    font-size: 10px;
}
.mylist-rating {
    color: #f5c518;
    border-color: rgba(245, 197, 24, 0.2);
    background: rgba(245, 197, 24, 0.08);
}
.mylist-rating i {
    color: #f5c518;
}
.mylist-card-actions {
    display: grid;
    gap: 8px;
    margin-top: auto;
}
.mylist-platform-row {
    height: auto;
    direction: ltr;
}
.my-list-page .platform-btn {
    height: 36px;
    justify-content: flex-start;
    gap: 7px;
    padding: 0 9px;
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
}
.my-list-page .platform-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    font-weight: 800;
}
.my-list-page .platform-logo-mark,
.my-list-page .platform-logo-img {
    flex: 0 0 auto;
}
.mylist-remove-btn {
    width: 100%;
    min-height: 38px;
    justify-content: center;
    padding: 10px 12px;
    color: #ffb2b2;
    border-color: rgba(255, 138, 138, 0.22);
    text-decoration: none;
}
.mylist-remove-btn:hover:not(:disabled) {
    color: #fff;
    border-color: rgba(255, 138, 138, 0.42);
    background: rgba(229, 9, 20, 0.13);
    transform: translateY(-1px);
}
.mylist-empty {
    text-align: center;
    padding: 54px 20px;
    border: 1px dashed var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.025);
}
.mylist-empty > i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 50%;
    color: #fff;
    background: rgba(229, 9, 20, 0.18);
    border: 1px solid rgba(229, 9, 20, 0.32);
}
.mylist-empty h2 {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 22px;
    letter-spacing: 0;
}
.mylist-empty p {
    max-width: 440px;
    margin: 0 auto;
    color: #b8b8b8;
}
.mylist-empty .btn {
    margin-top: 18px;
    color: var(--bg-color);
    text-decoration: none;
}
.mylist-empty .btn-glass {
    color: var(--text-main);
}
.mylist-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.mylist-confirm-remove {
    background: linear-gradient(135deg, #f32630, #a9060e);
    color: #fff;
}
.mylist-remove-modal .modal-content {
    max-width: 460px;
    border-radius: 8px;
}
.mylist-remove-modal h2 {
    letter-spacing: 0;
}
.mylist-remove-modal .btn:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 13px;
    color: var(--text-main);
}
.user-chip strong { color: var(--primary-color); }
.user-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Admin dashboard */
.admin-page {
    max-width: 1280px;
    padding-top: calc(var(--navbar-h) + 42px);
}
.admin-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-heading-copy {
    max-width: 680px;
}
.admin-heading h1 {
    margin-bottom: 8px;
    letter-spacing: 0;
    line-height: 1.05;
}
.admin-heading p {
    max-width: 560px;
    color: #b8b8b8;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
}
.admin-heading .user-actions {
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0;
}
.admin-page .user-chip {
    min-height: 38px;
    background: rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.admin-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
    gap: 22px;
    align-items: start;
}
.admin-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.026)),
        rgba(12,12,12,0.82);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 26px 70px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.06);
}
.admin-panel::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, rgba(229,9,20,0.8), rgba(255,255,255,0.18), transparent);
    pointer-events: none;
}
.admin-panel h2 {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}
.admin-form {
    gap: 18px;
    margin-top: 0;
}
.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}
.admin-form-grid > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}
.admin-field-wide { grid-column: 1 / -1; }
.field-helper {
    margin: -1px 0 0;
    color: #8f8f8f;
    font-size: 12px;
    line-height: 1.45;
}
.admin-form label {
    color: #c7c7c7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 46px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--text-main);
    border-radius: 8px;
    padding: 12px 13px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.admin-form select {
    background-color: #151515;
    color: #f2f2f2;
    color-scheme: dark;
}
.admin-form select option,
.admin-form select optgroup {
    background-color: #151515;
    color: #f2f2f2;
}
.admin-form select option:checked {
    background-color: #2a0b0f;
    color: #ffffff;
}
.admin-form select option:disabled {
    color: #777;
}
.admin-form textarea {
    min-height: 126px;
    line-height: 1.55;
}
.admin-form input:hover,
.admin-form select:hover,
.admin-form textarea:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.07);
}
.admin-form select:hover {
    background-color: #1a1a1a;
}
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: rgba(229, 9, 20, 0.72);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16), inset 0 1px 0 rgba(255,255,255,0.05);
}
.admin-form select:focus {
    background-color: #1a1a1a;
    color: #ffffff;
}
.admin-form input[aria-invalid="true"] {
    border-color: rgba(255, 138, 138, 0.72);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16), inset 0 1px 0 rgba(255,255,255,0.05);
}
.admin-poster-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(0,0,0,0.24);
}
.admin-poster-preview[hidden] { display: none; }
.admin-poster-preview img {
    width: 48px;
    height: 70px;
    flex: 0 0 48px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
}
.admin-poster-preview img[hidden] { display: none; }
.admin-poster-preview p {
    margin: 0;
    color: #aaa;
    font-size: 12px;
    line-height: 1.45;
}
.admin-form-actions,
.admin-list-heading,
.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-form-actions {
    justify-content: flex-start;
    gap: 12px;
    margin-top: 4px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.admin-list-heading {
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 14px;
}
.admin-list-heading h2 { margin-bottom: 0; }
.admin-list-tools {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(132px, 0.45fr);
    gap: 12px;
    margin-bottom: 12px;
}
.admin-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.admin-filter-field label,
.admin-platform-filters legend {
    color: #c7c7c7;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}
.admin-filter-field input,
.admin-filter-field select {
    width: 100%;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.055);
    color: var(--text-main);
    padding: 10px 12px;
    color-scheme: dark;
}
.admin-filter-field select,
.admin-filter-field select option {
    background-color: #151515;
    color: #f2f2f2;
}
.admin-filter-field input:focus,
.admin-filter-field select:focus {
    outline: none;
    border-color: rgba(229, 9, 20, 0.72);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.16);
}
.admin-platform-filters {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}
.admin-platform-filters legend {
    width: 100%;
    margin-bottom: 1px;
}
.admin-platform-filters label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #cfcfcf;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.admin-platform-filters input {
    width: 13px;
    height: 13px;
    accent-color: var(--primary-color);
}
.admin-visible-count {
    min-height: 18px;
    margin: 0 0 12px;
    color: #9d9d9d;
    font-size: 12px;
    line-height: 1.4;
}
.admin-page .btn {
    min-height: 38px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1;
    box-shadow: none;
}
.admin-page .btn:hover {
    transform: translateY(-1px);
}
.admin-page .btn:active {
    transform: translateY(0);
}
.admin-page .btn:disabled,
.admin-page .btn:disabled:hover {
    transform: none;
}
.admin-page .btn-play {
    background: linear-gradient(135deg, #f32630, #a9060e);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 26px rgba(229, 9, 20, 0.22);
}
.admin-page .btn-play:hover {
    background: linear-gradient(135deg, #ff3640, #c50711);
    color: #fff;
    box-shadow: 0 16px 30px rgba(229, 9, 20, 0.28);
}
.admin-page .btn-glass {
    background: rgba(255,255,255,0.055);
    border-color: rgba(255,255,255,0.14);
    color: #ececec;
}
.admin-page .btn-glass:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.22);
}
.admin-page .btn-small {
    min-height: 32px;
    padding: 8px 11px;
    font-size: 12px;
}
.admin-title-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 2px;
}
.admin-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, auto) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.admin-title-row:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.058);
    transform: translateY(-1px);
}
.admin-title-info { min-width: 0; }
.admin-title-info h3 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-title-meta,
.admin-empty {
    color: #a8a8a8;
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 0;
}
.admin-title-slug {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: #777;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-title-watchlist {
    margin: 7px 0 0;
    color: #ffd98a;
    font-size: 11px;
    line-height: 1.4;
}
.admin-poster-missing-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 7px 0 0;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 170, 90, 0.4);
    background: rgba(255, 150, 60, 0.12);
    color: #ffb066;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
}
.admin-poster-warning {
    color: #ffb066;
}
.admin-poster-warning[hidden] { display: none; }
.admin-empty {
    padding: 34px 18px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 8px;
    background: rgba(255,255,255,0.026);
}
.admin-link-states {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.admin-link-states span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    color: #a9a9a9;
    background: rgba(255,255,255,0.035);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.admin-link-states .is-set {
    color: #7ee79b;
    border-color: rgba(70, 211, 105, 0.34);
    background: rgba(70, 211, 105, 0.085);
}
.admin-link-states .is-empty {
    color: #a7a7a7;
    border-color: rgba(255,255,255,0.1);
}
.admin-row-actions {
    justify-content: flex-end;
}
.admin-delete-btn {
    color: #ffb0b0;
    border-color: rgba(255, 138, 138, 0.22);
}
.admin-delete-btn:hover:not(:disabled) {
    color: #fff;
    border-color: rgba(255, 138, 138, 0.42);
    background: rgba(229, 9, 20, 0.13);
}
.admin-delete-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}
.admin-delete-btn.is-blocked {
    color: #ffd98a;
    border-color: rgba(255, 214, 110, 0.28);
}
.admin-delete-modal .modal-content {
    max-width: 460px;
    border-radius: 8px;
}
.admin-delete-modal h2 {
    letter-spacing: 0;
}
.admin-modal-warning {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 214, 110, 0.32);
    background: rgba(255, 214, 110, 0.08);
    color: #ffd98a;
    font-size: 13px;
}
.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.admin-delete-confirm-btn {
    background: linear-gradient(135deg, #f32630, #a9060e);
}
.admin-page .status-box,
.admin-page .auth-banner,
.admin-page .form-status:not(:empty) {
    margin-bottom: 18px;
    border-radius: 8px;
    border-style: solid;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.admin-page .status-box {
    max-width: none;
    padding: 12px 14px;
}
.admin-page .status-box[data-kind="loading"],
.admin-page .form-status[data-kind="loading"] {
    color: #d9d9d9;
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.055);
}
.admin-page .status-box[data-kind="error"],
.admin-page .form-status[data-kind="error"] {
    color: #ffb2b2;
    border-color: rgba(255, 138, 138, 0.32);
    background: rgba(229, 9, 20, 0.1);
}
.admin-page .auth-banner {
    max-width: none;
    padding: 13px 15px;
    color: #ffd98a;
    border-color: rgba(255, 214, 110, 0.35);
    background: rgba(255, 214, 110, 0.085);
}
.admin-page .form-status {
    min-height: 0;
    margin: 0;
}
.admin-page .form-status:not(:empty) {
    display: inline-flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 11px 13px;
    color: #89e5a2;
    border: 1px solid rgba(70, 211, 105, 0.28);
    background: rgba(70, 211, 105, 0.075);
}
.admin-page .form-status:empty {
    display: none;
}

@media screen and (min-width: 961px) {
    .admin-panel-list {
        position: sticky;
        top: calc(var(--navbar-h) + 22px);
    }
    .admin-title-list {
        max-height: calc(100vh - var(--navbar-h) - 184px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.22) transparent;
    }
    .admin-title-list::-webkit-scrollbar { width: 6px; }
    .admin-title-list::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
        border-radius: 999px;
    }
}

/* RTL language support ----------------------------------- */
html[dir="rtl"] body {
    direction: rtl;
}
html[dir="rtl"] .skip-link {
    left: auto;
    right: -9999px;
    border-radius: 0 0 0 8px;
}
html[dir="rtl"] .skip-link:focus {
    right: 0;
    left: auto;
}
html[dir="rtl"] .logo,
html[dir="rtl"] .platform-btn,
html[dir="rtl"] .platform-logo-mark,
html[dir="rtl"] .platform-logo-img,
html[dir="rtl"] .rating,
html[dir="rtl"] .admin-title-slug,
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="password"],
html[dir="rtl"] #adminSlug,
html[dir="rtl"] #adminPoster,
html[dir="rtl"] #adminCinemanaUrl,
html[dir="rtl"] #adminVoduUrl {
    direction: ltr;
    unicode-bidi: isolate;
}
html[dir="rtl"] .contact-form input,
html[dir="rtl"] .contact-form select,
html[dir="rtl"] .contact-form textarea,
html[dir="rtl"] .search-modal-input,
html[dir="rtl"] .mylist-toolbar input,
html[dir="rtl"] .mylist-toolbar select,
html[dir="rtl"] .search-result-main {
    text-align: right;
}
html[dir="rtl"] .contact-form input[type="email"],
html[dir="rtl"] .contact-form input[type="url"],
html[dir="rtl"] .contact-form input[type="password"],
html[dir="rtl"] #adminSlug,
html[dir="rtl"] #adminPoster,
html[dir="rtl"] #adminCinemanaUrl,
html[dir="rtl"] #adminVoduUrl {
    text-align: left;
}
html[dir="rtl"] .password-field input {
    padding-right: 14px;
    padding-left: 52px;
}
html[dir="rtl"] .contact-form .password-toggle {
    right: auto;
    left: 14px;
}
html[dir="rtl"] .modal-close {
    right: auto;
    left: 10px;
}
html[dir="rtl"] .mylist-input-shell i {
    left: auto;
    right: 14px;
}
html[dir="rtl"] .mylist-toolbar input {
    padding-right: 40px;
    padding-left: 14px;
}
html[dir="rtl"] .platform-row,
html[dir="rtl"] .mylist-platform-row,
html[dir="rtl"] .card-actions,
html[dir="rtl"] .social-icons {
    direction: ltr;
}
html[dir="rtl"] .admin-link-states,
html[dir="rtl"] .admin-row-actions {
    justify-content: flex-start;
}

/* 12. Responsive ----------------------------------------- */
@media screen and (max-width: 960px) {
    .navbar {
        padding: 0 24px;
        gap: 12px;
    }
    .hamburger { display: inline-flex; }
    .nav-links {
        position: fixed;
        top: var(--navbar-h);
        right: 0;
        width: min(78vw, 320px);
        max-width: 100vw;
        height: calc(100vh - var(--navbar-h));
        height: calc(100dvh - var(--navbar-h));
        overflow-y: auto;
        background: rgba(5, 5, 5, 0.96);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 28px;
        gap: 22px;
        transform: translateX(110%);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transition:
            transform 0.35s ease,
            opacity 0.2s ease,
            visibility 0s linear 0.35s;
        border-left: 1px solid var(--glass-border);
        box-shadow: -8px 0 30px rgba(0,0,0,0.4);
    }
    .nav-links a { font-size: 18px; color: var(--text-main); }
    .nav-links.is-open {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transition-delay: 0s;
    }
    .mobile-nav-only { display: block; }
    .mobile-nav-auth-state {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
        margin-top: auto;
        padding-top: 22px;
        border-top: 1px solid var(--glass-border);
    }
    .mobile-nav-auth-link,
    .mobile-nav-auth-logout {
        width: 100%;
        min-height: 42px;
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        background: var(--glass-bg);
        color: var(--text-main);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font: 600 15px/1 var(--font-ui);
        cursor: pointer;
    }
    .mobile-nav-auth-logout { color: #ffb1b1; }
    html[dir="rtl"] .nav-links {
        right: auto;
        left: 0;
        transform: translateX(-110%);
        border-left: 0;
        border-right: 1px solid var(--glass-border);
        box-shadow: 8px 0 30px rgba(0,0,0,0.4);
    }
    html[dir="rtl"] .nav-links.is-open { transform: translateX(0); }
    html[dir="rtl"] .nav-links a::after {
        left: auto;
        right: 0;
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .report-fab {
        opacity: 0;
        pointer-events: none;
    }
    .nav-icons #notifToggle,
    .nav-icons .profile-img,
    .nav-icons .nav-auth-state { display: none; }
    .nav-icons {
        gap: 8px;
        margin-left: auto;
        flex: 0 0 auto;
    }
    html[dir="rtl"] .nav-icons {
        margin-left: 0;
        margin-right: auto;
    }
    .nav-icon-btn,
    .lang-toggle,
    .hamburger {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
    .nav-icon-btn.nav-search-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        max-width: 34px;
        max-height: 34px;
        flex: 0 0 34px;
        padding: 0;
        gap: 0;
        border-radius: 50%;
        overflow: hidden;
    }
    .nav-search-btn > .search-label { display: none; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-panel { padding: 22px; }
    .admin-list-tools { grid-template-columns: 1fr; }
    .admin-title-row { grid-template-columns: 1fr; }
    .admin-link-states { justify-content: flex-start; }
    .admin-row-actions { justify-content: flex-start; }
}

@media screen and (max-width: 768px) {
    .navbar { padding: 0 16px; gap: 12px; }

    .hero-content { text-align: center; }
    .movie-meta { justify-content: center; }
    .hero-buttons { justify-content: center; }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .my-list-page {
        padding-top: calc(var(--navbar-h) + 32px);
    }
    .mylist-heading {
        flex-direction: column;
        gap: 16px;
    }
    .mylist-heading .user-actions {
        justify-content: flex-start;
    }
    .mylist-toolbar {
        grid-template-columns: 1fr;
    }
    .mylist-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .admin-page {
        padding-top: calc(var(--navbar-h) + 32px);
    }
    .admin-heading {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 20px;
    }
    .admin-heading .user-actions {
        justify-content: flex-start;
    }
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
    .admin-form-actions {
        align-items: stretch;
    }
    .admin-form-actions .btn {
        justify-content: center;
    }

    .modal.is-search-modal .modal-content {
        width: min(92vw, 760px);
    }
    .search-results {
        max-height: 48vh;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        padding: 0 12px;
        gap: 8px;
    }
    .logo {
        font-size: 24px;
        letter-spacing: 2px;
    }
    .nav-icons {
        gap: 6px;
    }
    .nav-auth-state {
        gap: 5px;
    }
    .nav-auth-link {
        max-width: 72px;
        min-height: 34px;
        padding: 7px 9px;
        font-size: 12px;
    }
    .nav-auth-link.is-signed-in {
        width: 34px;
        max-width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }
    .nav-auth-link.is-signed-in .nav-auth-name {
        display: none;
    }
    .nav-auth-link.is-signed-in::before {
        content: "\f02e";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 13px;
        line-height: 1;
    }
    .nav-auth-logout {
        width: 28px;
        height: 28px;
    }
    .nav-links {
        width: min(84vw, 300px);
        padding: 26px 24px;
    }
    .page-section {
        padding: calc(var(--navbar-h) + 34px) 4% 46px;
    }
    .page-section h1 {
        letter-spacing: 1.5px;
    }
    .page-section h2 {
        letter-spacing: 1px;
    }
    .auth-card {
        padding: 28px 18px;
        border-radius: 10px;
    }
    .auth-card h1 {
        font-size: 25px;
        letter-spacing: 2px;
    }
    .contact-form > button:not(.password-toggle),
    .contact-form > .btn {
        width: 100%;
        justify-content: center;
    }
    .site-footer {
        padding: 44px 4% 24px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .movie-section { padding: 30px 4% 40px; }
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
    .btn { padding: 12px 22px; font-size: 14px; }
    .hero {
        min-height: 540px;
        padding: 0 4%;
        align-items: flex-end;
        padding-bottom: 54px;
    }
    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(5,5,5,0.22) 0%, rgba(5,5,5,0.52) 44%, #050505 100%),
            linear-gradient(90deg, rgba(5,5,5,0.6), rgba(5,5,5,0.08));
    }
    .hero-content { margin-top: 0; width: 100%; }
    .movie-title {
        letter-spacing: 2px;
    }
    .movie-desc {
        font-size: 15px;
        line-height: 1.55;
        margin-bottom: 24px;
    }
    .hero-buttons {
        gap: 10px;
    }
    .hero-buttons .btn {
        justify-content: center;
    }
    .info-top h3, .info-top h4 { font-size: 12px; }
    /* Keep stars + "x / 10" fully visible without clipping on small cards. */
    .info-top .cv-rating.is-compact { font-size: 10px; gap: 3px; }
    .info-top .cv-stars { gap: 0; }
    .icon-btn { width: 26px; height: 26px; font-size: 11px; }
    .footer-grid { gap: 22px; }

    .card-actions { gap: 6px; }
    .platform-row { gap: 4px; height: 26px; }
    .platform-btn { height: 26px; padding: 0 4px; }
    .platform-logo-mark { height: 16px; padding: 0 4px; font-size: 8px; letter-spacing: 0.35px; }
    .platform-logo-img { height: 17px; max-height: 17px; max-width: 38px; min-width: 17px; min-height: 17px; }
    .add-btn { align-self: center; }
    .my-list-page { padding-left: 4%; padding-right: 4%; }
    .mylist-heading h1 { font-size: 30px; }
    .mylist-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .mylist-card {
        grid-template-columns: 88px minmax(0, 1fr);
        min-height: 166px;
    }
    .mylist-card-body {
        padding: 11px;
        gap: 8px;
    }
    .mylist-card-heading h2 {
        font-size: 16px;
    }
    .mylist-meta {
        gap: 5px;
    }
    .mylist-meta-item {
        min-height: 22px;
        padding: 3px 6px;
        font-size: 11px;
    }
    .my-list-page .platform-row {
        height: auto;
    }
    .my-list-page .platform-btn {
        height: 32px;
        padding: 0 6px;
    }
    .my-list-page .platform-label {
        font-size: 10px;
    }
    .mylist-remove-btn {
        min-height: 34px;
        padding: 9px 10px;
        font-size: 13px;
    }
    .mylist-empty {
        padding: 42px 16px;
    }
    .mylist-modal-actions .btn {
        flex: 1 1 120px;
        justify-content: center;
    }
    .admin-page { padding-left: 4%; padding-right: 4%; }
    .admin-heading h1 { font-size: 28px; }
    .admin-heading p { font-size: 14px; }
    .admin-panel { padding: 16px; }
    .admin-form-actions .btn,
    .admin-list-heading .btn {
        width: 100%;
        justify-content: center;
    }
    .admin-list-heading {
        align-items: stretch;
    }
    .admin-platform-filters label {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        min-width: 0;
        text-align: center;
        line-height: 1.25;
    }
    .admin-link-states span {
        max-width: 100%;
        white-space: normal;
        line-height: 1.25;
    }
    .admin-link-states,
    .admin-row-actions {
        width: 100%;
    }
    .admin-row-actions .btn {
        flex: 1 1 0;
        justify-content: center;
    }

    .modal {
        padding: 12px;
    }
    .modal-content {
        max-height: calc(100dvh - 24px);
        padding: 28px 16px 18px;
    }
    .modal-content h2 {
        font-size: 20px;
    }
    .modal.is-search-modal .modal-content {
        width: min(94vw, 760px);
        padding: 28px 14px 16px;
    }
    .search-modal-body {
        gap: 12px;
    }
    .search-modal-input {
        min-height: 44px;
        font-size: 14px;
    }
    .search-result {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        padding: 8px;
    }
    .search-result-poster img {
        width: 48px;
        height: 70px;
    }
    .search-result-actions {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .search-platform-row {
        flex: 1 1 100%;
        max-width: none;
    }
    .search-watch-btn {
        width: 28px;
        height: 28px;
    }
}

@media screen and (max-width: 380px) {
    .navbar {
        padding: 0 10px;
    }
    .logo {
        font-size: 22px;
        letter-spacing: 1.5px;
    }
    .nav-icons {
        gap: 5px;
    }
    .nav-icon-btn,
    .lang-toggle,
    .hamburger,
    .nav-auth-link.is-signed-in {
        width: 32px;
        min-width: 32px;
        height: 32px;
    }
    .nav-auth-link {
        max-width: 62px;
        min-height: 32px;
        padding: 6px 8px;
    }
    .nav-auth-logout {
        width: 26px;
        height: 26px;
    }
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    }
    .mylist-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }
    .admin-platform-filters label {
        flex-basis: 100%;
    }
}

/* Rating stars (reusable) */
.cv-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #f5c518;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.cv-rating.is-compact {
    font-size: 11px;
    gap: 4px;
}
.cv-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.cv-stars i {
    color: #f5c518;
    font-size: 0.95em;
    line-height: 1;
}
.cv-rating-text {
    color: #f5c518;
    white-space: nowrap;
}
.cv-rating.is-empty {
    color: var(--text-muted, #9aa0a6);
}
html[dir="rtl"] .cv-rating {
    direction: ltr;
    unicode-bidi: isolate;
}

/* Admin poster upload UI */
.admin-poster-upload {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.admin-poster-upload .admin-poster-upload-label {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted, #aab0b6);
    flex-basis: 100%;
}
.admin-poster-upload input[type="file"] {
    flex: 1 1 200px;
    color: var(--text-main);
}
.admin-poster-upload-status {
    flex-basis: 100%;
    margin: 0;
    min-height: 1em;
}
.admin-poster-upload-status[data-kind="error"] { color: #ff7676; }
.admin-poster-upload-status[data-kind="success"] { color: #8ee08e; }
.admin-poster-upload-status[data-kind="loading"] { color: var(--text-muted, #aab0b6);}
