:root {
    --warm-50: #fdf8f6;
    --warm-100: #f7ebe6;
    --warm-200: #eed8cf;
    --warm-300: #d8b4a6;
    --warm-600: #8a5f50;
    --warm-700: #6f4a3f;
    --warm-800: #533830;
    --warm-900: #35231f;
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-600: #0284c7;
    --sky-700: #0369a1;
    --sky-800: #075985;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --white: #ffffff;
    --shadow: 0 14px 40px rgba(53, 35, 31, 0.12);
    --soft-shadow: 0 8px 24px rgba(53, 35, 31, 0.10);
}

body {
    margin: 0;
    background: var(--warm-50);
    color: var(--warm-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

.container {
    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);
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 24px rgba(53, 35, 31, 0.08);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--warm-900);
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sky-600), var(--sky-800));
    color: white;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    color: var(--warm-700);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--sky-600);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--warm-100);
    color: var(--warm-900);
    font-size: 24px;
}

.mobile-nav {
    display: none;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--warm-100);
    background: white;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.hero-carousel {
    position: relative;
    height: min(720px, 72vh);
    min-height: 540px;
    overflow: hidden;
    background: var(--warm-900);
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(53, 35, 31, 0.96) 0%, rgba(53, 35, 31, 0.74) 48%, rgba(53, 35, 31, 0.18) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
    color: white;
}

.hero-badge,
.card-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--amber-500);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 12px;
}

.hero-content h1,
.hero-content h2 {
    max-width: 780px;
    margin: 18px 0 12px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hero-movie-title {
    margin-top: 0 !important;
    font-size: clamp(24px, 3vw, 36px) !important;
    color: var(--sky-100);
}

.hero-content p {
    max-width: 680px;
    color: #f8eee9;
    font-size: 18px;
    line-height: 1.85;
}

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

.hero-meta {
    margin: 22px 0 30px;
}

.hero-meta span,
.detail-meta span,
.wide-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
    color: inherit;
    padding: 7px 12px;
    font-size: 13px;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 22px;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    background: var(--sky-600);
    color: white;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.26);
}

.primary-button:hover {
    background: var(--sky-700);
    transform: translateY(-2px);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.ghost-button.light {
    color: white;
}

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

.hero-dots button {
    width: 52px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.34);
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dots button.is-active {
    width: 68px;
    background: var(--sky-600);
}

.search-panel {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: 30px;
    align-items: center;
    margin-top: -56px;
    padding: 28px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
}

.search-panel h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 820;
}

.search-panel p {
    margin: 0;
    color: var(--warm-700);
    line-height: 1.7;
}

.filter-bar {
    display: flex;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--warm-200);
    border-radius: 14px;
    background: var(--warm-50);
    padding: 0 15px;
    color: var(--warm-900);
    outline: none;
}

.filter-bar select {
    max-width: 150px;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--sky-600);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

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

.section-heading,
.overview-head,
.compact-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.section-heading span {
    display: block;
    margin-bottom: 6px;
    color: var(--sky-600);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-heading h2,
.compact-heading h3,
.overview-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 850;
}

.section-heading p,
.compact-heading p,
.overview-head p {
    color: var(--warm-600);
    margin: 8px 0 0;
    line-height: 1.7;
}

.section-heading a,
.compact-heading a,
.overview-head a {
    color: var(--sky-600);
    font-weight: 750;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: white;
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.72));
    transition: opacity 0.25s ease;
}

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

.card-category {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    font-size: 12px;
    padding: 5px 10px;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sky-600);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

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

.movie-card-body h3 {
    margin: 0 0 8px;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 800;
}

.movie-card-body h3 a:hover,
.wide-title:hover {
    color: var(--sky-600);
}

.movie-card-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--warm-600);
    font-size: 13px;
    line-height: 1.7;
}

.movie-card-meta {
    justify-content: space-between;
    color: var(--warm-600);
    font-size: 13px;
}

.gradient-section {
    background: linear-gradient(135deg, var(--sky-50), var(--warm-50));
}

.warm-section {
    background: var(--warm-100);
}

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

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

.category-tile,
.overview-card,
.content-card,
.side-panel {
    border-radius: 22px;
    background: white;
    box-shadow: var(--soft-shadow);
}

.category-tile {
    min-height: 158px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
    background: linear-gradient(135deg, white, var(--sky-50));
    transform: translateY(-4px);
}

.category-tile span {
    font-size: 22px;
    font-weight: 850;
}

.category-tile p {
    margin: 18px 0 0;
    color: var(--warm-600);
    line-height: 1.7;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 0;
}

.wide-poster {
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--warm-100);
}

.wide-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wide-content {
    padding: 24px;
}

.wide-title {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 850;
}

.wide-content p {
    margin: 0 0 18px;
    color: var(--warm-600);
    line-height: 1.8;
}

.wide-tags span,
.detail-meta span,
.tag-row span {
    background: var(--warm-100);
    color: var(--warm-700);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 54px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    border-radius: 16px;
    padding: 10px;
    background: white;
    box-shadow: 0 6px 18px rgba(53, 35, 31, 0.08);
    transition: transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--sky-600);
    color: white;
    font-weight: 850;
}

.rank-item img {
    width: 54px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--warm-100);
}

.rank-title {
    font-weight: 800;
    line-height: 1.35;
}

.rank-meta {
    grid-column: 3;
    color: var(--warm-600);
    font-size: 12px;
}

.stacked-previews,
.overview-list {
    display: grid;
    gap: 34px;
}

.category-preview,
.overview-card {
    padding: 28px;
}

.page-hero,
.detail-hero {
    background: linear-gradient(135deg, var(--sky-600), var(--sky-800));
    color: white;
    padding: 58px 0;
}

.page-hero h1,
.detail-info h1 {
    max-width: 860px;
    margin: 12px 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    font-weight: 880;
    letter-spacing: -0.03em;
}

.page-hero p {
    max-width: 820px;
    color: var(--sky-100);
    font-size: 18px;
    line-height: 1.8;
}

.page-filter {
    max-width: 680px;
    margin-top: 24px;
}

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

.breadcrumb a:hover {
    color: white;
}

.detail-grid {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 34px;
    align-items: center;
    margin-top: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
    aspect-ratio: 3 / 4;
    background: var(--warm-100);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 20px;
    color: var(--sky-100);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta {
    margin: 0 0 18px;
}

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

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

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
}

.player-overlay.is-hidden {
    display: none;
}

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.12), rgba(0, 0, 0, 0.55));
}

.player-start {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--sky-600);
    font-size: 34px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.content-card {
    margin-top: 28px;
    padding: 30px;
}

.content-card h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 850;
}

.content-card p {
    margin: 0 0 28px;
    color: var(--warm-700);
    line-height: 2;
    font-size: 16px;
}

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

.side-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.side-panel .rank-item {
    grid-template-columns: 38px 48px 1fr;
    box-shadow: none;
    border: 1px solid var(--warm-100);
}

.empty-state {
    margin: 36px 0 0;
    padding: 26px;
    border-radius: 16px;
    background: white;
    color: var(--warm-600);
    text-align: center;
}

.site-footer {
    background: var(--warm-900);
    color: var(--warm-100);
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.6fr;
    gap: 34px;
    padding: 52px 0 34px;
}

.footer-logo {
    color: white;
    margin-bottom: 18px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--amber-400);
    font-size: 17px;
    font-weight: 820;
}

.site-footer p,
.site-footer a {
    display: block;
    margin: 0 0 10px;
    color: var(--warm-300);
    line-height: 1.8;
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--amber-400);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0;
    color: var(--warm-300);
    text-align: center;
    font-size: 14px;
}

.movie-card.is-hidden,
.wide-card.is-hidden {
    display: none;
}

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

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

    .search-panel,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-carousel {
        min-height: 620px;
        height: 78vh;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(53, 35, 31, 0.74), rgba(53, 35, 31, 0.96));
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 86px;
    }

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

    .search-panel {
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar select {
        max-width: none;
    }

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

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

    .wide-poster {
        aspect-ratio: 16 / 9;
    }

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

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

    .detail-poster {
        max-width: 250px;
    }

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

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

    .header-inner {
        height: 62px;
    }

    .site-logo {
        font-size: 20px;
    }

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

    .hero-dots button {
        width: 34px;
    }

    .section-heading,
    .overview-head,
    .compact-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-section {
        padding: 48px 0;
    }

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

    .movie-card-body h3 {
        min-height: 44px;
        font-size: 15px;
    }

    .movie-card-body p {
        display: none;
    }

    .detail-hero,
    .page-hero {
        padding: 42px 0;
    }

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

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