:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-500: #f97316;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.24);
}

.navbar {
    width: min(1280px, calc(100% - 32px));
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand span:last-child,
.footer-brand span:last-child {
    color: transparent;
    background: linear-gradient(90deg, var(--amber-400), var(--orange-500));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

.nav-links {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
    font-size: 14px;
}

.nav-links a,
.mobile-panel a {
    transition: color 0.22s ease, background 0.22s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
    color: var(--amber-400);
}

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

.nav-search input {
    width: 180px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    padding: 9px 14px;
    outline: none;
}

.nav-search input::placeholder {
    color: #cbd5e1;
}

.nav-search button,
.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.outline-btn {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.nav-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
}

.nav-search button {
    padding: 9px 14px;
}

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.outline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
}

.primary-btn:hover,
.nav-search button:hover,
.outline-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(245, 158, 11, 0.34);
}

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

.ghost-dark-btn,
.outline-btn {
    color: var(--slate-900);
    border: 1px solid var(--line);
    background: #fff;
}

.ghost-dark-btn:hover {
    transform: translateY(-2px);
    border-color: var(--amber-500);
    color: var(--amber-600);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-panel a {
    display: block;
    padding: 10px 0;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #000;
}

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

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1200px) / 2));
    right: max(32px, calc((100vw - 1200px) / 2));
    bottom: 80px;
    max-width: 780px;
    color: #fff;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-tags,
.tag-row,
.detail-meta,
.mini-meta,
.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.mini-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
    font-size: 42px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    right: max(32px, calc((100vw - 1200px) / 2));
    bottom: 42px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.active {
    width: 32px;
    background: var(--amber-400);
}

.section {
    margin: 54px auto;
}

.page-main {
    padding: 34px 0 64px;
}

.intro-panel,
.page-hero,
.content-section,
.player-section,
.detail-hero,
.category-overview-card,
.ranking-row {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    margin-top: -36px;
    position: relative;
    z-index: 8;
}

.intro-panel h1,
.page-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(30px, 4vw, 50px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.intro-panel p,
.page-hero p,
.section-heading p,
.category-card em,
.category-overview-card p,
.content-section p,
.ranking-info p,
.detail-one-line {
    color: var(--muted);
    line-height: 1.8;
}

.intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.compact-hero {
    padding: 42px;
    margin-bottom: 36px;
    overflow: hidden;
    position: relative;
}

.compact-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    top: -110px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
}

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

.section-heading h2,
.content-section h2,
.player-section h2,
.category-overview-card h2,
.ranking-info h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

.section-heading a,
.text-link {
    color: var(--amber-600);
    font-weight: 800;
}

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

.dense-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.52);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

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

.score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.large-score {
    top: 18px;
    right: 18px;
    font-size: 18px;
}

.card-content {
    padding: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--amber-600);
    font-size: 12px;
    font-weight: 800;
}

.card-content h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.card-content p {
    display: -webkit-box;
    min-height: 47px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card .card-content p {
    min-height: 0;
}

.mini-meta span,
.detail-meta span,
.tag-row span {
    color: #475569;
    background: var(--slate-100);
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #92400e;
    background: #fffbeb;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
    box-shadow: var(--shadow);
}

.category-card strong,
.category-card em,
.category-card small {
    position: relative;
    z-index: 2;
    display: block;
}

.category-card strong {
    margin-bottom: 12px;
    font-size: 24px;
}

.category-card em {
    color: #cbd5e1;
    font-style: normal;
}

.category-card small {
    margin-top: 18px;
    color: #fde68a;
}

.category-card small span {
    display: block;
    margin-top: 6px;
}

.category-glow {
    position: absolute;
    width: 190px;
    height: 190px;
    right: -70px;
    bottom: -80px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.52), transparent 70%);
}

.ranking-panel {
    padding: 30px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #fff, #fffbeb);
    box-shadow: var(--shadow);
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: var(--amber-500);
}

.rank-item img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-item strong,
.rank-item em {
    display: block;
}

.rank-item em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-number,
.ranking-rank {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 999px;
    font-weight: 900;
}

.category-overview-list {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 22px;
    padding: 28px;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, minmax(130px, 0.5fr));
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px 13px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.empty-state {
    display: none;
    margin: 30px 0;
    padding: 26px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 16px;
    background: #fff;
}

.movie-collection.is-empty .empty-state {
    display: block;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--amber-600);
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 330px) 1fr;
    gap: 34px;
    padding: 34px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: var(--slate-900);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.detail-one-line {
    margin: 0 0 18px;
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 16px;
}

.wide-tags {
    margin-bottom: 24px;
}

.player-section,
.content-section {
    margin: 32px 0;
    padding: 30px;
}

.player-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--slate-950);
    box-shadow: 0 28px 54px rgba(2, 6, 23, 0.32);
}

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

.player-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.22), rgba(2, 6, 23, 0.62));
}

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

.play-button {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 20px 42px rgba(245, 158, 11, 0.42);
}

.content-section p {
    margin: 0 0 26px;
    font-size: 17px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 52px 90px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
}

.ranking-poster img {
    width: 90px;
    height: 124px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-info h2 {
    font-size: 22px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
    margin-top: 70px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0;
}

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

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin: 9px 0;
}

.site-footer a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 1000px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-header.nav-open .mobile-panel {
        display: block;
    }

    .intro-panel,
    .section-heading,
    .detail-hero,
    .category-overview-card,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .intro-panel,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

@media (max-width: 700px) {
    .container,
    .navbar,
    .mobile-panel {
        width: min(100% - 24px, 1200px);
    }

    .hero {
        height: 74vh;
        min-height: 560px;
    }

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

    .hero-control {
        display: none;
    }

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

    .intro-panel,
    .compact-hero,
    .detail-hero,
    .player-section,
    .content-section,
    .ranking-panel {
        padding: 22px;
    }

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

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

    .detail-poster img {
        min-height: 0;
    }

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

    .ranking-row .outline-btn {
        grid-column: 1 / -1;
    }

    .ranking-poster img {
        width: 70px;
        height: 96px;
    }
}
