:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.12), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.site-nav {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #00111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 35px rgba(34, 211, 238, 0.32);
}

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

.nav-link {
    padding: 9px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(34, 211, 238, 0.12);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: var(--text);
}

main {
    padding-top: 68px;
}

.hero {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    display: none;
    min-height: 74vh;
    position: relative;
}

.hero-slide.active {
    display: block;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.28)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.78)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 74vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 56px 0;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-text {
    max-width: 680px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(16px, 2.2vw, 21px);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-tags span,
.tag-list span {
    padding: 7px 11px;
    border: 1px solid rgba(34, 211, 238, 0.26);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 47, 73, 0.48);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    color: #ecfeff;
    background: rgba(15, 23, 42, 0.62);
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.button.primary {
    color: #00111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.28);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(34, 211, 238, 0.2);
}

.hero-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.hero-card-body {
    padding: 18px;
}

.hero-card-body strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 30px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(226, 232, 240, 0.38);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--cyan);
}

.section {
    padding: 72px 0 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading h2,
.page-hero h1,
.detail-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.footer-grid p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(30, 41, 59, 0.86);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover img {
    transform: scale(1.07);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    background: rgba(2, 6, 23, 0.36);
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.poster-play {
    display: inline-grid;
    place-items: center;
    min-width: 64px;
    min-height: 64px;
    padding: 0 18px;
    border-radius: 999px;
    color: #00111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    right: 12px;
}

.rank-badge {
    left: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f97316);
}

.movie-card-body {
    padding: 16px;
}

.movie-title {
    display: block;
    margin-bottom: 9px;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
}

.movie-title:hover {
    color: var(--cyan);
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-size: 12px;
}

.movie-meta a,
.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent),
        rgba(15, 23, 42, 0.78);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--muted);
}

.page-hero {
    padding: 82px 0 28px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.15), transparent 32rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0));
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 28px 0 12px;
}

.search-input,
.select-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 16px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    padding: 0 16px;
}

.select-input {
    min-width: 160px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 42px 0 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18)),
        var(--player-cover);
    background-size: cover;
    background-position: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-frame.playing .play-cover {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-button {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #00111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 55px rgba(34, 211, 238, 0.35);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}

.detail-panel {
    margin-top: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    padding: 24px;
}

.detail-panel h1,
.detail-panel h2,
.side-panel h2 {
    margin: 0 0 14px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: #dbeafe;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.info-item {
    padding: 12px;
    border-radius: 16px;
    background: rgba(148, 163, 184, 0.1);
}

.info-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.info-item strong {
    display: block;
    margin-top: 3px;
}

.side-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    padding: 18px;
}

.side-list {
    display: grid;
    gap: 12px;
}

.side-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-card img {
    width: 86px;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    object-fit: cover;
}

.side-card strong {
    display: block;
    line-height: 1.35;
}

.side-card span {
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 14px;
}

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

.site-footer {
    margin-top: 80px;
    padding: 52px 0 26px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.38), rgba(2, 6, 23, 1));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--cyan);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.empty-message {
    display: none;
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.58);
}

.empty-message.visible {
    display: block;
}

@media (max-width: 1040px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .side-panel {
        position: static;
        max-width: 420px;
    }

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

@media (max-width: 760px) {
    .site-nav {
        height: 62px;
    }

    main {
        padding-top: 62px;
    }

    .menu-button {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 62px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.98);
    }

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

    .nav-link {
        border-radius: 12px;
    }

    .hero,
    .hero-slide,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 42px 0 74px;
    }

    .hero-card {
        display: none;
    }

    .section-heading,
    .toolbar {
        display: block;
    }

    .search-input,
    .select-input {
        margin-top: 10px;
    }

    .movie-grid,
    .category-grid,
    .footer-grid,
    .info-table {
        grid-template-columns: 1fr;
    }

    .section {
        padding-top: 48px;
    }

    .page-hero {
        padding-top: 54px;
    }
}

@media (max-width: 460px) {
    .container,
    .site-nav,
    .hero-content,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .brand,
    .footer-brand {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 38px;
    }

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