:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --line: rgba(125, 211, 252, 0.18);
    --text: #e5f3ff;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --gold: #fbbf24;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.58);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(14, 165, 233, 0.24);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 64, 175, 0.82), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.42);
}

.header-inner {
    width: min(1240px, 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-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text,
.footer-brand {
    font-size: 1.55rem;
    background: linear-gradient(90deg, #67e8f9, #60a5fa, #dbeafe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #cbd5e1;
    font-weight: 700;
}

.main-nav a {
    position: relative;
    transition: color 0.2s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    transition: transform 0.2s ease;
}

.main-nav a:hover {
    color: #67e8f9;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.75);
    font-size: 1.25rem;
}

main {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    isolation: isolate;
}

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

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 40%, rgba(2, 6, 23, 0.3) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1240px) / 2));
    bottom: 13vh;
    width: min(680px, calc(100% - 48px));
    z-index: 2;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
    text-wrap: balance;
}

.hero-content p {
    max-width: 620px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: clamp(1rem, 2vw, 1.18rem);
    line-height: 1.85;
}

.hero-actions,
.detail-actions,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.7);
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn.primary {
    color: #00111a;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.22);
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(103, 232, 249, 0.62);
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100vw - 1240px) / 2));
    bottom: 6vh;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.section {
    width: min(1240px, calc(100% - 32px));
    margin: 74px auto 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.section-heading a {
    color: #67e8f9;
    font-weight: 800;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 22px;
}

.feature-card {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
}

.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.12));
}

.feature-info {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    z-index: 2;
}

.feature-info h3 {
    margin: 0 0 12px;
    font-size: clamp(1.7rem, 3vw, 2.7rem);
    letter-spacing: -0.05em;
}

.feature-info p {
    color: #cbd5e1;
    line-height: 1.8;
}

.side-stack {
    display: grid;
    gap: 18px;
}

.glass-panel,
.search-panel,
.detail-panel,
.player-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.62));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.glass-panel {
    padding: 24px;
}

.glass-panel h3 {
    margin: 0 0 12px;
    font-size: 1.4rem;
}

.glass-panel p {
    color: var(--muted);
    line-height: 1.75;
}

.quick-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(125, 211, 252, 0.16);
    font-weight: 800;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    margin-bottom: 24px;
}

.search-panel input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.5);
    padding: 0 16px;
    outline: none;
}

.search-panel input:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-panel button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    color: #00111a;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    font-weight: 900;
    cursor: pointer;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 24px 70px rgba(14, 165, 233, 0.16);
}

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

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #00111a;
    background: linear-gradient(135deg, #fde68a, var(--gold));
    font-size: 0.78rem;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 1.05rem;
    line-height: 1.35;
}

.movie-card p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.tag-row span,
.detail-tags span {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.12);
    font-size: 0.76rem;
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(125, 211, 252, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
}

.rank-no {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #00111a;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    font-weight: 950;
}

.rank-title {
    font-weight: 900;
}

.rank-desc {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}

.page-hero {
    width: min(1240px, calc(100% - 32px));
    margin: 48px auto 0;
    padding: clamp(28px, 6vw, 58px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.2), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.36));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.8rem);
    line-height: 1;
    letter-spacing: -0.08em;
}

.page-hero p {
    max-width: 780px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.8;
}

.detail-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.player-panel {
    overflow: hidden;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.12));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-btn {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: #00111a;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    font-size: 2.1rem;
    cursor: pointer;
    box-shadow: 0 18px 50px rgba(34, 211, 238, 0.35);
}

.detail-panel {
    padding: 26px;
}

.detail-panel h1,
.detail-panel h2 {
    margin: 0;
    letter-spacing: -0.05em;
}

.detail-panel h1 {
    font-size: clamp(2rem, 5vw, 3.7rem);
    line-height: 1.05;
}

.detail-panel h2 {
    margin-top: 24px;
    font-size: 1.55rem;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    color: #bfdbfe;
    font-weight: 800;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.16);
}

.detail-panel p {
    color: #cbd5e1;
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.8);
}

.side-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.1;
    object-fit: cover;
}

.side-poster .side-info {
    padding: 18px;
}

.side-info h2 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.side-info p {
    color: var(--muted);
    line-height: 1.7;
}

.not-found {
    display: none;
    padding: 24px;
    text-align: center;
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid rgba(125, 211, 252, 0.16);
    background: rgba(2, 6, 23, 0.6);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    max-width: 560px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 16px;
    color: #bfdbfe;
    font-weight: 800;
}

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

    .feature-grid,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .side-poster {
        display: none;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        padding: 16px;
        border: 1px solid rgba(125, 211, 252, 0.22);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: grid;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        bottom: 14vh;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 46px 1fr;
    }

    .rank-item .btn {
        grid-column: 2;
        width: max-content;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .section,
    .page-hero,
    .detail-wrap,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }

    .brand-text {
        font-size: 1.25rem;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: clamp(2.3rem, 14vw, 3.6rem);
    }

    .hero-actions .btn {
        width: 100%;
    }

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

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