:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-900: #1c1917;
    --bluestone-50: #f8fafc;
    --bluestone-100: #f1f5f9;
    --bluestone-200: #e2e8f0;
    --bluestone-600: #475569;
    --bluestone-700: #334155;
    --bluestone-800: #1e293b;
    --bluestone-900: #0f172a;
    --accent-50: #fef3c7;
    --accent-100: #fde68a;
    --accent-400: #f59e0b;
    --accent-500: #d97706;
    --accent-600: #b45309;
    --accent-700: #92400e;
    --earth-50: #fdf8f6;
    --white: #ffffff;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.5;
    color: var(--stone-700);
    background: var(--stone-50);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.8);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.nav-wrap {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--bluestone-700), var(--accent-500));
    box-shadow: var(--shadow-card);
    font-size: 13px;
}

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

.nav-links {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.nav-links a {
    color: var(--bluestone-700);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-grid a:hover {
    color: var(--accent-600);
}

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

.nav-search input,
.mobile-search input,
.hero-search input,
.filter-bar input {
    border: 1px solid var(--stone-200);
    background: var(--stone-100);
    color: var(--bluestone-900);
    outline: none;
    border-radius: 999px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-bar input:focus {
    border-color: var(--accent-500);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.nav-search button,
.mobile-search button,
.hero-search button {
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: var(--accent-500);
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--bluestone-700);
    font-size: 24px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--stone-200);
    background: var(--white);
    padding: 16px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-panel a {
    padding: 8px 0;
    color: var(--bluestone-700);
    font-weight: 650;
}

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 500px;
    height: 70vh;
    overflow: hidden;
    background: var(--bluestone-900);
}

.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-media,
.hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media {
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 40%), linear-gradient(135deg, var(--bluestone-900), var(--bluestone-700));
}

.hero-media::after,
.card-poster::after,
.detail-poster::after {
    content: attr(data-title);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
    font-size: clamp(18px, 3vw, 40px);
    text-align: center;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--bluestone-900), var(--bluestone-700));
    z-index: 0;
}

.hero-media img,
.card-poster img,
.detail-poster img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), transparent);
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-400);
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 16px;
    color: var(--white);
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0 0 24px;
    color: var(--stone-200);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 12px;
    color: var(--stone-200);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: var(--white);
    background: var(--accent-500);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover {
    background: var(--accent-600);
}

.btn-ghost {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-ghost.dark {
    color: var(--bluestone-900);
    background: var(--white);
    border-color: var(--stone-200);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.32);
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 30px;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    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.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: var(--accent-400);
}

.page-stack {
    padding: 64px 0;
    display: grid;
    gap: 80px;
}

.content-section {
    margin: 64px auto;
}

.page-stack .content-section {
    margin: 0;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title span {
    color: var(--accent-500);
    font-weight: 900;
    font-size: 24px;
}

.section-title h2 {
    margin: 0;
    color: var(--bluestone-900);
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -0.03em;
}

.section-more {
    color: var(--accent-600);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-poster {
    position: relative;
    height: 224px;
    overflow: hidden;
    background: var(--stone-200);
}

.movie-card-large .card-poster {
    height: 288px;
}

.movie-card-small .card-poster {
    height: 180px;
}

.card-poster img {
    transition: transform 0.45s ease;
}

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

.card-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 60%);
    transition: opacity 0.25s ease;
}

.card-link:hover .card-poster::before {
    opacity: 1;
}

.card-score,
.card-duration,
.card-play {
    position: absolute;
    z-index: 3;
    color: var(--white);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.70);
    backdrop-filter: blur(8px);
}

.card-score {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    color: var(--accent-400);
    font-size: 12px;
    font-weight: 800;
}

.card-duration {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    font-size: 12px;
}

.card-play {
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    background: rgba(217, 119, 6, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.card-body h3 {
    margin: 0 0 8px;
    color: var(--bluestone-900);
    font-size: 17px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link:hover h3 {
    color: var(--accent-600);
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--stone-600);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--stone-500);
    font-size: 12px;
}

.card-meta span {
    border-radius: 8px;
    background: var(--stone-100);
    padding: 3px 7px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tags span,
.detail-tags a {
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--accent-700);
    background: var(--accent-50);
    font-size: 12px;
    font-weight: 700;
}

.highlight-section {
    border-radius: 24px;
    padding: 36px;
    background: linear-gradient(135deg, var(--accent-50), var(--earth-50));
}

.year-section {
    border-radius: 24px;
    padding: 36px;
    background: var(--bluestone-50);
}

.year-stack {
    display: grid;
    gap: 32px;
}

.year-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.year-head h3 {
    margin: 0;
    color: var(--bluestone-800);
    font-size: 22px;
}

.year-head a {
    color: var(--bluestone-600);
    font-weight: 800;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 24px;
}

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

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

.category-tile,
.category-overview-card {
    display: grid;
    gap: 16px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card {
    padding: 20px;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.category-thumbs,
.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    min-height: 130px;
}

.overview-thumbs {
    grid-template-columns: repeat(3, 1fr);
}

.category-thumbs img,
.overview-thumbs img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bluestone-800), var(--accent-500));
}

.category-tile h3,
.category-overview-card h2 {
    margin: 0 0 8px;
    color: var(--bluestone-900);
}

.category-tile p,
.category-overview-card p {
    margin: 0;
    color: var(--stone-600);
    line-height: 1.7;
}

.category-overview-card span {
    color: var(--accent-600);
    font-weight: 800;
}

.rank-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 36px;
}

.rank-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.rank-row a {
    display: grid;
    grid-template-columns: 54px minmax(150px, 1fr) minmax(190px, 0.8fr) 80px;
    align-items: center;
    gap: 12px;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    padding: 14px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.rank-no {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--white);
    background: var(--bluestone-900);
    font-weight: 900;
}

.rank-title {
    color: var(--bluestone-900);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info {
    color: var(--stone-500);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-hot {
    color: var(--accent-600);
    font-weight: 900;
    text-align: right;
}

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 36%), linear-gradient(135deg, var(--bluestone-700), var(--bluestone-900));
    padding: 72px 0;
}

.small-hero,
.category-hero,
.rank-hero,
.search-hero {
    min-height: 300px;
    display: flex;
    align-items: center;
}

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

.page-hero p {
    max-width: 760px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--accent-400);
}

.category-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.category-switch a {
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    font-size: 13px;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    padding: 16px;
    margin-bottom: 28px;
}

.filter-bar label {
    width: 100%;
    display: grid;
    gap: 8px;
    color: var(--bluestone-900);
    font-weight: 800;
}

.filter-bar input {
    width: min(520px, 100%);
    border-radius: 12px;
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 420px) auto;
    gap: 12px;
    max-width: 560px;
}

.hero-search input {
    width: 100%;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
}

.detail-hero {
    padding: 56px 0;
    color: var(--white);
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.25), transparent 32%), linear-gradient(135deg, var(--bluestone-800), var(--bluestone-900));
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-poster {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--bluestone-800);
    box-shadow: var(--shadow-xl);
}

.detail-copy h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 64px);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #050505;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(217, 119, 6, 0.94);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-size: 32px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

.player-shell.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 36px;
}

.article-panel {
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    padding: 28px;
}

.article-panel h2 {
    margin: 0 0 14px;
    color: var(--bluestone-900);
}

.article-panel p {
    margin: 0;
    color: var(--stone-700);
    line-height: 1.9;
}

.site-footer {
    margin-top: 80px;
    color: var(--stone-200);
    background: var(--bluestone-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 16px;
}

.footer-grid p {
    color: var(--stone-300);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.footer-grid a {
    color: var(--stone-300);
}

.footer-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.12);
    padding: 18px 0;
    color: var(--stone-300);
    font-size: 14px;
}

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

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

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

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

    .rank-split,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

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

    .hero {
        height: 72vh;
        min-height: 560px;
    }

    .hero-shade {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44));
    }

    .hero-arrow {
        display: none;
    }

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

    .highlight-section,
    .year-section {
        padding: 24px;
    }

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

    .detail-poster {
        min-height: 360px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rank-row a {
        grid-template-columns: 44px minmax(0, 1fr) 70px;
    }

    .rank-info {
        display: none;
    }
}

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

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

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

    .hero-copy p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-actions,
    .detail-actions {
        display: grid;
    }

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

    .card-poster,
    .movie-card-large .card-poster,
    .movie-card-small .card-poster {
        height: 260px;
    }

    .category-thumbs,
    .overview-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .player-start {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
