:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.13), transparent 34%), var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(15, 23, 42, 0.86);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(16px);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), #d97706);
    color: white;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

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

.brand-text em {
    margin-top: 5px;
    color: rgba(251, 191, 36, 0.82);
    font-size: 12px;
    font-style: normal;
}

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

.nav-link,
.mobile-link {
    color: #d1d5db;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 16px;
    border-radius: 12px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fff;
    background: rgba(245, 158, 11, 0.92);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
    padding: 10px 18px 18px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
}

main {
    min-height: 100vh;
    padding-top: 72px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.88) 34%, rgba(2, 6, 23, 0.42) 72%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    padding-bottom: 70px;
}

.hero-panel {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--accent-2);
    font-weight: 700;
}

.eyebrow::before {
    content: "★";
    color: var(--accent);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 650px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.78);
    color: var(--accent-2);
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.hero-actions,
.section-head,
.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, 0.86);
    color: #fff;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(51, 65, 85, 0.95);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #fbbf24, var(--accent));
}

.btn-ghost {
    border-color: rgba(251, 191, 36, 0.28);
    color: var(--accent-2);
}

.hero-arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: white;
    font-size: 26px;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.section {
    padding: 56px 0;
}

.section-tight {
    padding: 34px 0;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section-desc {
    margin: 8px 0 0;
    max-width: 760px;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    background: rgba(30, 41, 59, 0.84);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1e293b);
}

.movie-card-large .movie-cover {
    aspect-ratio: 21 / 9;
}

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

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

.cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
    opacity: 1;
}

.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    max-width: calc(100% - 20px);
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-body {
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card-body h3 a:hover {
    color: var(--accent-2);
}

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.panel-band {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    padding: 30px;
    box-shadow: var(--shadow);
}

.horizontal-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 16px;
    scrollbar-width: thin;
}

.horizontal-row .movie-card {
    flex: 0 0 260px;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.16));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
}

.category-tile strong {
    bottom: 42px;
    font-size: 20px;
}

.category-tile em {
    bottom: 18px;
    color: var(--muted-2);
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-hero {
    padding: 64px 0 36px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.76));
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 52px);
    letter-spacing: -0.03em;
}

.page-hero p {
    max-width: 820px;
    margin: 14px 0 0;
    color: var(--muted-2);
    font-size: 18px;
}

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

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

.rank-list {
    display: grid;
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 154px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: var(--panel);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.86);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-2);
    font-weight: 800;
}

.rank-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
}

.rank-meta {
    color: var(--accent-2);
    font-weight: 800;
}

.search-box {
    display: flex;
    gap: 12px;
    margin: 26px 0 0;
}

.search-box input {
    flex: 1;
    min-height: 52px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.88);
    color: white;
    outline: 0;
    padding: 0 18px;
}

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

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

.filter-chip {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.72);
    color: #e5e7eb;
    padding: 8px 13px;
}

.filter-chip.is-active,
.filter-chip:hover {
    border-color: rgba(245, 158, 11, 0.52);
    background: rgba(245, 158, 11, 0.92);
    color: white;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: rgba(2, 6, 23, 0.38);
    color: white;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-button-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 150px;
    min-height: 58px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #d97706);
    font-weight: 800;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.3);
}

.detail-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    background: var(--panel);
    padding: 24px;
}

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

.detail-card p {
    margin: 0 0 18px;
    color: var(--muted-2);
}

.detail-poster {
    overflow: hidden;
    border-radius: 20px;
    background: #111827;
    margin-bottom: 18px;
}

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

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

.side-link {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.48);
    transition: background 0.2s ease;
}

.side-link:hover {
    background: rgba(51, 65, 85, 0.7);
}

.side-link img {
    width: 76px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.side-link strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

.side-link span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 64px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.82);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    color: white;
    font-size: 22px;
    font-weight: 800;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px 18px;
}

.footer-links a {
    color: var(--muted-2);
}

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

.hidden-by-search {
    display: none;
}

@media (max-width: 980px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .rank-meta {
        grid-column: 3;
    }
}

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

    main {
        padding-top: 64px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

    .hero {
        height: auto;
        min-height: 620px;
    }

    .hero-content {
        padding-top: 170px;
        padding-bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .panel-band {
        padding: 20px;
    }

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

    .rank-cover {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .rank-num {
        grid-row: 2;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}
