:root {
    --sand-50: #faf8f3;
    --sand-100: #f5f0e6;
    --sand-200: #e8deca;
    --sand-500: #b59a61;
    --sand-600: #9d8350;
    --sand-700: #7d6840;
    --desert-500: #d5a643;
    --desert-600: #b88d39;
    --ink-900: #111827;
    --ink-700: #374151;
    --ink-600: #4b5563;
    --ink-500: #6b7280;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(125, 104, 64, 0.16);
    --shadow-soft: 0 12px 28px rgba(17, 24, 39, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink-900);
    background: linear-gradient(180deg, var(--sand-50), #ffffff 520px);
    min-height: 100vh;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(232, 222, 202, 0.72);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.logo-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sand-500), var(--desert-600));
    box-shadow: 0 10px 24px rgba(181, 154, 97, 0.35);
    font-size: 18px;
    transition: transform 0.2s ease;
}

.site-logo:hover .logo-mark {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text strong {
    font-size: 22px;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--sand-700), var(--desert-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text em {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-500);
    font-style: normal;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--ink-600);
    font-size: 15px;
    font-weight: 600;
}

.nav-links a {
    position: relative;
    padding: 26px 0;
    transition: color 0.2s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sand-500), var(--desert-500));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--sand-700);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--sand-100);
    color: var(--ink-700);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border-top: 1px solid var(--sand-200);
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--ink-700);
    font-weight: 600;
}

.mobile-nav a:hover {
    background: var(--sand-100);
    color: var(--sand-700);
}

.hero {
    position: relative;
    height: clamp(500px, 72vh, 700px);
    overflow: hidden;
    background: #000000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 35%, rgba(181, 154, 97, 0.34), transparent 34%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.32) 55%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
}

.hero-content .hero-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 82px;
    max-width: 820px;
    color: #ffffff;
}

.hero-tags,
.detail-meta,
.movie-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span:first-child {
    background: var(--sand-500);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.search-panel button,
.side-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-panel button,
.side-card a {
    color: #ffffff;
    background: linear-gradient(90deg, var(--sand-500), var(--desert-500));
    box-shadow: 0 14px 28px rgba(181, 154, 97, 0.3);
}

.primary-button:hover,
.search-panel button:hover,
.side-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(181, 154, 97, 0.36);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.search-strip {
    padding: 34px 0 14px;
}

.search-strip .container,
.page-hero .container {
    position: relative;
    z-index: 2;
}

.search-strip h2,
.page-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.search-strip p,
.page-hero p {
    max-width: 780px;
    margin: 0 0 22px;
    color: var(--ink-600);
    line-height: 1.8;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 760px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(232, 222, 202, 0.7);
}

.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--sand-200);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--ink-900);
    background: #ffffff;
    font-size: 15px;
    outline: none;
}

.search-panel input {
    border: 0;
    background: transparent;
}

.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    box-shadow: 0 0 0 3px rgba(181, 154, 97, 0.18);
}

.content-section {
    padding: 56px 0;
}

.content-section.tinted {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), var(--sand-50));
}

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

.section-kicker {
    display: inline-block;
    width: 6px;
    height: 34px;
    margin-right: 10px;
    border-radius: 999px;
    vertical-align: middle;
    background: linear-gradient(180deg, var(--sand-500), var(--desert-500));
}

.section-head h2 {
    display: inline-block;
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 10px 0 0;
    color: var(--ink-500);
    line-height: 1.7;
}

.section-link {
    color: var(--sand-700);
    font-weight: 800;
    white-space: nowrap;
}

.card-grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.movie-card.horizontal,
.movie-card.ranking {
    flex-direction: row;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: var(--sand-100);
}

.movie-card.horizontal .poster-link,
.movie-card.ranking .poster-link {
    width: 150px;
    flex: 0 0 150px;
    aspect-ratio: 2 / 3;
}

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

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

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sand-500), var(--desert-600));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.movie-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.movie-meta,
.detail-meta {
    color: var(--ink-500);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.movie-meta span + span::before,
.detail-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: var(--sand-500);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--ink-900);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--sand-700);
}

.movie-card p {
    margin: 0;
    color: var(--ink-600);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag-row span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--sand-700);
    background: var(--sand-100);
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.category-card span,
.category-card strong {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 24px;
    font-weight: 900;
}

.category-card strong {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.7;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #21190c, var(--sand-700));
}

.page-hero.compact {
    min-height: 320px;
    color: var(--ink-900);
    background:
        radial-gradient(circle at 20% 20%, rgba(181, 154, 97, 0.2), transparent 26%),
        linear-gradient(180deg, var(--sand-50), #ffffff);
}

.page-hero.ranking-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.28));
}

.page-hero.ranking-hero p {
    color: rgba(255, 255, 255, 0.86);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--sand-600);
    font-size: 14px;
    font-weight: 800;
}

.ranking-hero .breadcrumb {
    color: rgba(255, 255, 255, 0.9);
}

.breadcrumb a::after {
    content: "/";
    margin-left: 8px;
    color: var(--sand-500);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-bar.expanded {
    grid-template-columns: 1fr 190px 160px;
}

.watch-layout {
    padding: 28px 0 0;
    background: #000000;
}

.watch-layout .breadcrumb {
    color: rgba(255, 255, 255, 0.88);
}

.watch-layout .breadcrumb a::after {
    color: rgba(255, 255, 255, 0.45);
}

.player-panel {
    overflow: hidden;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: #000000;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.2));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sand-500), var(--desert-600));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    font-size: 34px;
    cursor: pointer;
}

.play-overlay strong {
    width: min(680px, 90%);
    text-align: center;
    font-size: clamp(22px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.player-loader,
.player-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    z-index: 4;
    padding: 10px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.64);
    transform: translateX(-50%);
    font-weight: 700;
}

.player-message:empty {
    display: none;
}

.detail-section {
    padding: 46px 0 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 30px;
    align-items: start;
}

.detail-main,
.detail-side .side-card {
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-main {
    padding: 30px;
}

.detail-main h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.05em;
}

.detail-block {
    margin-top: 28px;
}

.detail-block h2,
.detail-side h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-block p,
.detail-side p {
    margin: 0;
    color: var(--ink-700);
    line-height: 1.9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.detail-side > img {
    width: 100%;
    border-radius: var(--radius-xl);
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.side-card {
    padding: 22px;
}

.side-card a {
    margin-top: 18px;
}

.site-footer {
    margin-top: 40px;
    background: #ffffff;
    border-top: 1px solid var(--sand-200);
}

.footer-shell {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 36px;
    padding: 42px 0;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
    color: var(--ink-600);
}

.footer-brand p {
    max-width: 430px;
    line-height: 1.8;
}

.footer-links h2 {
    margin: 0 0 16px;
    font-size: 16px;
}

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

.footer-links a:hover {
    color: var(--sand-700);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--sand-200);
    font-size: 14px;
}

[data-movie-card][hidden] {
    display: none;
}

@media (max-width: 1080px) {
    .nav-links {
        gap: 14px;
        font-size: 14px;
    }

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

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

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-content .hero-copy {
        padding-bottom: 76px;
    }

    .card-grid.four,
    .card-grid.three,
    .card-grid.two,
    .ranking-grid,
    .ranking-grid.full,
    .category-grid,
    .footer-shell,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .filter-bar.expanded {
        grid-template-columns: 1fr;
    }

    .detail-main {
        padding: 22px;
    }

    .detail-side {
        grid-row: 1;
    }

    .detail-side > img {
        max-width: 320px;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-shell,
    .footer-shell,
    .content-section {
        width: min(100% - 24px, 1180px);
    }

    .logo-mark {
        width: 40px;
        height: 40px;
    }

    .logo-text strong {
        font-size: 19px;
    }

    .hero {
        height: 560px;
    }

    .hero-content .hero-copy {
        padding-bottom: 70px;
    }

    .hero-tags span {
        font-size: 12px;
        padding: 6px 9px;
    }

    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-card.horizontal,
    .movie-card.ranking {
        flex-direction: column;
    }

    .movie-card.horizontal .poster-link,
    .movie-card.ranking .poster-link {
        width: 100%;
        flex-basis: auto;
    }

    .content-section {
        padding: 40px 0;
    }

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

    .big-play {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
