:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --brand: #f59e0b;
    --brand-dark: #d97706;
    --brand-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.28);
}

.logo-text {
    font-size: 20px;
    letter-spacing: 0.02em;
}

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

.nav-link {
    padding: 10px 16px;
    color: #334155;
    border-radius: 999px;
    font-weight: 650;
    transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--surface-strong);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #334155;
}

.hero-carousel {
    position: relative;
    min-height: 78vh;
    overflow: hidden;
    background: #020617;
}

.hero-stage {
    position: absolute;
    inset: 0;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.22), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55) 46%, rgba(2, 6, 23, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 78vh;
    display: flex;
    align-items: center;
    padding: 96px 0 156px;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2vw, 22px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.24s ease;
}

.btn.primary {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.btn.primary:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
}

.btn.ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn.ghost:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.28);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    cursor: pointer;
    transition: all 0.24s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.hero-strip {
    position: absolute;
    left: 50%;
    bottom: 74px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    transform: translateX(-50%);
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.hero-thumb img {
    width: 58px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-thumb span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 750;
}

.page-main {
    padding: 38px 0 68px;
}

.section {
    padding: 56px 0;
}

.section.alt {
    background: linear-gradient(135deg, #fff7ed, #f8fafc);
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    max-width: 720px;
}

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

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: all 0.25s ease;
}

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

.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--brand);
    font-size: 12px;
    font-weight: 850;
}

.rank-badge {
    background: #ef4444;
}

.card-body {
    padding: 16px;
}

.card-category {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--brand-dark);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 800;
}

.card-body h3,
.horizontal-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p,
.horizontal-info p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 650;
}

.horizontal-link {
    display: flex;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
}

.horizontal-poster {
    width: 178px;
    flex: 0 0 178px;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
}

.horizontal-info {
    min-width: 0;
    padding: 4px 0;
}

.category-box {
    position: relative;
    display: block;
    min-height: 178px;
    border-radius: var(--radius);
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

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

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

.category-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.category-box div {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
}

.category-box h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.category-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin: 0 0 28px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: #ffffff;
    font: inherit;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

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

.breadcrumb a {
    color: var(--brand-dark);
    font-weight: 750;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-card {
    border-radius: 26px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.42);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.36);
    font-size: 32px;
}

.player-info,
.detail-card {
    padding: 24px;
}

.player-info h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.player-info p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

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

.detail-meta-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.detail-meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.detail-meta-list strong {
    color: var(--text);
}

.article-content {
    margin-top: 34px;
    padding: 28px;
    border-radius: 26px;
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.07);
}

.article-content h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.article-content p {
    margin: 0 0 22px;
    color: #334155;
    font-size: 17px;
}

.site-footer {
    padding: 36px 0;
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-inner p {
    margin: 8px 0 0;
    color: #94a3b8;
}

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

.footer-links a {
    color: #e2e8f0;
    font-weight: 700;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .movie-grid,
    .category-grid,
    .rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hero-strip {
        display: none;
    }

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

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
    }

    .menu-button {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        text-align: center;
    }

    .hero-carousel,
    .hero-content {
        min-height: 74vh;
    }

    .hero-content {
        padding: 90px 0 88px;
        align-items: end;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        bottom: 24px;
    }

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

    .horizontal-link {
        flex-direction: column;
    }

    .horizontal-poster {
        width: 100%;
        flex-basis: auto;
    }

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