:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-warm: #fff7ed;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #f1d6a8;
    --brand: #d97706;
    --brand-dark: #b45309;
    --brand-soft: #fef3c7;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(180, 83, 9, 0.16);
    --shadow-soft: 0 12px 32px rgba(31, 41, 55, 0.08);
    --radius: 24px;
    --container: 1180px;
}

* {
    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(--ink);
    background: var(--bg);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(var(--container), calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-dark);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-logo {
    font-size: 24px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: #4b5563;
    font-weight: 600;
}

.site-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--brand);
}

.nav-toggle {
    display: none;
    border: 0;
    background: var(--brand-soft);
    color: var(--brand-dark);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
    font-weight: 600;
}

.hero-slider {
    position: relative;
    height: min(620px, 76vh);
    min-height: 480px;
    overflow: hidden;
    background: linear-gradient(120deg, #f59e0b, #f97316);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.16), transparent 26%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(146, 64, 14, 0.55), rgba(251, 146, 60, 0.22));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--container), calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    max-width: 760px;
    margin-left: max(16px, calc((100% - var(--container)) / 2));
}

.hero-kicker {
    width: fit-content;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.32);
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(100%, 680px);
    margin: 0 0 24px;
    font-size: clamp(17px, 2vw, 22px);
    color: #fffbeb;
}

.hero-tags,
.detail-meta,
.rank-tags,
.movie-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.rank-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    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: #fff;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    box-shadow: 0 16px 28px rgba(217, 119, 6, 0.28);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.36);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section-wrap,
.search-panel {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.section-wrap {
    padding: 72px 0;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 6;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.search-form,
.catalog-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
}

.search-form input,
.catalog-tools input,
.catalog-tools select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #f3d5a2;
    border-radius: 16px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
}

.search-form input:focus,
.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.search-form button {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    padding: 0 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    font-weight: 800;
    cursor: pointer;
}

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

.section-head.centered {
    justify-content: center;
    text-align: center;
}

.section-head h2,
.rank-card h2,
.detail-article h2,
.category-overview-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-head a,
.rank-card-head a {
    color: var(--brand);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(217, 119, 6, 0.16);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.42);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b, #fb923c);
}

.movie-card-small .movie-cover {
    height: 180px;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.58));
}

.movie-year,
.movie-play {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-year {
    top: 14px;
    right: 14px;
    padding: 5px 10px;
    color: var(--brand-dark);
    background: #fff;
}

.movie-play {
    left: 14px;
    bottom: 14px;
    padding: 6px 12px;
    color: #fff;
    background: rgba(217, 119, 6, 0.94);
}

.movie-info {
    padding: 18px;
}

.movie-title {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card:hover .movie-title {
    color: var(--brand);
}

.movie-line {
    margin: 0 0 14px;
    min-height: 52px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    justify-content: space-between;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

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

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

.category-tile {
    position: relative;
    height: 150px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, var(--brand), var(--orange));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
}

.category-tile span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
    gap: 32px;
    align-items: start;
}

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

.rank-card {
    position: sticky;
    top: 96px;
    border-radius: var(--radius);
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.rank-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(217, 119, 6, 0.14);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.04);
}

.rank-number {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    font-weight: 900;
}

.rank-poster {
    width: 72px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--brand-soft);
}

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

.rank-title {
    display: block;
    margin-bottom: 4px;
    font-weight: 900;
    font-size: 18px;
}

.rank-content p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.rank-tags span,
.detail-meta span,
.tag-list span {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.rank-score {
    color: var(--red);
    font-weight: 900;
    font-size: 22px;
}

.page-hero {
    min-height: 310px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #b45309, #f59e0b 50%, #fb923c);
    color: #fff;
}

.page-hero > div {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.page-hero p {
    margin: 0 0 8px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #fef3c7;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero span {
    display: block;
    max-width: 720px;
    color: #fff7ed;
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.category-image {
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--brand-soft);
}

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

.category-overview-card h2 {
    margin-bottom: 8px;
    font-size: 26px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted);
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fffbeb;
    font-size: 13px;
    font-weight: 700;
}

.catalog-section {
    padding-top: 42px;
}

.catalog-tools {
    grid-template-columns: minmax(0, 1fr) 180px;
    margin-bottom: 24px;
}

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

.catalog-grid .movie-cover {
    height: 220px;
}

.detail-hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.38;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(120, 53, 15, 0.74), rgba(251, 146, 60, 0.32));
}

.detail-inner {
    position: relative;
    width: min(var(--container), calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    padding: 58px 0;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
    background: var(--brand-soft);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fde68a;
    font-weight: 700;
}

.detail-summary h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.detail-line {
    max-width: 780px;
    margin: 0 0 22px;
    color: #fffbeb;
    font-size: 20px;
}

.detail-meta,
.tag-list {
    margin-bottom: 18px;
}

.detail-main {
    padding-top: 46px;
}

.player-box {
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.video-wrap video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-wrap video {
    z-index: 1;
    object-fit: contain;
}

.player-cover {
    z-index: 3;
    cursor: pointer;
    background: #000;
}

.player-cover.is-hidden {
    display: none;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.58;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--orange));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-size: 32px;
    transition: transform 0.2s ease;
}

.big-play:hover {
    transform: translate(-50%, -50%) scale(1.08);
}

.detail-article {
    margin-top: 28px;
    padding: 34px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-article h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.detail-article p {
    margin: 0 0 26px;
    color: #374151;
    font-size: 17px;
}

.detail-article p:last-child {
    margin-bottom: 0;
}

.detail-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.detail-nav a {
    padding: 18px;
    border-radius: 18px;
    background: #fff7ed;
    color: #92400e;
    font-weight: 800;
}

.site-footer {
    margin-top: 40px;
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
    border-top: 1px solid #fed7aa;
}

.footer-grid {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 34px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
}

.footer-grid p {
    margin: 14px 0 0;
    color: var(--muted);
}

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

.footer-grid a:not(.footer-logo) {
    display: block;
    margin: 8px 0;
    color: #6b7280;
    font-weight: 600;
}

.footer-grid a:hover {
    color: var(--brand);
}

.footer-bottom {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid #fed7aa;
    color: #92400e;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

    .two-column,
    .detail-inner,
    .footer-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        position: static;
    }

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

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .site-logo {
        font-size: 19px;
    }

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

    .hero-content {
        margin-left: 16px;
        margin-right: 16px;
        width: calc(100% - 32px);
    }

    .hero-control {
        display: none;
    }

    .search-form,
    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-cover,
    .catalog-grid .movie-cover {
        height: 190px;
    }

    .movie-info {
        padding: 14px;
    }

    .movie-title {
        font-size: 17px;
    }

    .movie-line {
        min-height: 44px;
        font-size: 13px;
    }

    .section-head {
        display: block;
    }

    .rank-item {
        grid-template-columns: 34px 58px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .rank-poster {
        width: 58px;
        height: 78px;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .detail-inner {
        gap: 24px;
    }

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

    .detail-article {
        padding: 24px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-tile {
        height: 128px;
    }

    .footer-grid {
        gap: 18px;
    }
}
