:root {
    --dark-950: #1a1f2e;
    --dark-900: #2d374c;
    --mirror-900: #203148;
    --mirror-800: #243b53;
    --realm-300: #eec078;
    --realm-400: #e8a84d;
    --realm-500: #d4941f;
    --realm-700: #8c5f12;
    --white-05: rgba(255, 255, 255, 0.05);
    --white-10: rgba(255, 255, 255, 0.10);
    --white-20: rgba(255, 255, 255, 0.20);
    --text-main: #f3f4f6;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --shadow-gold: 0 18px 45px rgba(212, 148, 31, 0.18);
    --shadow-deep: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(232, 168, 77, 0.12), transparent 35rem),
        radial-gradient(circle at top right, rgba(36, 59, 83, 0.75), transparent 34rem),
        var(--dark-950);
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-padding {
    padding: 4rem 0;
}

.text-gradient {
    background: linear-gradient(90deg, var(--realm-300), var(--realm-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.backdrop-glass {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(14px);
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1.35rem;
    border-radius: 0.85rem;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--realm-400), var(--realm-700));
    color: #fff;
    box-shadow: var(--shadow-gold);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(26, 31, 46, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--realm-400), var(--realm-700));
    color: #fff;
    box-shadow: 0 12px 30px rgba(212, 148, 31, 0.28);
}

.brand-name {
    font-size: 1.35rem;
    background: linear-gradient(90deg, #fff, var(--realm-300));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    gap: 0.4rem;
}

.nav-link,
.mobile-nav-link {
    color: var(--text-soft);
    border-radius: 0.75rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link {
    padding: 0.55rem 0.85rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--realm-300);
}

.menu-toggle {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 4px auto;
    background: #fff;
}

.mobile-menu {
    display: none;
    padding: 0.5rem 1rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu.is-open {
    display: grid;
    gap: 0.45rem;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0f1421;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-slide::before,
.hero-slide::after {
    position: absolute;
    inset: 0;
    content: "";
}

.hero-slide::before {
    background: linear-gradient(to top, var(--dark-950) 0%, rgba(26, 31, 46, 0.72) 34%, transparent 76%);
}

.hero-slide::after {
    background: linear-gradient(90deg, rgba(26, 31, 46, 0.86), rgba(26, 31, 46, 0.34), rgba(26, 31, 46, 0.82));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    min-height: 72vh;
    padding: 7rem 0 5.5rem;
}

.hero-copy {
    max-width: 780px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    color: var(--realm-300);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 5.7rem);
    line-height: 0.96;
    letter-spacing: -0.055em;
}

.hero-copy h2 {
    margin-top: 1rem;
    font-size: clamp(2rem, 5vw, 4.6rem);
}

.hero-copy p {
    max-width: 720px;
    margin: 1.35rem 0 0;
    color: var(--text-soft);
    font-size: clamp(1rem, 1.7vw, 1.2rem);
}

.hero-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.hero-meta {
    margin-top: 1.25rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

.hero-controls {
    position: absolute;
    right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
    bottom: 4.8rem;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-control {
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    gap: 0.45rem;
}

.hero-dot {
    width: 0.75rem;
    height: 0.75rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dot.is-active {
    width: 2rem;
    background: var(--realm-400);
}

.page-hero {
    padding: 6rem 0 3rem;
    background:
        radial-gradient(circle at top left, rgba(232, 168, 77, 0.18), transparent 30rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.page-hero p {
    max-width: 760px;
    margin: 1.2rem 0 0;
    color: var(--text-soft);
    font-size: 1.08rem;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 2.5vw, 2.35rem);
}

.section-head p {
    max-width: 600px;
    margin: 0.4rem 0 0;
    color: var(--text-muted);
}

.grid {
    display: grid;
    gap: 1rem;
}

.movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.movie-card,
.rank-card,
.category-card,
.info-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.052);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(232, 168, 77, 0.38);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-gold);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.poster-link img,
.rank-poster img,
.detail-poster img,
.category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.rank-card:hover .rank-poster img,
.category-card:hover .category-thumb img {
    transform: scale(1.06);
}

.score-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
}

.score-badge {
    top: 0.7rem;
    right: 0.7rem;
    padding: 0.28rem 0.5rem;
    background: rgba(0, 0, 0, 0.68);
    color: var(--realm-300);
    font-size: 0.82rem;
}

.play-badge {
    left: 0.7rem;
    bottom: 0.7rem;
    padding: 0.34rem 0.6rem;
    background: linear-gradient(135deg, var(--realm-400), var(--realm-700));
    color: #fff;
    font-size: 0.78rem;
}

.movie-card-body {
    padding: 0.95rem;
}

.movie-card h3,
.rank-card h3,
.category-card h2 {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-card h3 a:hover {
    color: var(--realm-300);
}

.movie-card p,
.rank-card p,
.category-card p,
.info-card p {
    margin: 0.58rem 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.movie-meta {
    margin-top: 0.7rem;
}

.movie-meta span:not(:last-child)::after,
.hero-meta span:not(:last-child)::after {
    margin-left: 0.65rem;
    color: rgba(255, 255, 255, 0.32);
    content: "·";
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.tag-row span {
    padding: 0.22rem 0.48rem;
    border-radius: 999px;
    background: rgba(212, 148, 31, 0.16);
    color: var(--realm-300);
    font-size: 0.78rem;
}

.category-card {
    padding: 1.15rem;
}

.category-card h2 {
    font-size: 1.2rem;
}

.category-card .btn-secondary {
    width: 100%;
    margin-top: 1rem;
}

.category-thumb {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.category-thumb a {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #111827;
}

.rank-card {
    display: grid;
    grid-template-columns: auto 5.5rem 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 0.85rem;
}

.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
    background: rgba(212, 148, 31, 0.16);
    color: var(--realm-300);
    font-weight: 900;
}

.rank-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #111827;
}

.rank-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 0.9rem;
    margin-bottom: 1.4rem;
    padding: 1rem;
    border-radius: 1rem;
}

.filter-panel label {
    display: grid;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.8rem;
    outline: none;
    background: rgba(0, 0, 0, 0.24);
    color: #fff;
    padding: 0 0.8rem;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(232, 168, 77, 0.55);
}

.searchable-card[hidden] {
    display: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 1.35rem;
    background: #000;
    box-shadow: var(--shadow-deep);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.66));
    color: #fff;
    transition: opacity 0.25s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--realm-400), var(--realm-700));
    box-shadow: var(--shadow-gold);
    font-size: 1.8rem;
}

.detail-info {
    margin-top: 1.25rem;
    padding: 1.25rem;
    border-radius: 1.15rem;
}

.detail-info h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.9rem, 4vw, 3.35rem);
    line-height: 1.08;
}

.detail-info p {
    margin: 1rem 0 0;
    color: var(--text-soft);
}

.detail-side {
    display: grid;
    gap: 1rem;
}

.detail-poster {
    overflow: hidden;
    border-radius: 1.15rem;
    background: #111827;
}

.info-card {
    padding: 1rem;
}

.info-card h2 {
    margin: 0 0 0.75rem;
    color: #fff;
    font-size: 1.15rem;
}

.info-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--text-soft);
}

.info-list span {
    color: var(--text-muted);
}

.article-content {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.article-content section {
    padding: 1.25rem;
    border-radius: 1.15rem;
}

.article-content h2 {
    margin: 0 0 0.7rem;
    color: #fff;
}

.article-content p {
    margin: 0;
    color: var(--text-soft);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--realm-300);
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    gap: 1rem;
    overflow-x: auto;
    padding: 0.2rem 0 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-row .movie-card {
    min-width: 170px;
    scroll-snap-align: start;
}

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

.row-button {
    width: 2.55rem;
    height: 2.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

@media (max-width: 1080px) {
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .category-grid,
    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 760px) {
    .container-custom {
        padding: 0 1rem;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-slider,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content {
        padding: 6rem 0 5rem;
    }

    .hero-controls {
        left: 1rem;
        right: auto;
        bottom: 1.25rem;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .rank-grid,
    .category-grid,
    .filter-panel,
    .detail-side,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: auto 4.5rem 1fr;
    }

    .page-hero {
        padding: 4.5rem 0 2.4rem;
    }
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 33, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2rem;
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.footer-grid h2 {
    margin: 0 0 0.8rem;
    color: #fff;
    font-size: 1rem;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: var(--text-muted);
}

.footer-grid ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a:hover {
    color: var(--realm-300);
}

.footer-bottom {
    padding: 1rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}
