:root {
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #f97316;
    --red: #ef4444;
    --slate: #0f172a;
    --muted: #64748b;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #111827;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #fff7ed 100%);
    line-height: 1.6;
}

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

img,
video {
    display: block;
    width: 100%;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand {
    color: #ffffff;
    font-size: 22px;
}

.site-header.is-scrolled .brand,
.site-header.is-open .brand {
    color: #111827;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 28px rgba(217, 119, 6, 0.36);
    font-size: 14px;
}

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

.desktop-nav a {
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled .desktop-nav a,
.site-header.is-open .desktop-nav a {
    color: #374151;
}

.desktop-nav a:hover,
.site-header.is-scrolled .desktop-nav a:hover,
.site-header.is-open .desktop-nav a:hover {
    color: var(--amber-dark);
    background: #fffbeb;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px 18px;
    gap: 10px;
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    color: #92400e;
    font-weight: 800;
}

.hero {
    position: relative;
    min-height: 700px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #d97706 0%, #f97316 52%, #ef4444 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 58px 58px;
    opacity: 0.18;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -36% -12%;
    height: 52%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
    filter: blur(30px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.38;
    transform: scale(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.84) 0%, rgba(15, 23, 42, 0.48) 44%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-inner {
    position: relative;
    z-index: 3;
    max-width: 1180px;
    min-height: 700px;
    margin: 0 auto;
    padding: 132px 22px 82px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    gap: 44px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(16px);
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(44px, 7vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-actions,
.card-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: #ffffff;
    color: var(--amber-dark);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.btn-amber {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 18px 32px rgba(217, 119, 6, 0.26);
}

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

.hero-panel {
    padding: 18px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero-panel img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.16);
}

.hero-panel-info {
    padding: 16px 6px 4px;
}

.hero-panel-info strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.main {
    position: relative;
}

.section,
.section-alt,
.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 74px 22px;
}

.section-alt-wrap {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

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

.section-head h2,
.page-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-dark);
    font-weight: 900;
    white-space: nowrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: -54px;
    position: relative;
    z-index: 8;
}

.stat-card,
.category-tile,
.info-card,
.movie-card,
.detail-card,
.rank-row,
.filter-bar {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 24px;
    border-radius: 24px;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    color: #111827;
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.17);
}

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    max-width: calc(100% - 24px);
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.card-title {
    margin: 8px 0 9px;
    font-size: 19px;
    line-height: 1.28;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.card-tags span,
.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    font-weight: 900;
}

.featured-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) 1fr;
    gap: 30px;
    padding: 22px;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.featured-card img {
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 24px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.featured-content {
    align-self: center;
    padding: 18px 12px;
}

.featured-content h2 {
    margin: 10px 0 12px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.featured-content p {
    color: #475569;
    font-size: 18px;
}

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

.category-tile {
    padding: 24px;
    border-radius: 24px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    background: #fffbeb;
}

.category-tile strong {
    display: block;
    color: #111827;
    font-size: 22px;
    margin-bottom: 8px;
}

.category-tile span {
    color: var(--muted);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 72px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 20px;
}

.rank-no {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.rank-row img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-info strong {
    display: block;
    color: #111827;
    font-size: 18px;
}

.rank-info span,
.rank-score {
    color: var(--muted);
    font-weight: 800;
}

.rank-score b {
    color: var(--amber-dark);
    font-size: 22px;
}

.page-hero {
    padding: 132px 22px 52px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #92400e 48%, #ef4444 100%);
}

.page-title {
    max-width: 1180px;
    margin: 0 auto;
}

.page-title h1 {
    color: #ffffff;
}

.page-title p {
    color: rgba(255, 255, 255, 0.82);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: 24px;
}

.movie-search {
    width: 100%;
    min-height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    background: #ffffff;
}

.movie-search:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

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

.filter-buttons button {
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-weight: 900;
    cursor: pointer;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.filter-count {
    color: var(--muted);
    font-weight: 800;
    margin: -10px 0 24px;
}

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

.player-panel,
.detail-card,
.side-panel {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.video-frame {
    position: relative;
    background: #020617;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.38), rgba(15, 23, 42, 0.86));
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 40px rgba(217, 119, 6, 0.42);
    font-size: 30px;
}

.overlay-title {
    max-width: 88%;
    font-size: clamp(24px, 4vw, 46px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.overlay-text {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4.5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

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

.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-weight: 900;
}

.detail-card h2,
.side-panel h2 {
    margin: 24px 0 10px;
    color: #111827;
    font-size: 24px;
}

.detail-card p {
    color: #475569;
    font-size: 17px;
}

.side-panel {
    padding: 18px;
    position: sticky;
    top: 96px;
}

.side-panel h2:first-child {
    margin-top: 0;
}

.compact-link {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.2s ease;
}

.compact-link:hover {
    background: #fff7ed;
}

.compact-link img {
    width: 74px;
    height: 98px;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.compact-link strong {
    display: block;
    color: #111827;
    line-height: 1.35;
}

.compact-link em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.site-footer {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
}

.footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 54px 22px 30px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.68);
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 22px 34px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, 0.62);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom button {
    border: 0;
    color: #fbbf24;
    background: transparent;
    cursor: pointer;
    font-weight: 900;
}

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

    .hero-inner,
    .featured-card,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        color: #ffffff;
    }

    .site-header.is-scrolled .menu-toggle,
    .site-header.is-open .menu-toggle {
        color: #111827;
        background: #fffbeb;
    }

    .site-header.is-open .mobile-nav {
        display: grid;
    }

    .nav-wrap {
        height: 66px;
    }

    .brand {
        font-size: 19px;
    }

    .hero,
    .hero-inner {
        min-height: 760px;
    }

    .hero-inner {
        padding-top: 108px;
        gap: 28px;
    }

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

    .section,
    .section-alt,
    .page-shell {
        padding: 48px 16px;
    }

    .page-hero {
        padding: 104px 16px 42px;
    }

    .section-head,
    .filter-bar,
    .footer-bottom {
        display: block;
    }

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

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

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

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

    .footer-grid {
        padding-top: 42px;
    }
}
