:root {
    --orange: #f97316;
    --amber: #f59e0b;
    --yellow: #eab308;
    --dark: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--dark);
    background: #fffaf5;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
    box-shadow: 0 10px 28px rgba(245, 158, 11, 0.32);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

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

.brand {
    font-size: clamp(20px, 2.6vw, 28px);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--orange);
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 650;
}

.main-nav a,
.mobile-nav a {
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 8px 12px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 14px;
}

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    height: clamp(520px, 70vh, 720px);
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 28%, rgba(251, 146, 60, 0.35), transparent 28%),
        linear-gradient(180deg, rgba(17, 24, 39, 0.34), rgba(17, 24, 39, 0.78)),
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.28));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    gap: 48px;
    align-items: center;
    color: #fff;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: #fed7aa;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.eyebrow.dark {
    color: var(--orange);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5.5vw, 72px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-text,
.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    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(90deg, var(--orange), var(--amber));
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.34);
}

.btn-glass {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: var(--dark);
    background: #fff;
}

.btn-soft {
    color: #9a3412;
    background: #ffedd5;
}

.btn-light-text {
    color: var(--orange);
    background: #fff;
}

.hero-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    transform: rotate(2deg);
}

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

.hero-card span {
    display: block;
    padding: 18px 20px;
    color: #fff;
    font-weight: 800;
}

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

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

.hero-dot.is-active {
    background: #fff;
}

.search-band {
    margin-top: -54px;
    position: relative;
    z-index: 8;
}

.search-panel,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    border-radius: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.search-panel h2,
.search-panel p {
    margin: 0;
}

.search-panel p {
    color: var(--muted);
}

.search-box {
    display: grid;
    gap: 8px;
    min-width: min(420px, 100%);
    color: var(--muted);
    font-weight: 700;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: 0;
    padding: 14px 16px;
    color: var(--dark);
    background: #fff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.section {
    padding: clamp(56px, 8vw, 92px) 0;
}

.section-light {
    background: #fffaf5;
}

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

.section-dark {
    color: #fff;
    background: linear-gradient(145deg, #111827, #301b0d 60%, #7c2d12);
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
}

.section-head a {
    color: var(--orange);
    font-weight: 800;
}

.section-head-dark a {
    color: #fed7aa;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card[hidden],
.rank-item[hidden] {
    display: none;
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #f97316, #facc15);
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.movie-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(17, 24, 39, 0.68);
    backdrop-filter: blur(10px);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #1f2937;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover,
.rank-title:hover,
.category-card a:hover {
    color: var(--orange);
}

.movie-meta,
.movie-brief,
.rank-item p,
.category-card p,
.footer-grid p {
    color: var(--muted);
}

.movie-meta {
    margin: 10px 0 8px;
    font-size: 13px;
}

.movie-brief {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card {
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 22px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.category-tile span,
.category-card-main span {
    display: block;
    color: #111827;
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 14px;
}

.category-card ul {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 76px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(245, 158, 11, 0.86)),
        linear-gradient(90deg, #111827, #7c2d12);
}

.ranking-hero {
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(124, 45, 18, 0.76)),
        var(--hero-cover) center / cover;
}

.compact-hero h1,
.ranking-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

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

.toolbar {
    margin-bottom: 28px;
    align-items: center;
}

.sticky-toolbar {
    position: sticky;
    top: 82px;
    z-index: 20;
}

.inline-search {
    min-width: min(520px, 100%);
}

.wide-search {
    min-width: min(620px, 100%);
}

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

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #9a3412;
    font-weight: 800;
    background: #ffedd5;
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 86px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.section-dark .rank-item {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
}

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

.rank-poster img {
    width: 86px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.rank-title {
    font-size: 18px;
    font-weight: 900;
}

.rank-item p {
    margin: 4px 0 0;
    font-size: 14px;
}

.section-dark .rank-item p {
    color: rgba(255, 255, 255, 0.76);
}

.detail-hero {
    padding: 44px 0 72px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 15%, rgba(251, 191, 36, 0.36), transparent 24%),
        linear-gradient(135deg, #111827, #7c2d12 62%, #f97316);
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    box-shadow: var(--shadow);
    transform: rotate(-1.5deg);
}

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

.detail-info .eyebrow.dark {
    color: #fed7aa;
}

.detail-line {
    color: rgba(255, 255, 255, 0.9);
}

.player-section {
    padding-top: 44px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    padding: 24px;
    color: #fff;
    text-align: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(249, 115, 22, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.74));
}

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

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    color: #fff;
    font-size: 30px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.38);
}

.player-cover strong {
    font-size: clamp(22px, 4vw, 42px);
}

.detail-content {
    display: grid;
    gap: 22px;
}

.content-card {
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 24px;
    padding: clamp(22px, 4vw, 34px);
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.85;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

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

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

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

.footer-grid ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid a:hover {
    color: #fed7aa;
}

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

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

    .hero-content {
        grid-template-columns: 1fr 280px;
    }
}

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

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

    .hero {
        height: 680px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        padding-top: 20px;
        padding-bottom: 74px;
    }

    .hero-card {
        display: none;
    }

    .search-panel,
    .toolbar,
    .section-head,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar {
        display: grid;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

    .movie-grid,
    .catalog-grid,
    .movie-grid-compact,
    .category-grid,
    .category-overview,
    .rank-list-home {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-grid {
        display: grid;
    }

    .detail-poster {
        width: min(260px, 80vw);
    }

    .sticky-toolbar {
        position: static;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .hero {
        height: 620px;
    }

    .hero-actions,
    .filter-buttons {
        width: 100%;
    }

    .btn,
    .filter-buttons button {
        flex: 1 1 auto;
    }

    .movie-grid,
    .catalog-grid,
    .movie-grid-compact,
    .category-grid,
    .category-overview {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

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

    .movie-title {
        min-height: 42px;
        font-size: 15px;
    }

    .movie-brief {
        -webkit-line-clamp: 2;
    }

    .rank-item {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 14px;
    }

    .rank-poster img {
        width: 64px;
    }
}
