:root {
    --bg: #08080b;
    --bg-soft: #111218;
    --bg-card: #171923;
    --text: #f8fafc;
    --muted: #a1a1aa;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #f59e0b;
    --accent-2: #f97316;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 11, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #d4d4d8;
    font-size: 15px;
}

.nav-links a {
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

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

.hero-carousel {
    position: relative;
    min-height: 72vh;
    margin: 28px auto 54px;
    overflow: hidden;
    border-radius: 32px;
    background: #101014;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    background-position: center;
    background-size: cover;
}

.hero-slide:first-child {
    position: relative;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 8, 11, 0.95), rgba(8, 8, 11, 0.64) 46%, rgba(8, 8, 11, 0.3)),
        linear-gradient(0deg, rgba(8, 8, 11, 0.86), transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 72vh;
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1.1fr) 340px;
    gap: 34px;
    padding: clamp(28px, 6vw, 76px);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.36);
    font-size: 14px;
}

.hero-copy h1,
.page-title h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 22px 0 0;
    max-width: 670px;
    color: #e4e4e7;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #d4d4d8;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.26);
}

.btn-ghost {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.hero-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(12, 12, 18, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    background: #111827;
}

.hero-panel strong {
    display: block;
    font-size: 22px;
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.46);
    color: white;
}

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

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

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

.hero-dot {
    width: 28px;
    height: 6px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    border: 0;
}

.hero-dot.active {
    background: var(--accent);
}

.section {
    margin: 56px 0;
}

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

.section-kicker {
    color: var(--accent);
    font-weight: 900;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.section h2,
.page-title h2 {
    margin: 4px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-lead,
.page-title p,
.category-card p,
.detail-lead,
.detail-text p {
    color: var(--muted);
    line-height: 1.78;
}

.search-panel {
    display: grid;
    gap: 14px;
    margin: 28px 0;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.search-input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 0 18px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.32);
    outline: none;
}

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

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.06);
}

.filter-chip.active,
.filter-chip:hover {
    color: #111827;
    background: var(--accent);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.26);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: #fde68a;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

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

.card-meta {
    margin: 8px 0;
    color: #a1a1aa;
    font-size: 13px;
}

.card-summary {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #c4c4cc;
    line-height: 1.58;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags {
    margin-top: 12px;
}

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
}

.page-title {
    padding: 52px 0 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #d4d4d8;
    font-size: 14px;
}

.breadcrumb a {
    color: #fde68a;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 82px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.rank-number {
    color: var(--accent);
    font-size: 26px;
    font-weight: 950;
}

.rank-item img {
    width: 82px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: #111827;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    padding: 48px;
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.14), transparent 34%),
        rgba(255, 255, 255, 0.055);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #e4e4e7;
}

.player-section {
    margin: 42px 0;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.2));
    border: 0;
    text-align: center;
    z-index: 2;
}

.play-cover[hidden] {
    display: none;
}

.play-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #111827;
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.detail-text {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
    gap: 24px;
}

.text-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.text-card h2,
.text-card h3 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-card p + p {
    margin-top: 14px;
}

.footer {
    margin-top: 70px;
    padding: 34px 0 46px;
    color: #a1a1aa;
    border-top: 1px solid var(--line);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

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

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

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

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

    .hero-panel {
        max-width: 360px;
    }
}

@media (max-width: 760px) {
    .navbar {
        min-height: 64px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border-radius: 22px;
        background: rgba(8, 8, 11, 0.96);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 650px;
    }

    .hero-content {
        padding: 28px;
    }

    .hero-panel {
        display: none;
    }

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

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

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

    .rank-item img {
        width: 68px;
    }

    .detail-hero {
        padding: 22px;
    }
}

@media (max-width: 480px) {
    .page,
    .navbar,
    .footer-inner {
        width: min(100% - 22px, 1240px);
    }

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

    .hero-control {
        display: none;
    }

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