: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;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(28, 25, 23, 0.14);
    --radius: 18px;
}

* {
    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), var(--stone-100));
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--stone-900), var(--stone-700), var(--stone-900));
    box-shadow: 0 12px 30px rgba(28, 25, 23, 0.28);
}

.site-header-inner {
    max-width: 1200px;
    height: 72px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
    color: var(--white);
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

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

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--stone-300);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--stone-200);
    font-size: 15px;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 8px 22px rgba(217, 119, 6, 0.26);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 28vw);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    padding: 10px 12px;
    color: var(--white);
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search input::placeholder {
    color: var(--stone-300);
}

.header-search button {
    padding: 10px 16px;
    color: var(--white);
    background: var(--amber-600);
    border: 0;
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 18px;
}

.home-page,
.page-main,
.movie-detail-main {
    min-height: 70vh;
}

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

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(28, 25, 23, 1), rgba(28, 25, 23, 0.55), rgba(28, 25, 23, 0.18));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1200px) / 2 + 20px));
    right: 24px;
    bottom: 72px;
    max-width: 760px;
    color: var(--white);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--stone-200);
    font-size: 19px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--stone-100);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    font-size: 13px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-button,
.secondary-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 24px;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.28);
}

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

.primary-button.small {
    min-height: 40px;
    padding: 0 18px;
    font-size: 14px;
}

.secondary-button {
    min-height: 46px;
    padding: 0 22px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-button:hover {
    color: var(--stone-900);
    background: var(--white);
}

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

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

.hero-dot.is-active {
    background: var(--amber-500);
}

.category-strip,
.section-block,
.page-hero,
.category-overview-list,
.ranking-page-list,
.movie-detail-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 20px 0;
}

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

.section-title-row h2 {
    margin: 0 0 8px;
    color: var(--stone-800);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.15;
}

.section-title-row p,
.page-hero p,
.category-overview-card p,
.detail-one-line,
.player-caption p {
    margin: 0;
    color: var(--stone-600);
    line-height: 1.8;
}

.text-link {
    min-width: max-content;
    color: var(--amber-700);
}

.text-link:hover {
    color: var(--amber-500);
}

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

.category-chip {
    display: block;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(28, 25, 23, 0.18);
}

.category-chip span {
    display: block;
    margin-bottom: 10px;
    color: var(--stone-900);
    font-size: 20px;
    font-weight: 800;
}

.category-chip small {
    color: var(--stone-600);
    line-height: 1.7;
}

.highlight-section,
.ranking-section {
    max-width: none;
    margin-top: 56px;
    padding: 56px max(20px, calc((100vw - 1200px) / 2 + 20px));
    background: linear-gradient(135deg, #fffbeb, #fff7ed, var(--stone-50));
}

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

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

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

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

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

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

.movie-card-link,
.ranking-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-link:hover,
.ranking-card a:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(28, 25, 23, 0.18);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--stone-200);
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.06));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 8px;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.category-badge {
    left: 10px;
    top: 10px;
    background: var(--amber-600);
}

.duration-badge {
    right: 10px;
    top: 10px;
    background: rgba(28, 25, 23, 0.82);
    backdrop-filter: blur(4px);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-card-title {
    color: var(--stone-800);
    font-weight: 800;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-desc {
    color: var(--stone-600);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.page-hero {
    padding-top: 64px;
    padding-bottom: 22px;
}

.simple-hero,
.category-hero {
    margin-top: 34px;
    border-radius: 28px;
    color: var(--white);
    background: radial-gradient(circle at 16% 12%, rgba(245, 158, 11, 0.34), transparent 28%), linear-gradient(135deg, var(--stone-900), var(--stone-700));
    box-shadow: var(--shadow);
}

.simple-hero p,
.category-hero p {
    max-width: 780px;
    color: var(--stone-200);
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.filter-panel input,
.filter-panel select {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    color: var(--stone-800);
    background: var(--white);
    outline: 0;
}

.filter-panel input {
    flex: 1 1 320px;
}

.filter-panel select {
    flex: 0 0 180px;
}

.category-overview-list {
    display: grid;
    gap: 28px;
}

.category-overview-card {
    padding: 26px;
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.empty-result {
    display: none;
    margin-top: 22px;
    padding: 24px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--stone-600);
    background: var(--white);
    box-shadow: var(--shadow);
}

.empty-result.is-visible {
    display: block;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(28, 25, 23, 0.08);
    transition: transform 0.2s ease, color 0.2s ease;
}

.rank-row:hover {
    color: var(--amber-700);
    transform: translateX(4px);
}

.rank-number {
    color: var(--amber-600);
    font-weight: 900;
}

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

.rank-meta {
    color: var(--stone-500);
    font-size: 13px;
}

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

.ranking-card a {
    display: grid;
    grid-template-columns: 76px 160px 1fr 84px;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.ranking-card img {
    height: 90px;
    border-radius: 14px;
    object-fit: cover;
}

.ranking-position {
    color: var(--amber-600);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.ranking-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}

.ranking-info strong {
    color: var(--stone-800);
    font-size: 18px;
}

.ranking-info small,
.ranking-info span {
    color: var(--stone-600);
    line-height: 1.6;
}

.ranking-info span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ranking-card em {
    color: var(--amber-700);
    font-style: normal;
    font-weight: 900;
    text-align: right;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    color: var(--stone-600);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 34px;
    margin-top: 22px;
    padding: 30px;
    border-radius: 30px;
    color: var(--white);
    background: radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.34), transparent 32%), linear-gradient(135deg, var(--stone-900), var(--stone-700));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

.detail-info {
    align-self: center;
}

.detail-one-line {
    margin-top: 18px;
    color: var(--stone-200);
    font-size: 18px;
}

.detail-info .primary-button {
    margin-top: 28px;
}

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

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

.movie-player,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    z-index: 1;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    z-index: 2;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000000;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.72;
}

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    width: 88px;
    height: 88px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    font-size: 32px;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 50px rgba(217, 119, 6, 0.42);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.player-caption {
    margin-top: 18px;
}

.player-caption h2 {
    margin: 0 0 8px;
    color: var(--stone-800);
    font-size: 26px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.detail-content-card {
    padding: 26px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow);
}

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

.detail-content-card p {
    margin: 0;
    color: var(--stone-600);
    font-size: 16px;
    line-height: 1.9;
}

.related-section {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    margin-top: 76px;
    color: var(--stone-300);
    background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px;
}

.footer-brand p {
    max-width: 520px;
    color: var(--stone-300);
    line-height: 1.8;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 18px;
}

.footer-links a,
.footer-link-grid a {
    color: var(--stone-300);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-link-grid a:hover {
    color: var(--amber-400);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--stone-500);
    font-size: 13px;
}

@media (max-width: 1080px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

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

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

    .mobile-nav .nav-link {
        display: block;
    }

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

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

@media (max-width: 820px) {
    .hero-carousel {
        height: 66vh;
        min-height: 500px;
    }

    .section-title-row,
    .category-overview-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-chip-grid,
    .movie-grid,
    .large-grid,
    .compact-grid,
    .catalog-grid,
    .detail-content-grid,
    .rank-list,
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

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

    .ranking-card a {
        grid-template-columns: 52px 120px 1fr;
    }

    .ranking-card em {
        grid-column: 3;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .site-header-inner {
        height: 64px;
        padding: 0 14px;
    }

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

    .brand-subtitle {
        font-size: 11px;
    }

    .hero-content {
        left: 18px;
        bottom: 62px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-actions,
    .filter-panel {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button,
    .filter-panel input,
    .filter-panel select {
        width: 100%;
    }

    .category-chip-grid,
    .movie-grid,
    .large-grid,
    .compact-grid,
    .catalog-grid,
    .mini-grid,
    .detail-content-grid,
    .rank-list,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-card a {
        grid-template-columns: 48px 96px 1fr;
        gap: 12px;
    }

    .ranking-card img {
        height: 72px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
