:root {
    color-scheme: dark;
    --page: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.72);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #fbbf24;
    --danger: #fb7185;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 6%, rgba(245, 158, 11, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
        linear-gradient(135deg, #020617 0%, #0f172a 42%, #1e293b 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    color: #0f172a;
    background: linear-gradient(135deg, var(--accent-strong), #f97316);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a,
.sub-nav a,
.footer-links a {
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
}

.main-nav a:hover,
.main-nav a.active,
.sub-nav a:hover {
    color: white;
    background: rgba(245, 158, 11, 0.14);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.88);
    padding: 8px 14px;
}

.sub-nav {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 24px 14px;
}

.sub-nav a {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 14px;
}

.page-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 24px 72px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.64));
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 7% -18% 7%;
    height: 180px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    filter: blur(60px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.72fr);
    gap: 30px;
    align-items: center;
    padding: 58px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

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

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

.hero h1,
.hero h2 {
    margin: 0;
    color: white;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 20px 0 0;
    color: var(--soft);
    font-size: 18px;
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #0f172a;
    background: linear-gradient(135deg, var(--accent-strong), #f97316);
    box-shadow: 0 18px 36px rgba(245, 158, 11, 0.25);
}

.btn-ghost {
    color: white;
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-poster {
    position: relative;
    z-index: 1;
    min-height: 370px;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.28), rgba(30, 41, 59, 0.86));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 370px;
    object-fit: cover;
    opacity: 0.88;
}

.hero-poster::after,
.card-cover::after,
.detail-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent 58%);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 58px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 0;
    background: rgba(226, 232, 240, 0.28);
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent-strong);
}

.section {
    margin-top: 54px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: white;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-heading span {
    display: inline-block;
    margin-top: 8px;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    color: var(--accent-strong);
    font-weight: 800;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    margin-bottom: 24px;
}

.search-panel input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.5);
    padding: 0 18px;
    outline: none;
}

.search-panel input:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 24px 50px rgba(245, 158, 11, 0.1);
}

.card-cover,
.detail-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(71, 85, 105, 0.8), rgba(15, 23, 42, 0.9));
}

.card-cover {
    aspect-ratio: 2 / 3;
}

.card-cover img,
.compact-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.image-missing {
    opacity: 0;
}

.card-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    color: #0f172a;
    background: var(--accent-strong);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    gap: 8px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
}

.card-body h3 {
    margin: 8px 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.card-body p {
    min-height: 46px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

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

.tag-row span,
.info-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(148, 163, 184, 0.08);
    padding: 0 9px;
    font-size: 12px;
}

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

.category-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.9));
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.45);
}

.category-card strong {
    color: white;
    font-size: 20px;
}

.category-card p {
    color: var(--muted);
    line-height: 1.7;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-num {
    color: var(--accent-strong);
    font-size: 24px;
    font-weight: 900;
}

.rank-title strong {
    color: white;
}

.rank-title p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.detail-cover {
    min-height: 500px;
    border-radius: 26px;
}

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

.detail-content h1 {
    margin: 0;
    color: white;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.detail-content p {
    color: var(--soft);
    line-height: 1.86;
}

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

.player-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(2, 6, 23, 0.78);
    box-shadow: var(--shadow);
}

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

.video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.1));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    color: #0f172a;
    background: linear-gradient(135deg, var(--accent-strong), #f97316);
    font-weight: 900;
    box-shadow: 0 25px 60px rgba(245, 158, 11, 0.3);
}

.content-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
}

.content-panel h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 28px;
}

.content-panel p {
    margin: 0;
    color: var(--soft);
    line-height: 1.95;
}

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

.compact-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
}

.compact-card img {
    aspect-ratio: 2 / 3;
}

.compact-card span,
.compact-card small {
    display: block;
    padding: 0 12px;
}

.compact-card span {
    margin-top: 10px;
    color: white;
    font-weight: 800;
    line-height: 1.45;
}

.compact-card small {
    margin: 4px 0 12px;
    color: var(--muted);
}

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

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

.empty-message {
    display: none;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.66);
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.5);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 30px 24px;
}

.footer-inner p {
    margin: 0;
    color: var(--muted);
}

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

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

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

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

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.96);
    }

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

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

    .hero-poster {
        min-height: 280px;
    }

    .hero-poster img {
        min-height: 280px;
    }

    .hero-dots {
        left: 34px;
    }

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

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

    .detail-cover {
        min-height: 420px;
    }

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

@media (max-width: 560px) {
    .page-main {
        padding: 22px 14px 50px;
    }

    .header-inner {
        padding: 0 14px;
    }

    .sub-nav {
        padding-left: 14px;
        padding-right: 14px;
    }

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

    .hero-slide {
        padding: 24px;
    }

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

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

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

    .rank-item {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .rank-item .btn {
        grid-column: 2;
        justify-self: start;
    }
}
