:root {
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --panel: #ffffff;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #f97316;
    --red: #ef4444;
    --slate: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #fff7ed 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange), var(--red));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-dark);
    background: #fff7ed;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--amber-dark);
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 16px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    color: #92400e;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #0f172a;
}

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

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 1s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(15, 23, 42, 0.22) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    min-height: 680px;
    margin: 0 auto;
    padding: 130px 24px 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    max-width: 760px;
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

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

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.3);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(245, 158, 11, 0.4);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.28);
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: 0.25s ease;
}

.hero-dot.active {
    width: 58px;
    background: #ffffff;
}

.search-panel {
    max-width: 1120px;
    margin: -42px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 8;
}

.search-panel.inner-panel {
    margin: 28px auto 0;
}

.search-inner {
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.search-inner label {
    display: block;
    margin-bottom: 10px;
    color: #92400e;
    font-weight: 900;
}

.search-box {
    display: flex;
    gap: 12px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    height: 52px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 18px;
    outline: none;
    transition: 0.2s ease;
}

.search-box input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.search-box button {
    border: 0;
    border-radius: 16px;
    padding: 0 18px;
    color: #92400e;
    background: #ffedd5;
    font-weight: 900;
}

.section-block,
.page-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.page-main {
    padding-top: 38px;
}

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

.section-heading.compact {
    align-items: start;
    flex-direction: column;
    gap: 8px;
}

.section-heading span {
    color: var(--amber-dark);
    font-weight: 950;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--amber-dark);
    font-weight: 900;
}

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

.category-tile,
.category-overview-card a {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 16px 38px rgba(245, 158, 11, 0.18);
    transition: 0.25s ease;
}

.category-tile:nth-child(2n),
.category-overview-card:nth-child(2n) a {
    background: linear-gradient(135deg, #111827, #334155);
}

.category-tile:nth-child(3n),
.category-overview-card:nth-child(3n) a {
    background: linear-gradient(135deg, #7c2d12, #ea580c);
}

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

.category-tile span,
.category-overview-card strong {
    font-size: 22px;
    font-weight: 950;
}

.category-tile em,
.category-overview-card span {
    color: rgba(255, 255, 255, 0.86);
    font-style: normal;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.05));
    opacity: 0;
    transition: 0.25s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: 0.25s ease;
}

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

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.movie-card h3 a:hover {
    color: var(--amber-dark);
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.chip-row span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
}

.movie-card-wide .poster-link {
    aspect-ratio: 3 / 4;
}

.rank-panel,
.rank-list-large,
.detail-text,
.player-box,
.light-hero,
.category-hero,
.rank-hero {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-panel {
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 96px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    transition: 0.2s ease;
}

.compact-card:hover {
    background: #fff7ed;
}

.compact-card img {
    width: 56px;
    height: 74px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 950;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

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

.page-hero {
    margin-top: 24px;
    padding: 54px;
    overflow: hidden;
}

.light-hero,
.category-hero,
.rank-hero {
    background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.page-hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.category-preview {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.rank-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

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

.detail-main {
    max-width: 1180px;
}

.detail-hero {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    background: linear-gradient(135deg, #111827, #334155);
    color: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.lead-text {
    max-width: 760px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

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

.detail-meta-grid div {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
}

.detail-meta-grid dt {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.detail-meta-grid dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.large-chips {
    margin-bottom: 24px;
}

.player-section {
    padding-top: 34px;
}

.player-box {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    transition: 0.25s ease;
}

.player-start span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    font-size: 34px;
}

.player-start:hover {
    background: rgba(0, 0, 0, 0.34);
}

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

.detail-text {
    padding: 36px;
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.detail-text p {
    margin: 0 0 28px;
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 86px;
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(135deg, #111827, #0f172a);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 36px;
}

.footer-brand {
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 24px;
}

.footer-inner p {
    max-width: 520px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.no-results {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

@media (max-width: 1024px) {
    .category-grid,
    .category-overview-grid,
    .movie-grid,
    .movie-grid.small-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .split-section,
    .rank-page-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

    .detail-hero {
        grid-template-columns: 260px minmax(0, 1fr);
    }

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

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

    .menu-button {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 600px;
    }

    .hero-content {
        padding-top: 96px;
    }

    .search-box,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

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

    .movie-card-wide {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .card-body {
        padding: 14px;
    }

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

    .movie-card p {
        -webkit-line-clamp: 2;
        font-size: 14px;
    }

    .page-hero,
    .detail-text {
        padding: 28px;
    }

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 16px;
    }

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

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

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

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

    .compact-card {
        grid-template-columns: auto 52px minmax(0, 1fr);
    }

    .section-block,
    .page-main,
    .category-preview {
        padding-left: 16px;
        padding-right: 16px;
    }
}
