:root {
    color-scheme: light;
    --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;
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-500: #ef4444;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --pink-500: #ec4899;
    --pink-600: #db2777;
    --white: #ffffff;
    --shadow-soft: 0 20px 45px rgba(41, 37, 36, 0.10);
    --shadow-card: 0 18px 40px rgba(41, 37, 36, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--stone-800);
    background: linear-gradient(180deg, var(--stone-50), #ffffff 30%, var(--stone-50));
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(214, 211, 209, 0.82);
    backdrop-filter: blur(18px);
}

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand span:last-child {
    font-size: clamp(20px, 2vw, 28px);
    background: linear-gradient(90deg, var(--red-700), var(--pink-600));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red-600), var(--pink-600));
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

.brand-icon svg {
    width: 25px;
    height: 25px;
    fill: white;
}

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

.main-nav a,
.mobile-panel a {
    color: var(--stone-700);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--red-600);
}

.header-search {
    position: relative;
    width: 210px;
}

.header-search input,
.mobile-panel input,
.quick-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--stone-300);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--stone-800);
    background: white;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--red-500);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--stone-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: var(--stone-700);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    border-top: 1px solid var(--stone-200);
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mobile-panel a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
}

.mobile-panel a:hover,
.mobile-panel a.is-active {
    background: var(--red-50);
    color: var(--red-700);
}

.hero {
    position: relative;
    min-height: clamp(560px, 78vh, 780px);
    overflow: hidden;
    background: var(--stone-900);
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 0.9s ease;
}

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

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

.hero-shade {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 52%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1200px) / 2));
    right: 32px;
    bottom: clamp(70px, 14vh, 140px);
    max-width: 760px;
    color: white;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--red-600);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow,
.dark-section .eyebrow,
.light-title span {
    color: #fca5a5;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: -0.07em;
}

.hero-copy {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-row,
.pill-row,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: white;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search button {
    color: white;
    border: 0;
    background: linear-gradient(90deg, var(--red-600), var(--pink-600));
    box-shadow: 0 18px 30px rgba(220, 38, 38, 0.28);
    cursor: pointer;
}

.ghost-button {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search button:hover {
    transform: translateY(-2px) scale(1.01);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

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

.quick-search {
    margin-top: -46px;
    position: relative;
    z-index: 5;
}

.quick-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: 22px;
    padding: 28px;
    border: 1px solid rgba(231, 229, 228, 0.92);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.quick-search h2,
.section-title h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--stone-900);
    letter-spacing: -0.05em;
}

.quick-search h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.quick-search form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-search input {
    min-height: 48px;
}

.pill-row {
    grid-column: 1 / -1;
}

.pill-row a {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--stone-700);
    background: var(--stone-100);
    font-weight: 800;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.pill-row a:hover {
    color: var(--red-700);
    background: var(--red-50);
    transform: translateY(-1px);
}

.section-block {
    padding: 70px 0;
}

.section-title {
    margin-bottom: 28px;
}

.section-title span {
    display: block;
    margin-bottom: 9px;
    color: var(--red-600);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.section-title h2 {
    font-size: clamp(28px, 3.5vw, 42px);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(231, 229, 228, 0.9);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: 0 10px 30px rgba(41, 37, 36, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(239, 68, 68, 0.28);
    box-shadow: var(--shadow-card);
    transform: translateY(-4px);
}

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

.movie-card-wide .poster-link {
    aspect-ratio: 16 / 10;
}

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

.movie-card:hover .poster-link img,
.rank-item:hover img,
.detail-poster:hover img {
    transform: scale(1.05);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    background: rgba(0, 0, 0, 0.62);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

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

.movie-meta {
    margin: 0 0 8px;
    color: var(--red-600);
    font-size: 13px;
    font-weight: 900;
}

.movie-card h3,
.rank-item h3 {
    margin: 0;
    color: var(--stone-900);
    font-size: 19px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-item h3 a:hover,
.category-overview-links a:hover,
.category-card li a:hover,
.text-link:hover {
    color: var(--red-600);
}

.movie-line,
.rank-content p,
.category-card strong,
.category-overview-head strong {
    color: var(--stone-600);
    line-height: 1.7;
}

.movie-line {
    min-height: 54px;
    margin: 10px 0 14px;
    font-size: 14px;
}

.tag-row span {
    color: var(--stone-700);
    background: var(--stone-100);
}

.movie-card-compact .movie-card-body {
    padding: 14px;
}

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

.movie-card-compact .movie-line {
    min-height: 48px;
    font-size: 13px;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 240px 1fr;
}

.tint-section {
    background: linear-gradient(135deg, var(--red-50), #fdf2f8);
}

.dark-section {
    background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

.dark-section .movie-card {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
}

.dark-section .movie-card h3,
.dark-section .movie-line,
.dark-section .movie-meta,
.light-title h2 {
    color: white;
}

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

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

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

.category-card,
.category-overview-card,
.ranking-panel,
.content-panel {
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: 0 10px 30px rgba(41, 37, 36, 0.06);
}

.category-card {
    padding: 20px;
}

.category-card a span,
.category-overview-head span {
    display: block;
    margin-bottom: 8px;
    color: var(--red-600);
    font-weight: 900;
}

.category-card a strong,
.category-overview-head strong {
    display: block;
    font-size: 15px;
}

.category-card ul {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.category-card li + li {
    margin-top: 8px;
}

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

.rank-list,
.rank-page-list,
.wide-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 72px 38px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--stone-200);
    border-radius: 18px;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: var(--stone-100);
}

.rank-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--red-600), var(--pink-600));
    font-weight: 900;
}

.rank-content p {
    margin: 8px 0 0;
    font-size: 14px;
}

.text-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--red-600);
    font-weight: 900;
}

.page-hero,
.detail-hero {
    background: radial-gradient(circle at 78% 18%, rgba(236, 72, 153, 0.18), transparent 34%), linear-gradient(135deg, #fff7f7, #ffffff 42%, var(--stone-100));
}

.small-hero,
.category-hero {
    padding: 70px 0;
}

.page-hero h1 {
    max-width: 780px;
    font-size: clamp(36px, 5vw, 64px);
}

.page-hero p {
    max-width: 760px;
    color: var(--stone-600);
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: 0 10px 28px rgba(41, 37, 36, 0.06);
}

.filter-bar label {
    display: grid;
    gap: 8px;
}

.filter-bar span {
    color: var(--stone-600);
    font-size: 13px;
    font-weight: 900;
}

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

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

.category-overview-card {
    overflow: hidden;
}

.category-overview-head {
    display: block;
    padding: 22px;
    background: linear-gradient(135deg, var(--red-50), white);
}

.category-overview-links {
    display: grid;
    gap: 10px;
    padding: 20px 22px 24px;
}

.category-overview-links a {
    color: var(--stone-700);
    font-weight: 800;
}

.detail-hero {
    padding: 56px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
    gap: clamp(26px, 5vw, 58px);
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--stone-100);
    box-shadow: var(--shadow-card);
}

.detail-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--stone-600);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--red-600);
}

.detail-info h1 {
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
}

.detail-one-line {
    max-width: 780px;
    color: var(--stone-600);
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin: 24px 0 14px;
}

.detail-meta span {
    color: white;
    background: linear-gradient(90deg, var(--red-600), var(--pink-600));
}

.detail-tags span {
    color: var(--stone-700);
    background: white;
    border: 1px solid var(--stone-200);
}

.player-section {
    padding: 44px 0 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    background: black;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: black;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.2));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    padding-left: 7px;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, var(--red-600), var(--pink-600));
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.36);
    font-size: 42px;
}

.detail-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 28px 0;
}

.content-panel {
    padding: 28px;
}

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

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

.content-panel p + p {
    margin-top: 14px;
}

.site-footer {
    color: var(--stone-300);
    background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 34px;
    padding: 52px 0 34px;
}

.footer-brand span:last-child {
    color: white;
    font-size: 22px;
}

.footer-about p,
.site-footer li,
.footer-bottom {
    color: var(--stone-400, #a8a29e);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: white;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 9px;
}

.site-footer a:hover {
    color: #fca5a5;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

    .two-column-section,
    .detail-body {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

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

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

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

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

    .hero {
        min-height: 620px;
    }

    .hero-content {
        left: 22px;
        right: 22px;
        bottom: 74px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-search-inner,
    .detail-grid,
    .footer-inner,
    .movie-card-wide,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 64px 34px 1fr;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .section-inner,
    .footer-inner,
    .footer-bottom,
    .mobile-panel {
        width: min(100% - 22px, 1200px);
    }

    .brand span:last-child {
        font-size: 19px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .hero h1 {
        font-size: 40px;
    }

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

    .quick-search form {
        display: grid;
    }

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

    .movie-card-compact {
        display: grid;
        grid-template-columns: 120px 1fr;
    }

    .movie-card-compact .poster-link {
        height: 100%;
        aspect-ratio: auto;
    }

    .rank-item {
        grid-template-columns: 58px 30px 1fr;
        gap: 10px;
    }

    .rank-content p,
    .movie-card-compact .movie-line {
        display: none;
    }

    .play-circle {
        width: 76px;
        height: 76px;
        font-size: 34px;
    }
}
