:root {
    --paper: #f8f1df;
    --paper-deep: #efe1c5;
    --surface: rgba(255, 252, 244, 0.92);
    --surface-solid: #fffaf0;
    --ink: #2b2118;
    --muted: #7a6754;
    --soft: #b69a74;
    --gold: #c39242;
    --gold-deep: #8b6428;
    --line: rgba(98, 72, 42, 0.16);
    --shadow: 0 24px 60px rgba(72, 48, 24, 0.16);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 0%, rgba(214, 177, 105, 0.24), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(135, 92, 42, 0.14), transparent 30rem),
        linear-gradient(135deg, #fbf5e8 0%, #efe1c6 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(248, 241, 223, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff7e6;
    background: linear-gradient(135deg, #c39242, #6f451c);
    box-shadow: 0 10px 22px rgba(111, 69, 28, 0.25);
}

.brand-text {
    font-size: 1.18rem;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #5b4939;
    font-weight: 700;
    transition: 0.24s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fff6df;
    background: #6e4b25;
}

.header-search {
    position: relative;
    flex: 1 1 280px;
    max-width: 380px;
    margin-left: auto;
}

.header-search input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    background: rgba(255, 250, 240, 0.9);
    color: var(--ink);
    transition: 0.2s ease;
}

.header-search input:focus {
    border-color: rgba(142, 100, 40, 0.58);
    box-shadow: 0 0 0 4px rgba(195, 146, 66, 0.16);
}

.search-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    display: none;
    max-height: 420px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
}

.search-panel.is-open {
    display: block;
}

.search-panel a,
.search-panel p {
    display: block;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.search-panel a:last-child {
    border-bottom: 0;
}

.search-panel strong {
    display: block;
    color: var(--ink);
}

.search-panel span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(106, 73, 36, 0.1);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--ink);
}

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

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

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    background: #24180f;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.04);
    transform: scale(1.02);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(36, 24, 15, 0.08), rgba(36, 24, 15, 0.78)),
        radial-gradient(circle at 75% 20%, rgba(220, 166, 77, 0.22), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 660px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 54px;
    color: #fff7e8;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #c39242;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", "STSong", serif;
    font-size: clamp(3rem, 7vw, 6.6rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 700px;
    margin: 0 0 20px;
    color: rgba(255, 247, 232, 0.86);
    font-size: 1.1rem;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn {
    color: #2b2118;
    background: linear-gradient(135deg, #f2d08c, #c39242);
    box-shadow: 0 14px 30px rgba(195, 146, 66, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(195, 146, 66, 0.38);
}

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

.ghost-btn.dark {
    color: #5b3d1b;
    border-color: rgba(91, 61, 27, 0.2);
    background: rgba(255, 250, 240, 0.72);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(242, 208, 140, 0.8);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4.2;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.hero-poster::after,
.poster::after,
.detail-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 244, 223, 0.24);
    border-radius: inherit;
    pointer-events: none;
}

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

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

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

.section,
.page-main {
    padding: 54px 0;
}

.quick-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: 42px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(255, 250, 240, 0.7);
    box-shadow: var(--shadow);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", "STSong", serif;
    letter-spacing: -0.035em;
}

.quick-search p,
.page-hero p {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.filter-bar button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: #5c4328;
    background: rgba(255, 252, 244, 0.74);
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-bar button:hover,
.filter-bar button.is-active {
    color: #fff7e8;
    border-color: transparent;
    background: #6e4b25;
}

.page-filter {
    margin: 22px 0 30px;
}

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

.section-heading h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
}

.section-heading a {
    color: var(--gold-deep);
    font-weight: 800;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(84, 57, 28, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(195, 146, 66, 0.38);
    box-shadow: 0 22px 46px rgba(84, 57, 28, 0.18);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: linear-gradient(135deg, #8f6736, #261a12);
}

.poster img {
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff7e8;
    background: rgba(40, 24, 12, 0.68);
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
}

.card-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--soft);
}

.movie-card h3,
.rank-item h3 {
    margin: 8px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card p,
.rank-item p {
    flex: 1;
    margin: 0 0 14px;
    color: #6d5d4e;
    font-size: 0.92rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    color: #6a431c;
    background: rgba(195, 146, 66, 0.14);
    font-size: 0.76rem;
    font-weight: 800;
}

.hero-tags span {
    color: #f9dfaa;
    background: rgba(255, 244, 223, 0.12);
}

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

.category-grid.large {
    margin: 34px 0;
}

.category-card {
    min-height: 178px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    background:
        linear-gradient(145deg, rgba(255, 252, 244, 0.94), rgba(239, 225, 197, 0.88)),
        radial-gradient(circle at top right, rgba(195, 146, 66, 0.2), transparent 60%);
    box-shadow: 0 16px 34px rgba(84, 57, 28, 0.12);
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(195, 146, 66, 0.4);
}

.category-card span {
    display: block;
    margin-bottom: 10px;
    color: #8b6428;
    font-size: 1.2rem;
    font-weight: 900;
}

.category-card strong {
    display: block;
    color: #4d3824;
    font-size: 0.95rem;
    font-weight: 650;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-samples a {
    color: #6d5235;
    font-size: 0.82rem;
    font-weight: 700;
}

.ranking-preview {
    border-radius: var(--radius-xl);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 12px;
    background: rgba(255, 250, 240, 0.85);
    box-shadow: 0 12px 28px rgba(84, 57, 28, 0.09);
}

.rank-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff7e8;
    background: linear-gradient(135deg, #9a6c2f, #3d2816);
    font-weight: 900;
}

.rank-thumb {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: #2b2118;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 58px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 85% 15%, rgba(195, 146, 66, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(255, 252, 244, 0.92), rgba(239, 225, 197, 0.78));
    box-shadow: var(--shadow);
}

.page-hero.small h1 {
    font-size: clamp(2.4rem, 5vw, 4.4rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--gold-deep);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    margin-bottom: 42px;
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #2b2118;
    box-shadow: var(--shadow);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 38px;
    background: rgba(255, 250, 240, 0.86);
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin-top: 12px;
    font-size: clamp(2.3rem, 5vw, 5rem);
    line-height: 1.02;
}

.detail-info .lead {
    max-width: 850px;
    margin: 20px 0;
    color: #5f4d3c;
    font-size: 1.12rem;
}

.detail-tags {
    margin-top: 4px;
}

.player-section {
    margin: 42px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #090806;
    box-shadow: 0 34px 90px rgba(19, 13, 7, 0.35);
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #050403;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: #fff7e8;
    background: radial-gradient(circle at center, rgba(195, 146, 66, 0.25), rgba(8, 6, 4, 0.68));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #2b2118;
    background: linear-gradient(135deg, #ffe4a6, #c39242);
    box-shadow: 0 20px 48px rgba(195, 146, 66, 0.36);
    font-size: 2rem;
}

.player-overlay strong {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
}

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

.detail-content article {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    background: rgba(255, 250, 240, 0.86);
    box-shadow: 0 14px 34px rgba(84, 57, 28, 0.1);
}

.detail-content h2 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", "STSong", serif;
    font-size: 1.9rem;
}

.detail-content p {
    margin: 0;
    color: #5f4d3c;
}

.category-overview-block {
    padding: 38px 0;
    border-top: 1px solid var(--line);
}

.site-footer {
    margin-top: 60px;
    color: #efe1c5;
    background: #21160e;
}

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

.footer-brand {
    margin-bottom: 12px;
    color: #f2d08c;
    font-size: 1.3rem;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: rgba(239, 225, 197, 0.72);
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #f2d08c;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: rgba(239, 225, 197, 0.74);
}

.footer-links a:hover {
    color: #f2d08c;
}

.footer-bottom {
    padding: 18px;
    border-top: 1px solid rgba(239, 225, 197, 0.12);
    color: rgba(239, 225, 197, 0.58);
    text-align: center;
}

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

@media (max-width: 860px) {
    .header-inner {
        gap: 14px;
    }

    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 80px 0 72px;
    }

    .hero-poster {
        max-width: 240px;
    }

    .quick-search {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .rank-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .movie-grid,
    .compact-grid,
    .category-grid,
    .rank-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero,
    .detail-info {
        padding: 26px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
