:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-soft: rgba(30, 41, 59, 0.68);
    --line: rgba(96, 165, 250, 0.24);
    --line-strong: rgba(56, 189, 248, 0.38);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-soft: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --gold: #f59e0b;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(2, 8, 23, 0.55);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 8%, rgba(6, 182, 212, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

img {
    object-fit: cover;
}

.page-shell {
    min-height: 100vh;
    overflow: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.84);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 38px rgba(59, 130, 246, 0.34);
}

.logo-text {
    font-size: 22px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links a,
.mobile-panel a {
    color: var(--text-muted);
    border-radius: 999px;
    padding: 10px 14px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: white;
    background: rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.search-box {
    width: min(280px, 28vw);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 10px 8px 16px;
    background: rgba(15, 23, 42, 0.72);
}

.search-box input {
    min-width: 0;
    flex: 1;
    outline: 0;
    background: transparent;
    color: white;
}

.search-box button,
.filter-box button {
    border-radius: 999px;
    padding: 8px 12px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.22);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 9px 12px;
    color: white;
    background: rgba(15, 23, 42, 0.9);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.95);
}

.mobile-panel.open {
    display: grid;
    gap: 10px;
}

.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    position: relative;
    border: 1px solid var(--line-strong);
    border-radius: 34px;
    min-height: 560px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.hero-slider {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    gap: 36px;
    align-items: center;
    padding: 64px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.18) 100%),
        var(--hero-image) center / cover no-repeat;
    opacity: 0.86;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto -12% -42% 42%;
    height: 460px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 64%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
}

.hero h1,
.hero h2 {
    max-width: 720px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 650px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.34);
}

.btn-secondary {
    color: white;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.74);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #dbeafe;
    background: rgba(30, 64, 175, 0.46);
}

.hero-poster {
    display: flex;
    justify-content: center;
}

.hero-poster a {
    display: block;
    width: min(360px, 100%);
    aspect-ratio: 2 / 2.85;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 34px 100px rgba(2, 6, 23, 0.8);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
}

.hero-dots {
    position: absolute;
    left: 64px;
    bottom: 34px;
    z-index: 3;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 32px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

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

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

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

.section-title {
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.section-desc {
    margin-top: 8px;
    color: var(--text-soft);
    line-height: 1.75;
}

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

.category-tile {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.78)),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.6);
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
}

.category-tile p {
    color: var(--text-soft);
    line-height: 1.68;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.26);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.44);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 2.85;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

.card-cover img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.86);
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    color: white;
}

.card-line {
    margin-top: 8px;
    min-height: 44px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.58;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    color: #bfdbfe;
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 86px 1fr;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.48);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    color: white;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), #ef4444);
}

.rank-item img {
    width: 86px;
    height: 118px;
    border-radius: 14px;
}

.rank-title {
    font-size: 18px;
    font-weight: 800;
}

.rank-line {
    margin-top: 6px;
    color: var(--text-soft);
    line-height: 1.6;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: clamp(30px, 5vw, 58px);
    background:
        radial-gradient(circle at 84% 12%, rgba(34, 211, 238, 0.16), transparent 34rem),
        linear-gradient(135deg, rgba(30, 64, 175, 0.24), rgba(15, 23, 42, 0.84));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin-top: 16px;
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 17px;
}

.filter-box {
    display: flex;
    gap: 10px;
    width: min(680px, 100%);
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.38);
}

.filter-box input {
    flex: 1;
    min-width: 0;
    outline: 0;
    padding: 0 12px;
    background: transparent;
    color: white;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.72fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
    overflow: hidden;
}

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

.player-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.38);
}

.play-layer.hidden {
    display: none;
}

.play-layer img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.46;
}

.play-button {
    position: relative;
    z-index: 4;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    font-size: 30px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.48);
}

.detail-card {
    margin-top: 22px;
    padding: clamp(24px, 4vw, 36px);
}

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

.breadcrumb a {
    color: #bfdbfe;
}

.detail-card h1 {
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-card p {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 16px;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 12px;
    font-size: 24px;
    font-weight: 850;
}

.poster-box {
    overflow: hidden;
    border-bottom: 1px solid rgba(96, 165, 250, 0.18);
}

.poster-box img {
    width: 100%;
    aspect-ratio: 2 / 2.85;
}

.side-card-body {
    padding: 20px;
}

.side-meta {
    display: grid;
    gap: 10px;
    color: var(--text-muted);
}

.related-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.related-item {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 16px;
    padding: 8px;
    background: rgba(2, 6, 23, 0.24);
}

.related-item img {
    width: 62px;
    height: 84px;
    border-radius: 10px;
}

.related-item strong {
    color: white;
}

.related-item span {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 13px;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 70px auto 0;
    padding: 30px 0 44px;
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    color: var(--text-soft);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.hidden-card {
    display: none;
}

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

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

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

@media (max-width: 860px) {
    .header-inner {
        min-height: 68px;
    }

    .nav-links,
    .site-header .search-box {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .hero,
    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px 24px 84px;
        gap: 24px;
    }

    .hero-poster {
        justify-content: flex-start;
    }

    .hero-poster a {
        width: 210px;
        transform: rotate(0);
    }

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

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .logo-text {
        font-size: 19px;
    }

    .hero h1,
    .hero h2 {
        font-size: 36px;
    }

    .hero p {
        font-size: 15px;
    }

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

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

    .rank-item img {
        width: 74px;
        height: 102px;
    }

    .filter-box {
        flex-direction: column;
    }

    .filter-box input {
        min-height: 42px;
    }
}
