:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --earth-50: #fdf7ed;
    --earth-100: #faead1;
    --earth-300: #f3c16d;
    --earth-500: #d98c22;
    --earth-600: #c26c13;
    --earth-700: #9f5012;
    --canyon-500: #d75b36;
    --canyon-700: #a53b24;
    --moss-500: #6b8e3d;
    --moss-700: #486328;
    --shadow-soft: 0 18px 50px rgba(28, 25, 23, 0.14);
    --shadow-card: 0 16px 36px rgba(28, 25, 23, 0.12);
    --radius-xl: 22px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--stone-50);
    color: var(--stone-800);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 249, 0.94);
    border-bottom: 1px solid var(--stone-200);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--stone-900);
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--earth-600), var(--canyon-500));
    box-shadow: 0 10px 24px rgba(194, 108, 19, 0.28);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--stone-700);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--stone-100);
    color: var(--earth-700);
    transform: translateY(-1px);
}

.nav-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-search input,
.mobile-search input,
.listing-tools input,
.listing-tools select,
.search-hero input {
    border: 1px solid var(--stone-300);
    background: #fff;
    color: var(--stone-900);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 210px;
    padding: 10px 12px;
}

.nav-search button,
.mobile-search button,
.search-hero button {
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--earth-600);
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.listing-tools input:focus,
.listing-tools select:focus,
.search-hero input:focus {
    border-color: var(--earth-500);
    box-shadow: 0 0 0 4px rgba(217, 140, 34, 0.16);
}

.nav-search button:hover,
.mobile-search button:hover,
.search-hero button:hover {
    background: var(--earth-700);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--stone-100);
    cursor: pointer;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    background: var(--stone-700);
    margin: 5px 0;
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--stone-200);
    padding: 12px 16px 18px;
    background: rgba(250, 250, 249, 0.98);
}

.mobile-link {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--stone-700);
}

.mobile-link:hover,
.mobile-link.is-active {
    background: var(--stone-100);
    color: var(--earth-700);
}

.mobile-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 10px 0;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(135deg, #2f2419 0%, #292524 45%, #5b2c1f 100%);
    color: #fff;
}

.hero-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(243, 193, 109, 0.28), transparent 36%),
        radial-gradient(circle at 82% 16%, rgba(215, 91, 54, 0.22), transparent 34%),
        linear-gradient(to top, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.24));
    pointer-events: none;
}

.hero-track {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.26;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.1);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 54px;
    padding: 86px 0 80px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--earth-300);
    font-weight: 800;
    margin-bottom: 22px;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy h1 {
    font-size: clamp(42px, 6vw, 72px);
    max-width: 820px;
}

.hero-copy h1 span {
    color: var(--earth-300);
}

.hero-copy p {
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
    max-width: 760px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: 900;
    background: var(--earth-600);
    color: #fff;
    box-shadow: 0 14px 32px rgba(194, 108, 19, 0.28);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--earth-700);
    box-shadow: 0 18px 38px rgba(194, 108, 19, 0.34);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: none;
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-panel {
    padding: 18px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 4 / 5;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-panel:hover .hero-poster img {
    transform: scale(1.04);
}

.hero-info {
    padding: 18px 4px 2px;
}

.hero-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.hero-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 14px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

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

.hero-dot {
    width: 36px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--earth-300);
}

.main-section,
.page-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0 0;
}

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

.section-kicker {
    margin: 0 0 6px;
    color: var(--earth-700);
    font-weight: 900;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
    color: var(--stone-900);
    font-weight: 900;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-intro,
.detail-title p {
    color: var(--stone-600);
    margin: 8px 0 0;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 22px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #fff, var(--earth-50));
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(28, 25, 23, 0.16);
}

.category-card:after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -28px;
    bottom: -28px;
    border-radius: 999px;
    background: rgba(217, 140, 34, 0.12);
}

.category-card h3 {
    margin: 0 0 10px;
    color: var(--stone-900);
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--stone-600);
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #fff;
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(217, 140, 34, 0.35);
    box-shadow: 0 24px 54px rgba(28, 25, 23, 0.17);
}

.poster {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--stone-100), var(--earth-100));
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

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

.poster-year,
.rank-badge {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(8px);
}

.poster-year {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--earth-600), var(--canyon-500));
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover {
    color: var(--earth-700);
}

.card-body p {
    min-height: 46px;
    margin: 0 0 12px;
    color: var(--stone-600);
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--stone-500);
    font-size: 13px;
    margin-bottom: 12px;
}

.tag-row span,
.detail-tags span {
    background: var(--stone-100);
    color: var(--stone-600);
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    border-radius: var(--radius-xl);
    background: var(--stone-900);
    color: #fff;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.rank-panel h2,
.rank-panel h3 {
    margin: 0 0 18px;
    font-size: 24px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-row:last-child {
    border-bottom: 0;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 900;
}

.rank-row:nth-child(-n+3) .rank-number {
    background: linear-gradient(135deg, var(--earth-600), var(--canyon-500));
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
}

.rank-meta {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.page-hero {
    background: linear-gradient(135deg, var(--earth-50), #fff 52%, var(--stone-100));
    border-bottom: 1px solid var(--stone-200);
}

.page-hero-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 54px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--stone-500);
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--earth-700);
}

.listing-tools {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
    gap: 12px;
    margin: 0 0 24px;
}

.listing-tools input,
.listing-tools select {
    width: 100%;
    padding: 12px 14px;
}

.empty-state {
    padding: 28px;
    border: 1px dashed var(--stone-300);
    border-radius: var(--radius-lg);
    color: var(--stone-600);
    background: #fff;
    margin-bottom: 24px;
}

.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 0;
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow-soft);
    background: var(--stone-100);
}

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

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-title p {
    font-size: 18px;
    max-width: 760px;
}

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

.meta-box {
    border: 1px solid var(--stone-200);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.meta-box span {
    display: block;
    color: var(--stone-500);
    font-size: 13px;
    margin-bottom: 3px;
}

.meta-box strong {
    color: var(--stone-900);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow-soft);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.player-start span {
    margin-left: 6px;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #fff;
}

.content-card {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--stone-900);
    font-size: 26px;
}

.content-card p {
    color: var(--stone-700);
    margin: 0 0 16px;
}

.content-card p:last-child {
    margin-bottom: 0;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 64px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--stone-200);
    box-shadow: 0 10px 24px rgba(28, 25, 23, 0.08);
}

.ranking-card .poster-mini {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 3 / 4;
    background: var(--stone-100);
}

.ranking-card .poster-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-card h3 {
    margin: 0 0 6px;
    color: var(--stone-900);
}

.ranking-card p {
    margin: 0;
    color: var(--stone-600);
}

.rank-index {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--stone-800);
    font-weight: 900;
}

.search-hero {
    display: flex;
    gap: 10px;
    max-width: 760px;
    margin-top: 26px;
}

.search-hero input {
    flex: 1;
    padding: 14px 16px;
}

.site-footer {
    margin-top: 80px;
    color: rgba(255, 255, 255, 0.74);
    background: var(--stone-900);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
}

.footer-brand {
    display: inline-block;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    margin-bottom: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.footer-links a:hover {
    color: var(--earth-300);
}

.footer-inner p {
    margin: 0;
}

.screen-reader {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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

    .hero-panel {
        max-width: 420px;
    }

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

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

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

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

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

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

    .hero-slider,
    .hero-track,
    .hero-inner {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-inner {
        padding: 68px 0 86px;
        gap: 30px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .section-head {
        display: block;
    }

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

    .listing-tools {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        grid-template-columns: 44px 72px minmax(0, 1fr);
    }

    .ranking-card .btn {
        grid-column: 1 / -1;
    }

    .detail-cover {
        max-width: 300px;
    }

    .search-hero {
        display: block;
    }

    .search-hero button {
        margin-top: 10px;
        width: 100%;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .main-section,
    .page-section,
    .page-hero-inner,
    .detail-wrap,
    .footer-inner,
    .hero-inner {
        width: min(100% - 24px, 1200px);
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .brand-text {
        max-width: 190px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

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

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

    .content-card {
        padding: 22px;
    }
}
