:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #b45309;
    --amber-soft: #fef3c7;
    --orange-soft: #fff7ed;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

.nav-wrap {
    display: flex;
    align-items: center;
    min-height: 72px;
    gap: 26px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
    font-size: 16px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-search input,
.search-box input,
.filter-bar input,
.filter-bar select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, width 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 15px;
}

.header-search input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.header-search button,
.search-box button,
.btn,
.filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.search-box button,
.btn-primary {
    background: var(--amber);
    color: #fff;
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.22);
}

.header-search button {
    padding: 10px 15px;
}

.header-search button:hover,
.search-box button:hover,
.btn-primary:hover {
    background: var(--amber-dark);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--amber-soft);
    margin-left: auto;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--amber-dark);
}

.hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity 0.9s ease;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    z-index: 2;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 42px;
    min-height: 520px;
    padding: 64px 0;
}

.hero-copy {
    max-width: 760px;
    color: #fff;
}

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

.hero-kicker span,
.hero-tags span,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-kicker span {
    background: rgba(245, 158, 11, 0.98);
    color: #fff;
    padding: 6px 12px;
}

.hero-kicker span + span {
    background: rgba(255, 255, 255, 0.14);
    color: #fde68a;
    backdrop-filter: blur(8px);
}

.hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 21px);
}

.hero-tags {
    margin-bottom: 28px;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.12);
    color: #fde68a;
    padding: 7px 12px;
}

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

.btn {
    min-height: 46px;
    padding: 0 22px;
    font-size: 15px;
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.hero-poster {
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transform: rotate(2deg);
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.hero-poster img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
}

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

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

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

.hero-dot.active {
    width: 34px;
    background: #f59e0b;
}

.main-content {
    padding: 48px 0 72px;
}

.section-block {
    margin-bottom: 64px;
}

.section-panel {
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--orange-soft), var(--amber-soft));
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading h1,
.section-heading h2,
.page-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: var(--amber-soft);
    color: var(--amber-dark);
    font-weight: 900;
}

.section-more {
    color: var(--amber-dark);
    font-weight: 800;
}

.section-more:hover {
    color: #92400e;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.72);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.movie-poster-medium {
    height: 220px;
}

.movie-poster-small {
    height: 170px;
}

.movie-poster-large {
    height: 270px;
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 62%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    background: var(--amber);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
}

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

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-meta-row {
    color: var(--muted);
    font-size: 13px;
}

.pill {
    background: var(--amber-soft);
    color: #92400e;
    padding: 4px 9px;
}

.movie-card-desc {
    margin: 12px 0 0;
    color: #4b5563;
    font-size: 14px;
}

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

.category-card {
    display: block;
    min-height: 168px;
    padding: 24px;
    border: 1px solid rgba(229, 231, 235, 0.72);
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, #fffbeb);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-card span {
    display: inline-flex;
    margin-top: 16px;
    color: var(--amber-dark);
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 62px 90px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: var(--amber-soft);
    color: var(--amber-dark);
    font-size: 20px;
    font-weight: 900;
}

.rank-item:nth-child(-n + 3) .rank-number {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.rank-item img {
    width: 90px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #fde68a;
}

.rank-item h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-score {
    color: var(--amber-dark);
    font-size: 20px;
    font-weight: 900;
}

.page-title {
    margin-bottom: 30px;
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
}

.page-title p {
    max-width: 850px;
    margin: 12px 0 0;
    color: #4b5563;
    font-size: 17px;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 180px 180px 140px;
    gap: 12px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    padding: 12px 15px;
}

.filter-clear {
    background: var(--amber-soft);
    color: var(--amber-dark);
}

.filter-empty {
    display: none;
    padding: 36px;
    border-radius: 22px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow);
}

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

.player-card,
.detail-card,
.side-panel {
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--shadow);
}

.player-card {
    overflow: hidden;
    background: #0f172a;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.35));
    color: #fff;
    cursor: pointer;
}

.play-overlay.hidden {
    display: none;
}

.play-overlay span {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    border-radius: 999px;
    background: var(--amber);
    box-shadow: 0 20px 50px rgba(217, 119, 6, 0.35);
    font-size: 32px;
}

.player-caption {
    padding: 18px 22px;
    color: #e5e7eb;
    background: #111827;
}

.player-caption strong {
    color: #fff;
}

.player-caption p {
    margin: 4px 0 0;
    color: #cbd5e1;
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.05em;
}

.detail-meta {
    margin-bottom: 22px;
    color: var(--muted);
}

.detail-section {
    margin-top: 24px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.detail-section h2,
.side-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-section p {
    margin: 0 0 14px;
    color: #374151;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list span {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--amber-soft);
    color: #92400e;
    font-weight: 800;
    font-size: 13px;
}

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

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

.side-card:hover {
    background: var(--orange-soft);
}

.side-card img {
    width: 82px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    background: #fde68a;
}

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

.side-card strong {
    color: #111827;
    line-height: 1.35;
}

.side-card em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 12px;
    max-width: 760px;
    margin-top: 22px;
}

.search-box input {
    padding: 14px 18px;
}

.search-box button {
    padding: 0 22px;
}

.search-count {
    margin: 0 0 22px;
    color: var(--muted);
    font-weight: 700;
}

.site-footer {
    padding: 44px 0;
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

@media (max-width: 1024px) {
    .hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .nav-wrap {
        min-height: 66px;
        flex-wrap: wrap;
        gap: 14px;
    }

    .mobile-menu-button {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        order: 3;
        padding-bottom: 14px;
    }

    .main-nav.open {
        display: flex;
    }

    .header-search {
        display: none;
    }

    .hero,
    .hero-track,
    .hero-inner {
        min-height: 560px;
    }

    .hero-control {
        display: none;
    }

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

    .rank-item {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 3;
    }
}

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

    .hero,
    .hero-track,
    .hero-inner {
        min-height: 620px;
    }

    .hero-inner {
        padding: 54px 0;
    }

    .hero-actions,
    .page-actions,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .btn,
    .search-box button {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .footer-grid,
    .filter-bar,
    .search-box {
        grid-template-columns: 1fr;
    }

    .movie-poster-medium,
    .movie-poster-large {
        height: 235px;
    }

    .page-title,
    .section-panel,
    .detail-card {
        padding: 22px;
    }
}
