:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fbbf24;
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.16), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(14, 165, 233, 0.12), transparent 26%),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    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: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 76%);
}

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

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

main {
    padding-top: 104px;
}

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1220px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.38);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, #fcd34d, #fde68a, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.quick-cats a,
.footer-links a,
.section-more {
    transition: color 0.25s ease, background 0.25s ease, border 0.25s ease, transform 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
    color: var(--muted-strong);
    border: 1px solid transparent;
    border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.13);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: #f8fafc;
}

.quick-cats {
    display: flex;
    gap: 10px;
    width: min(1220px, calc(100% - 32px));
    padding: 0 0 12px;
    margin: -2px auto 0;
    overflow-x: auto;
}

.quick-cats a {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.28);
}

.quick-cats a:hover {
    color: #fff;
    border-color: rgba(245, 158, 11, 0.4);
}

.hero-carousel {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    min-height: 620px;
    margin: 28px auto 64px;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 32px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: stretch;
    padding: 34px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.75s ease, transform 1s ease;
}

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

.hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 670px;
    padding: 44px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    gap: 8px;
    align-items: center;
    padding: 7px 12px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 700;
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.13);
}

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

.gradient-text {
    background: linear-gradient(90deg, #fcd34d, #fef08a, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: 17px;
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.tag-row span,
.detail-chip,
.rank-index,
.form-row select,
.form-row input {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.58);
}

.hero-meta span,
.detail-chip {
    padding: 7px 10px;
    color: #e2e8f0;
    border-radius: 999px;
}

.hero-actions,
.form-row,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.play-overlay strong {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    font-weight: 800;
    border-radius: 999px;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.27);
}

.btn-primary:hover,
.play-overlay:hover strong {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(245, 158, 11, 0.34);
}

.btn-secondary {
    color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.62);
}

.btn-secondary:hover {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.12);
}

.hero-visual {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    border-radius: 28px;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 1s ease;
}

.hero-slide.active .hero-visual img {
    transform: scale(1);
}

.hero-visual::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 46%), linear-gradient(90deg, rgba(2, 6, 23, 0.35), transparent);
}

.hero-card-floating {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 3;
    max-width: 360px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(16px);
}

.hero-card-floating h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.hero-card-floating p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.65;
}

.hero-dots {
    position: absolute;
    right: 36px;
    bottom: 36px;
    left: 36px;
    z-index: 4;
    display: flex;
    gap: 8px;
    max-width: 420px;
}

.hero-dot {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-dot span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #fef08a);
}

.hero-dot.active span {
    width: 100%;
    transition: width 5s linear;
}

.content-section,
.page-shell,
.detail-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 64px;
}

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

.section-heading h2,
.page-heading h1,
.detail-heading h1 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-heading p,
.detail-heading p,
.category-card p,
.rank-info p,
.detail-text p {
    color: var(--muted-strong);
    line-height: 1.75;
}

.section-more {
    flex: 0 0 auto;
    padding: 10px 14px;
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.1);
}

.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.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.66));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(245, 158, 11, 0.38);
    transform: translateY(-5px);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.28);
}

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

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

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

.card-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 58%);
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    color: #fff;
    background: rgba(245, 158, 11, 0.86);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-rank {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--amber-light);
}

.card-line {
    display: -webkit-box;
    min-height: 46px;
    margin: 10px 0 12px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #cbd5e1;
    font-size: 13px;
}

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

.tag-row span,
.tag-row a {
    display: inline-flex;
    padding: 5px 8px;
    color: #fde68a;
    font-size: 12px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.09);
}

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

.category-card,
.filter-panel,
.player-card,
.detail-panel,
.rank-list,
.breadcrumb,
.search-hero {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.68));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.category-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
}

.category-card::before {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    content: "";
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), transparent 66%);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card .category-link {
    display: inline-flex;
    margin-top: 18px;
    color: #fef3c7;
    font-weight: 800;
}

.filter-panel,
.search-hero {
    padding: 22px;
    margin-bottom: 28px;
}

.form-row input,
.form-row select {
    min-height: 46px;
    padding: 0 14px;
    color: #f8fafc;
    border-radius: 14px;
    outline: none;
}

.form-row input {
    min-width: min(100%, 360px);
    flex: 1 1 360px;
}

.form-row input:focus,
.form-row select:focus {
    border-color: rgba(245, 158, 11, 0.56);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
    display: none;
    padding: 26px;
    color: var(--muted-strong);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 22px;
}

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

.rank-list {
    padding: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 74px 160px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.rank-index {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    font-size: 18px;
    font-weight: 900;
    color: #fef3c7;
    border-radius: 18px;
}

.rank-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
}

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

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 21px;
}

.rank-info p {
    margin: 0;
}

.rank-stats {
    min-width: 120px;
    color: #fde68a;
    font-weight: 800;
    text-align: right;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 22px;
    color: var(--muted-strong);
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 0.84fr 1.16fr;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 32px;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-panel {
    padding: 30px;
}

.detail-heading {
    display: block;
    margin-bottom: 22px;
}

.detail-heading h1 {
    margin-bottom: 14px;
}

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

.detail-text {
    display: grid;
    gap: 18px;
}

.detail-text h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.detail-text p {
    margin: 0;
}

.player-card {
    padding: 20px;
    margin-bottom: 42px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000;
}

.video-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.86));
}

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

.play-circle {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    padding-left: 6px;
    font-size: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 0 44px rgba(245, 158, 11, 0.42);
}

.play-overlay strong {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.pagination-links {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 28px;
}

.pagination-links a {
    display: inline-flex;
    width: 100%;
    padding: 14px 18px;
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.08);
}

.pagination-links a:last-child {
    justify-content: flex-end;
}

.site-footer {
    width: min(1220px, calc(100% - 32px));
    padding: 34px 0 42px;
    margin: 0 auto;
    color: var(--muted);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 0.8fr;
    gap: 28px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #fef3c7;
    font-size: 20px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #f8fafc;
    font-size: 18px;
}

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

.footer-links a {
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
}

.footer-links a:hover {
    color: #fef3c7;
    border-color: rgba(245, 158, 11, 0.34);
}

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

.copyright {
    margin: 28px 0 0;
    font-size: 13px;
}

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

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

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

    .hero-carousel {
        min-height: 920px;
    }

    .hero-visual {
        min-height: 360px;
    }
}

@media (max-width: 780px) {
    main {
        padding-top: 92px;
    }

    .header-inner {
        height: 64px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand-text {
        font-size: 18px;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 64px;
        right: 16px;
        display: none;
        width: min(240px, calc(100vw - 32px));
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
        box-shadow: var(--shadow);
    }

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

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

    .quick-cats {
        display: none;
    }

    .hero-carousel {
        width: min(100% - 22px, 1220px);
        min-height: 840px;
        margin-top: 18px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 18px;
    }

    .hero-copy {
        padding: 18px;
    }

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

    .hero-visual {
        min-height: 280px;
        border-radius: 20px;
    }

    .hero-card-floating {
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-width: none;
    }

    .hero-dots {
        right: 20px;
        bottom: 20px;
        left: 20px;
    }

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

    .section-more {
        margin-top: 12px;
    }

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

    .rank-row {
        grid-template-columns: 48px 96px 1fr;
        gap: 12px;
    }

    .rank-stats {
        grid-column: 3;
        text-align: left;
    }

    .rank-index {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .detail-cover img {
        min-height: 320px;
    }

    .pagination-links {
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .related-grid {
        gap: 16px;
    }

    .content-section,
    .page-shell,
    .detail-shell {
        width: min(100% - 22px, 1220px);
        margin-bottom: 46px;
    }

    .card-cover {
        aspect-ratio: 16 / 9;
    }

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

    .rank-thumb {
        display: none;
    }

    .rank-stats {
        grid-column: 2;
    }
}
