:root {
    --amber-950: #451a03;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-300: #fcd34d;
    --amber-100: #fef3c7;
    --paper: #fffaf0;
    --line: rgba(146, 64, 14, .14);
    --text: #1f2937;
    --muted: #6b7280;
    --white: #ffffff;
    --shadow: 0 20px 55px rgba(120, 53, 15, .16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 45%, #fffbeb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--amber-900));
    box-shadow: 0 10px 25px rgba(69, 26, 3, .22);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber-500), var(--amber-700));
    box-shadow: 0 12px 24px rgba(69, 26, 3, .24);
    font-weight: 900;
    font-size: 26px;
    transition: transform .25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong {
    font-size: clamp(18px, 2vw, 25px);
    letter-spacing: -.03em;
}

.brand-copy em {
    color: var(--amber-100);
    font-size: 12px;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    color: var(--white);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    transition: background .25s ease, transform .25s ease;
}

.site-nav a:hover,
.site-nav a.active {
    background: rgba(245, 158, 11, .3);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, .12);
    border-radius: 12px;
    width: 44px;
    height: 44px;
}

.hero-section {
    min-height: 600px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(120, 53, 15, .95), rgba(180, 83, 9, .82));
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    opacity: .86;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto -10% -30% -10%;
    height: 260px;
    background: radial-gradient(circle, rgba(252, 211, 77, .32), transparent 65%);
    z-index: -1;
}

.hero-inner {
    min-height: 600px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
    color: var(--white);
}

.hero-copy {
    max-width: 760px;
    animation: fadeIn .8s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-300);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

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

.hero-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -.06em;
}

.hero-copy p {
    margin: 0;
    max-width: 680px;
    color: var(--amber-100);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-search {
    margin-top: 28px;
    display: flex;
    max-width: 620px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 40px rgba(69, 26, 3, .24);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 12px 18px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, .78);
}

.hero-search button,
.btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 900;
    cursor: pointer;
}

.hero-search button,
.btn.primary {
    color: var(--amber-950);
    background: var(--white);
    box-shadow: 0 12px 28px rgba(69, 26, 3, .2);
}

.btn.ghost {
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, .9);
    background: transparent;
}

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

.btn,
.hero-search button {
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.btn:hover,
.hero-search button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-card {
    position: relative;
    min-height: 480px;
    overflow: hidden;
    border-radius: 32px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 30px 80px rgba(69, 26, 3, .38);
    transform: rotate(2deg);
}

.hero-card img {
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: cover;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(69, 26, 3, .92));
}

.hero-card span,
.hero-card strong,
.hero-card em {
    position: absolute;
    left: 24px;
    z-index: 1;
}

.hero-card span {
    bottom: 86px;
    color: var(--amber-100);
    font-weight: 700;
}

.hero-card strong {
    bottom: 40px;
    right: 24px;
    color: var(--white);
    font-size: 26px;
    line-height: 1.15;
}

.hero-card em {
    top: 18px;
    right: 18px;
    left: auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: var(--amber-950);
    background: var(--amber-300);
    border-radius: 18px;
    font-style: normal;
    font-weight: 900;
}

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

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 8px 0 4px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -.04em;
    color: #111827;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.section-link {
    color: var(--amber-800);
    font-weight: 900;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 48px rgba(120, 53, 15, .1);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

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

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

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

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

.score-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--amber-950);
    background: var(--amber-300);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(69, 26, 3, .18);
}

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

.movie-card-meta,
.rank-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
    color: #111827;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    color: var(--amber-800);
    background: var(--amber-100);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

.large-tags span {
    color: var(--amber-100);
    background: rgba(255, 255, 255, .16);
}

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

.category-tile {
    min-height: 138px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(245, 158, 11, .22);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(254, 243, 199, .75));
    box-shadow: 0 20px 48px rgba(120, 53, 15, .1);
    transition: transform .25s ease, box-shadow .25s ease;
}

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

.category-tile strong {
    color: var(--amber-900);
    font-size: 22px;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
    gap: 34px;
    align-items: start;
}

.rank-panel,
.side-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 22px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 12px;
    border-radius: 20px;
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
}

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

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--amber-950);
    background: var(--amber-300);
    font-weight: 900;
}

.rank-content h3 {
    margin: 4px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

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

.rank-meta strong {
    color: var(--amber-700);
    font-size: 18px;
}

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

.page-hero {
    min-height: 340px;
    display: grid;
    align-items: center;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-900), var(--amber-700));
    background-size: cover;
    background-position: center;
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(40px, 7vw, 64px);
    line-height: 1.08;
    letter-spacing: -.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--amber-100);
    font-size: 19px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .78);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: var(--amber-300);
}

.library-controls {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 14px 36px rgba(120, 53, 15, .08);
}

.search-box {
    flex: 1;
    display: grid;
    gap: 8px;
    color: var(--amber-900);
    font-weight: 900;
}

.search-box input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(146, 64, 14, .22);
    border-radius: 16px;
    background: var(--white);
    outline: none;
    padding: 12px 14px;
}

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

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-reset {
    border: 0;
    border-radius: 16px;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-600), var(--amber-700));
    padding: 12px 18px;
    font-weight: 900;
    cursor: pointer;
}

.is-hidden {
    display: none !important;
}

.detail-hero {
    min-height: 520px;
    display: grid;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: var(--white);
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 5vw, 56px);
    padding: 64px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .36);
}

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

.detail-copy h1 {
    margin: 14px 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -.05em;
}

.lead-text {
    max-width: 820px;
    margin: 0;
    color: var(--amber-100);
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span,
.detail-meta strong {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    color: var(--white);
    font-weight: 900;
}

.detail-meta strong {
    color: var(--amber-950);
    background: var(--amber-300);
}

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

.detail-main,
.article-section,
.player-section {
    min-width: 0;
}

.player-section,
.article-section,
.side-card {
    margin-bottom: 26px;
}

.player-section h2,
.article-section h2,
.side-card h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 28px;
    letter-spacing: -.03em;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 70px rgba(69, 26, 3, .24);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    width: 100%;
    border: 0;
    color: var(--white);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 2;
}

.player-cover:hover {
    transform: scale(1.01);
}

.player-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--amber-950);
    background: rgba(252, 211, 77, .95);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .32);
    font-size: 34px;
    padding-left: 4px;
}

.player-title {
    font-size: 22px;
    font-weight: 900;
}

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

.article-section {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 18px 48px rgba(120, 53, 15, .08);
}

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

.side-card dl {
    display: grid;
    gap: 12px;
    margin: 0;
}

.side-card dt {
    color: var(--amber-800);
    font-size: 13px;
    font-weight: 900;
}

.side-card dd {
    margin: -6px 0 4px;
    color: #111827;
    font-weight: 700;
}

.site-footer {
    margin-top: 80px;
    padding: 34px 0;
    color: var(--amber-100);
    background: linear-gradient(90deg, var(--amber-950), var(--amber-900));
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1120px) {
    .library-grid,
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

@media (max-width: 900px) {
    .header-inner {
        min-height: 68px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        display: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 14px;
        border-radius: 22px;
        background: rgba(120, 53, 15, .98);
        box-shadow: var(--shadow);
    }

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

    .hero-inner,
    .detail-hero-inner,
    .detail-layout,
    .two-column {
        grid-template-columns: 1fr;
    }

    .hero-card {
        display: none;
    }

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

    .library-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-group {
        align-items: stretch;
        flex-direction: column;
    }

    .full-rank {
        grid-template-columns: 1fr;
    }
}

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

    .brand-copy em {
        display: none;
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 38px;
    }

    .hero-search {
        border-radius: 24px;
        flex-direction: column;
    }

    .hero-search button {
        width: 100%;
    }

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

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

    .movie-card h3 {
        font-size: 16px;
    }

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

    .section-block {
        padding: 48px 0;
    }

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

    .page-hero {
        min-height: 280px;
    }

    .detail-hero-inner {
        padding: 42px 0;
    }

    .player-icon {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }

    .footer-inner {
        display: grid;
    }
}
