:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.24);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #38bdf8;
    --accent-strong: #0ea5e9;
    --gold: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(14, 165, 233, 0.16), transparent 28rem),
        radial-gradient(circle at 82% 12%, rgba(59, 130, 246, 0.18), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.38);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #082f49;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8, #0ea5e9);
    box-shadow: 0 0 26px rgba(56, 189, 248, 0.5);
}

.brand-name {
    font-size: 1.18rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 0.94rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #f8fafc;
    background: rgba(14, 165, 233, 0.18);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e0f2fe;
    border-radius: 99px;
}

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

.hero {
    position: relative;
    margin: 26px auto 48px;
    height: min(72vh, 720px);
    min-height: 560px;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: var(--shadow);
    background: #020617;
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 42%, transparent 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(680px, 92%);
    padding: 56px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(2.35rem, 7vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content h2 {
    margin: 18px 0 0;
    font-size: clamp(1.7rem, 4vw, 3.3rem);
    line-height: 1.05;
}

.hero-content p {
    margin: 18px 0 0;
    max-width: 620px;
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.9;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button,
.rank-link,
.search-line button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    color: #082f49;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8, #0ea5e9);
    box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
    font-weight: 800;
    cursor: pointer;
}

.button.secondary {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(125, 211, 252, 0.28);
    box-shadow: none;
}

.hero-dots {
    position: absolute;
    left: 56px;
    bottom: 40px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 44px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(226, 232, 240, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--accent);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.7);
}

.section-block {
    margin: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.32);
    transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.42);
    box-shadow: 0 24px 70px rgba(14, 165, 233, 0.18);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.82));
}

.poster-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #082f49;
    background: rgba(125, 211, 252, 0.92);
    font-size: 0.78rem;
    font-weight: 900;
}

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

.movie-meta,
.movie-desc {
    color: var(--muted);
}

.movie-meta {
    margin: 0 0 8px;
    font-size: 0.82rem;
}

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

.movie-card h3 a:hover {
    color: var(--accent);
}

.movie-desc {
    margin: 10px 0 0;
    min-height: 3.4em;
    font-size: 0.9rem;
    line-height: 1.7;
}

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

.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 999px;
    padding: 4px 9px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.1);
    font-size: 0.78rem;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
    transition: transform 0.45s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card div {
    position: absolute;
    inset: auto 0 0 0;
    padding: 22px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.05));
}

.category-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.category-card p {
    margin: 10px 0 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.page-hero {
    margin: 28px 0 34px;
    padding: clamp(32px, 7vw, 76px);
    border: 1px solid rgba(125, 211, 252, 0.16);
    border-radius: 30px;
    background:
        radial-gradient(circle at 78% 0%, rgba(14, 165, 233, 0.24), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.92));
    box-shadow: var(--shadow);
}

.page-hero p:last-child {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.85;
}

.filter-panel {
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
}

.search-label {
    display: block;
    margin-bottom: 10px;
    color: #e0f2fe;
    font-weight: 800;
}

.search-line {
    display: flex;
    gap: 12px;
}

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

.search-line input:focus {
    border-color: rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.empty-state {
    margin: 14px 0 0;
    color: var(--gold);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 84px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
}

.rank-number {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: #082f49;
    background: linear-gradient(135deg, #fef08a, #fbbf24);
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-content p,
.rank-content span {
    color: var(--muted);
}

.rank-content p,
.rank-content h3,
.rank-content span {
    margin: 0;
}

.rank-content h3 {
    margin: 5px 0 6px;
    font-size: 1.08rem;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 330px) 1fr;
    gap: 32px;
    align-items: center;
    margin: 34px 0;
    padding: clamp(22px, 5vw, 48px);
    border-radius: 30px;
    background:
        radial-gradient(circle at 82% 18%, rgba(14, 165, 233, 0.22), transparent 28rem),
        rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.5);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-title p {
    max-width: 790px;
    color: #dbeafe;
    line-height: 1.9;
    font-size: 1.08rem;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
}

.watch-panel,
.content-panel {
    margin: 34px 0;
    padding: clamp(18px, 4vw, 34px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 55px rgba(2, 6, 23, 0.28);
}

.watch-panel h2,
.content-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.14);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #f8fafc;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.38));
    cursor: pointer;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.play-overlay:hover {
    transform: scale(1.01);
}

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

.play-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8, #0ea5e9);
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.42);
    position: relative;
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 34px;
    top: 26px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 23px solid #082f49;
}

.play-overlay strong {
    font-size: 1.2rem;
}

.content-panel p {
    color: #cbd5e1;
    line-height: 2;
    font-size: 1.02rem;
}

.site-footer {
    margin-top: 72px;
    padding: 42px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.7);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
}

.footer-brand {
    color: var(--text);
    font-weight: 900;
}

.footer-inner p {
    margin: 0;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    gap: 14px;
}

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

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

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

@media (max-width: 820px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        padding: 12px 14px;
    }

    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        padding: 32px;
        justify-content: flex-end;
    }

    .hero-dots {
        left: 32px;
        bottom: 24px;
    }

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

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

    .detail-poster {
        max-width: 320px;
    }

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

    .rank-link {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 560px) {
    main,
    .nav-shell,
    .footer-inner {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        border-radius: 24px;
        min-height: 640px;
    }

    .hero-content {
        padding: 24px;
    }

    .hero-actions,
    .section-actions,
    .detail-actions,
    .search-line {
        flex-direction: column;
    }

    .button,
    .search-line button {
        width: 100%;
    }

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

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

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

    .rank-thumb {
        display: none;
    }
}
