:root {
    --primary: #a05f3d;
    --primary-dark: #6d3f2f;
    --primary-soft: #faf5f0;
    --accent: #f4b35b;
    --text: #241916;
    --muted: #6b5f5a;
    --line: #eadfd7;
    --card: #ffffff;
    --page: #fbf7f2;
    --shadow: 0 20px 45px rgba(75, 45, 30, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    object-fit: cover;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(234, 223, 215, 0.85);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(160, 95, 61, 0.28);
}

.brand-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: 12px;
}

.nav-link {
    font-size: 15px;
    color: #4c403b;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.search-box input,
.inline-filter input {
    border: 1px solid #d8ccc2;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 15px;
}

.header-search input:focus,
.search-box input:focus,
.inline-filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(160, 95, 61, 0.13);
}

.header-search button,
.search-box button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
}

.mobile-nav.open {
    display: flex;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #201512;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-content {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 72px 24px;
    color: #fff;
}

.eyebrow,
.page-hero span,
.rank-hero span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(244, 179, 91, 0.16);
    color: #8b512f;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-content .eyebrow,
.rank-hero span {
    background: rgba(255, 255, 255, 0.17);
    color: #ffe0b0;
}

.hero-content h1,
.hero-content h2,
.rank-hero h1 {
    max-width: 760px;
    margin-top: 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p,
.rank-hero p {
    max-width: 680px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.75;
}

.hero-actions,
.hero-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-links {
    margin-top: 18px;
}

.hero-links a {
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
}

.btn-primary,
.btn-ghost,
.btn-wide,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--primary), #c57a43);
    color: #fff;
    box-shadow: 0 16px 28px rgba(160, 95, 61, 0.3);
}

.btn-ghost {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.btn-wide {
    width: 100%;
    margin-top: 18px;
    padding: 12px 16px;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-wide:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 34px;
    backdrop-filter: blur(12px);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

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

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
    margin-top: 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.035em;
    color: var(--text);
}

.section-heading.with-action {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-heading.compact h2 {
    font-size: 28px;
}

.text-link {
    color: var(--primary);
    font-weight: 850;
}

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

.category-tile {
    min-height: 132px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, #fff7ec);
    box-shadow: var(--shadow);
}

.category-tile strong {
    display: block;
    font-size: 20px;
    color: var(--primary-dark);
}

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

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

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

.movie-card {
    min-width: 0;
    border-radius: 22px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid rgba(234, 223, 215, 0.85);
    box-shadow: 0 10px 26px rgba(75, 45, 30, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 42px rgba(75, 45, 30, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e8ded7;
}

.poster-link img {
    width: 100%;
    height: 100%;
    transition: transform 0.45s ease;
}

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

.card-badge,
.play-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    backdrop-filter: blur(12px);
}

.card-badge {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.play-mark {
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 14px;
}

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

.movie-card h3 {
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    color: var(--text);
}

.movie-card p {
    margin-top: 8px;
    min-height: 42px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    color: #8d7b72;
    font-size: 12px;
}

.movie-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 6px;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.ranking-panel {
    position: sticky;
    top: 96px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    padding: 24px;
    box-shadow: var(--shadow);
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(234, 223, 215, 0.7);
}

.compact-card img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
}

.compact-card strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    line-height: 1.35;
}

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

.rank-num {
    min-width: 28px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
    text-align: center;
}

.inline-filter input {
    min-width: 260px;
    padding: 12px 18px;
}

.page-main {
    padding-top: 26px;
}

.page-hero,
.rank-hero {
    max-width: 1280px;
    margin: 0 auto;
    border-radius: 34px;
    overflow: hidden;
}

.page-hero {
    padding: 58px 34px;
    background: linear-gradient(135deg, #fff, #fff1e0);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
}

.channel-filter,
.search-box {
    margin-top: 26px;
}

.search-box {
    display: flex;
    max-width: 700px;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 18px;
}

.search-box button {
    min-width: 112px;
}

.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: 1px solid var(--line);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.category-overview-card h2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary-dark);
}

.category-overview-card p {
    margin: 12px 0 20px;
    color: var(--muted);
    line-height: 1.7;
}

.rank-hero {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
    background-position: center;
    background-size: cover;
    color: #fff;
}

.ranking-layout {
    grid-template-columns: 360px minmax(0, 1fr);
}

.ranking-panel.wide {
    position: sticky;
    top: 96px;
}

.breadcrumb {
    max-width: 1280px;
    margin: 24px auto 18px;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 750;
}

.detail-main {
    padding-bottom: 40px;
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    overflow: hidden;
    background: #120c0a;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
    color: #fff;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.26);
    font-size: 30px;
    backdrop-filter: blur(12px);
}

.play-overlay strong {
    font-size: 20px;
}

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

.detail-info {
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #fff;
    padding: 32px;
    box-shadow: var(--shadow);
}

.detail-info p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.detail-info .btn-primary {
    margin-top: 26px;
}

.detail-content {
    max-width: 980px;
    margin: 36px auto 0;
    padding: 0 24px;
}

.detail-section {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: 0 14px 32px rgba(75, 45, 30, 0.08);
}

.detail-section h2 {
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
}

.detail-section p {
    margin-top: 14px;
    color: #4d403b;
    line-height: 1.92;
    font-size: 17px;
}

.facts dl {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.facts div {
    padding: 16px;
    border-radius: 18px;
    background: var(--primary-soft);
}

.facts dt {
    color: #8d7b72;
    font-size: 13px;
}

.facts dd {
    margin-top: 4px;
    font-weight: 850;
    color: var(--primary-dark);
}

.related-wrap {
    padding-top: 28px;
}

.site-footer {
    margin-top: 36px;
    background: #201512;
    color: #fff;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.footer-inner strong {
    font-size: 22px;
}

.footer-inner p {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.82);
    padding: 7px 0;
}

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

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

    .split-layout,
    .ranking-layout,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .ranking-panel,
    .ranking-panel.wide {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-search,
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-control {
        display: none;
    }

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

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

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

    .section-heading.with-action,
    .footer-inner {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }

    .footer-links {
        justify-content: flex-start;
    }

    .facts dl {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 16px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-carousel {
        height: 520px;
    }

    .hero-content {
        padding: 56px 18px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .section-wrap {
        padding: 38px 16px;
    }

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

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

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

    .tag-row {
        display: none;
    }

    .page-hero,
    .rank-hero {
        margin: 0 16px;
        padding: 36px 20px;
        border-radius: 24px;
    }

    .search-box {
        display: grid;
    }

    .inline-filter input {
        min-width: 0;
        width: 100%;
    }

    .detail-hero,
    .breadcrumb,
    .detail-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .detail-info,
    .detail-section {
        padding: 22px;
        border-radius: 22px;
    }

    .facts dl {
        grid-template-columns: 1fr;
    }
}
