:root {
    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-soft: #fff7ed;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --soft: #f9fafb;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #fff7ed 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.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.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.nav-bar {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), #f59e0b);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.32);
    font-size: 14px;
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #4b5563;
    font-weight: 700;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--amber);
    background: var(--amber-soft);
}

.header-search {
    margin-left: auto;
    display: flex;
    min-width: 280px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.header-search input,
.big-search input,
.filters input,
.filters select {
    border: 0;
    outline: 0;
    color: var(--ink);
    background: #ffffff;
}

.header-search input {
    flex: 1;
    min-width: 0;
    padding: 0 14px;
}

.header-search button,
.big-search button {
    border: 0;
    color: #ffffff;
    background: var(--amber);
    padding: 0 18px;
    cursor: pointer;
    font-weight: 800;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: var(--amber-soft);
    color: var(--amber-dark);
    border-radius: 12px;
    padding: 9px 12px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 16px;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

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

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1f2937, #92400e);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.08) 100%);
}

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

.hero-text {
    width: min(680px, 100%);
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.hero-text h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.08;
    font-weight: 900;
}

.hero-text p,
.page-hero p,
.detail-copy .lead {
    margin: 0 0 26px;
    font-size: 20px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 900;
    transition: 0.2s ease;
}

.btn.primary {
    color: #ffffff;
    background: var(--amber);
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.35);
}

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

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.btn.ghost.light {
    color: var(--amber-dark);
    background: #fff7ed;
    border-color: #fed7aa;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(8px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

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

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

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

.hero-dots button.active {
    width: 36px;
    background: #f59e0b;
}

.search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: 34px;
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-hero h2,
.section-head h2,
.content-card h2,
.rank-side h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    color: var(--ink);
}

.search-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.big-search {
    display: flex;
    height: 56px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
}

.big-search input {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
}

.home-sections {
    display: grid;
    gap: 58px;
    padding: 58px 0 72px;
}

.section-block {
    border-radius: 30px;
}

.section-block.warm,
.section-block.gray,
.section-block.editor,
.search-panel {
    padding: 34px;
}

.section-block.warm {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.section-block.gray {
    background: #f3f4f6;
}

.section-block.editor {
    background: linear-gradient(110deg, #f3e8ff, #fce7f3, #fef3c7);
}

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

.section-head a,
.section-head span {
    color: var(--amber-dark);
    font-weight: 800;
}

.sub-title {
    margin: 28px 0 16px;
    font-size: 22px;
    color: #374151;
}

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

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #92400e);
}

.movie-card.large .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.movie-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.movie-title {
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
}

.movie-meta,
.movie-desc,
.compact-card em,
.rank-info em,
.rank-info small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.movie-desc {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

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

.category-grid.wide {
    padding: 48px 0;
}

.category-tile {
    display: grid;
    gap: 10px;
    min-height: 150px;
    padding: 24px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.category-tile:hover {
    color: var(--amber-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-tile span {
    font-size: 23px;
    font-weight: 900;
}

.category-tile small {
    color: var(--muted);
    line-height: 1.7;
}

.scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 250px;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 16px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.compact-card img {
    width: 86px;
    height: 112px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #1f2937, #92400e);
}

.compact-card span,
.rank-info {
    display: grid;
    gap: 8px;
}

.compact-card strong,
.rank-info strong {
    color: var(--ink);
    font-size: 17px;
}

.page-hero.simple {
    padding: 86px 0 72px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.72), transparent 28%), linear-gradient(135deg, #111827, #78350f 55%, #1f2937);
}

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

.filters {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.filters input,
.filters select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.search-panel {
    margin: 48px auto 72px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-filters {
    grid-template-columns: 1fr 180px 150px 160px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding: 54px 0 78px;
}

.rank-main {
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 82px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.rank-num {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 14px;
    background: var(--amber);
    font-weight: 900;
}

.rank-row img {
    width: 82px;
    height: 108px;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #1f2937, #92400e);
}

.rank-side {
    position: sticky;
    top: 92px;
    align-self: start;
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-side .category-tile {
    min-height: auto;
    padding: 16px;
    box-shadow: none;
    border: 1px solid var(--line);
}

.rank-side .category-tile span {
    font-size: 18px;
}

.rank-side .category-tile small {
    display: none;
}

.detail-hero {
    padding: 50px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.58), transparent 30%), linear-gradient(135deg, #111827, #451a03);
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 40px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
    background: linear-gradient(135deg, #1f2937, #92400e);
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.crumb a:hover {
    color: #fbbf24;
}

.detail-copy .lead {
    color: rgba(255, 255, 255, 0.86);
}

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

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

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

.player-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.46));
    cursor: pointer;
}

.player-mask.hidden {
    opacity: 0;
    pointer-events: none;
}

.player-start {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber);
    box-shadow: 0 20px 45px rgba(217, 119, 6, 0.45);
    font-size: 30px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 34px 0 24px;
}

.content-card {
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 22px;
    color: #4b5563;
    line-height: 1.9;
}

.info-card dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    margin: 0;
}

.info-card dt {
    color: var(--muted);
}

.info-card dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 34px;
    padding: 42px 0;
}

.footer-grid p {
    color: #9ca3af;
    line-height: 1.8;
}

.footer-grid h3 {
    color: #ffffff;
    margin: 0 0 14px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

.footer-grid a:hover {
    color: #fbbf24;
}

.footer-logo {
    color: #ffffff;
}

.footer-bottom {
    padding: 18px 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

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

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

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

    .rank-side {
        position: static;
    }
}

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

    .mobile-toggle {
        display: inline-flex;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.88));
    }

    .hero-arrow {
        display: none;
    }

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

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

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

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

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

    .nav-bar {
        height: 62px;
    }

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

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

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

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

    .search-hero,
    .section-block.warm,
    .section-block.gray,
    .section-block.editor,
    .search-panel,
    .content-card {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-grid.six,
    .movie-grid.four,
    .category-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 42px 70px 1fr;
        gap: 10px;
    }

    .rank-row img {
        width: 70px;
        height: 94px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
