:root {
    --bg: #0f172a;
    --panel: #1e293b;
    --panel-soft: rgba(30, 41, 59, 0.82);
    --panel-deep: #020617;
    --line: rgba(245, 158, 11, 0.2);
    --line-cool: rgba(34, 211, 238, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --amber: #f59e0b;
    --amber-soft: #fbbf24;
    --rose: #fb7185;
    --emerald: #34d399;
    --cyan: #22d3ee;
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    --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(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.10), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-soft);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
    box-shadow: 0 0 28px rgba(245, 158, 11, 0.32);
    font-size: 14px;
}

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

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

.nav-link,
.mobile-link {
    color: #e5e7eb;
    transition: color 0.2s ease;
}

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

.top-search,
.mobile-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.wide-search input,
.filter-bar input {
    width: 100%;
    color: #e5e7eb;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    outline: none;
    padding: 11px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
    width: min(260px, 22vw);
}

.top-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus {
    border-color: var(--amber);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.top-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.section-more {
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 700;
    white-space: nowrap;
}

.top-search button,
.mobile-search button,
.wide-search button,
.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}

.ghost-btn,
.section-more {
    color: #f8fafc;
    background: rgba(51, 65, 85, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.menu-button {
    display: none;
    color: var(--text);
    background: transparent;
    border: 0;
    font-size: 28px;
}

.mobile-menu {
    display: none;
    border-top: 1px solid var(--line);
    padding: 18px 16px 22px;
    background: #0f172a;
}

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

.mobile-menu nav,
.mobile-cats {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

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

.mobile-cats a {
    color: var(--muted-strong);
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.75);
}

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

.hero-slide {
    display: none;
    position: absolute;
    inset: 0;
}

.hero-slide.active {
    display: block;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.22) 100%),
        linear-gradient(0deg, #0f172a 0%, transparent 34%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    padding-top: 34px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--amber-soft);
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 999px;
    padding: 7px 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.player-panel h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.search-panel p,
.section-heading p {
    color: var(--muted-strong);
    line-height: 1.75;
}

.hero p {
    max-width: 690px;
    margin: 22px 0 0;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags a,
.quick-links a {
    color: #fde68a;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
}

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

.hero-card {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.68);
    border: 1px solid rgba(245, 158, 11, 0.24);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-card span {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #111827;
    background: var(--amber-soft);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
    z-index: 5;
}

.hero-controls > button,
.hero-dot {
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    padding: 0;
}

.hero-dot.active {
    width: 34px;
    background: var(--amber);
}

.search-panel,
.page-hero {
    margin-top: 44px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.88));
    box-shadow: var(--shadow);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
    gap: 28px;
    align-items: center;
}

.search-panel h2,
.section-heading h2,
.detail-card h2,
.side-info h2,
.category-overview-card h2,
.category-tile h2,
.movie-card h2,
.horizontal-card h2,
.rank-item h2 {
    margin: 0;
}

.search-panel h2 {
    color: var(--amber-soft);
    font-size: clamp(26px, 4vw, 42px);
}

.wide-search {
    width: 100%;
}

.quick-links {
    grid-column: 1 / -1;
}

.quick-links a {
    color: var(--muted-strong);
}

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

.section-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.section-heading > span {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.88);
    font-size: 24px;
}

.section-heading h2 {
    font-size: clamp(28px, 3vw, 40px);
}

.section-heading.amber h2,
.section-heading.amber > span {
    color: var(--amber-soft);
}

.section-heading.emerald h2,
.section-heading.emerald > span {
    color: var(--emerald);
}

.section-heading.rose h2,
.section-heading.rose > span {
    color: var(--rose);
}

.section-heading.cyan h2,
.section-heading.cyan > span {
    color: var(--cyan);
}

.section-more {
    margin-left: auto;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #1e293b 0%, #111827 100%);
    border: 1px solid rgba(245, 158, 11, 0.16);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 26px 54px rgba(245, 158, 11, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #0f172a;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.horizontal-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.year-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    padding: 6px 10px;
}

.year-badge {
    top: 12px;
    right: 12px;
    color: #111827;
    background: var(--amber-soft);
}

.play-badge {
    left: 12px;
    bottom: 12px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.card-body {
    padding: 17px;
}

.movie-card h2 {
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a {
    color: var(--amber-soft);
}

.movie-card p,
.horizontal-card p,
.rank-item p,
.category-overview-card p,
.category-tile p,
.detail-card p,
.side-info dd,
.site-footer p {
    color: var(--muted);
    line-height: 1.68;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 9px 0 14px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta,
.small-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: #64748b;
    font-size: 13px;
}

.card-meta a,
.small-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.7);
}

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

.horizontal-card,
.rank-item {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    background: linear-gradient(90deg, #1e293b, #334155);
    border: 1px solid rgba(52, 211, 153, 0.15);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.horizontal-card:hover,
.rank-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(16, 185, 129, 0.10);
}

.horizontal-poster,
.rank-poster {
    overflow: hidden;
    border-radius: 14px;
}

.horizontal-poster img,
.rank-poster img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.horizontal-card h2 a {
    color: var(--emerald);
}

.rank-band {
    margin-top: 64px;
    padding: 1px 0 64px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.76), rgba(2, 6, 23, 0.45));
}

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

.rank-item {
    grid-template-columns: 58px 108px minmax(0, 1fr);
    border-color: rgba(251, 113, 133, 0.16);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #111827;
    background: linear-gradient(135deg, #fb7185, #f59e0b);
    font-weight: 900;
}

.rank-item h2 a {
    color: var(--rose);
}

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

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

.category-tile,
.category-overview-card {
    display: block;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line-cool);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
}

.tile-images,
.overview-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    overflow: hidden;
}

.tile-images img,
.overview-covers img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-tile > div:last-child,
.category-overview-card > div {
    padding: 22px;
}

.category-tile h2 a,
.category-tile h2,
.category-overview-card h2 a {
    color: var(--cyan);
    font-size: 24px;
}

.category-overview-card ul {
    display: grid;
    gap: 8px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.category-overview-card li a,
.text-link {
    color: var(--amber-soft);
}

.page-hero {
    display: grid;
    min-height: 260px;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 26rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.9));
}

.page-hero.small-hero h1,
.page-hero.category-hero h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.filter-bar {
    margin-bottom: 24px;
}

.filter-bar input {
    max-width: 680px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 24px;
}

.detail-main {
    display: grid;
    gap: 22px;
}

.player-panel,
.detail-card,
.side-info,
.side-cover {
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.78);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.26);
}

.player-panel,
.detail-card,
.side-info {
    padding: 24px;
}

.movie-subline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 24px;
}

.movie-subline span {
    color: var(--muted-strong);
    background: rgba(51, 65, 85, 0.72);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 14px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.movie-video,
.player-poster,
.player-poster img {
    width: 100%;
    height: 100%;
}

.movie-video {
    object-fit: contain;
    background: #000;
}

.player-poster {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: #000;
}

.player-poster img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0.72;
}

.big-play {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-soft), var(--amber));
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.44);
    font-size: 34px;
}

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

.detail-card h2,
.side-info h2 {
    color: var(--amber-soft);
    margin-bottom: 12px;
}

.accent-card {
    border-left: 4px solid var(--amber);
}

.detail-tags a {
    color: #fef3c7;
}

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

.prev-next a {
    padding: 16px;
    color: var(--muted-strong);
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
}

.detail-side {
    position: sticky;
    top: 92px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.side-cover {
    display: block;
    overflow: hidden;
}

.side-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.side-info dl {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    margin: 0;
}

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

.side-info dd {
    margin: 0;
}

.side-info a {
    color: var(--amber-soft);
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: #020617;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 52px 0;
}

.site-footer h2 {
    color: var(--amber-soft);
    font-size: 18px;
    margin: 0 0 14px;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a {
    color: var(--muted-strong);
}

.footer-bottom {
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    color: #64748b;
    text-align: center;
    padding: 22px 16px;
    font-size: 14px;
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1180px) {
    .featured-grid,
    .all-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .menu-button {
        display: block;
    }

    .header-inner {
        min-height: 64px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
    }

    .hero-card {
        width: min(260px, 70vw);
        transform: none;
    }

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

    .quick-links {
        grid-column: auto;
    }

    .horizontal-grid,
    .rank-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

    .side-cover {
        max-width: 320px;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 22px, 1280px);
    }

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

    .hero {
        min-height: 760px;
    }

    .hero h1,
    .page-hero h1,
    .player-panel h1 {
        letter-spacing: -0.03em;
    }

    .hero-card {
        display: none;
    }

    .search-panel,
    .page-hero,
    .player-panel,
    .detail-card,
    .side-info {
        padding: 20px;
        border-radius: 18px;
    }

    .wide-search,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
    }

    .section-heading {
        align-items: flex-start;
    }

    .section-more {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .all-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-body {
        padding: 13px;
    }

    .movie-card h2 {
        font-size: 16px;
    }

    .horizontal-card,
    .rank-item {
        grid-template-columns: 108px minmax(0, 1fr);
    }

    .rank-item {
        grid-template-columns: 42px 86px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        font-size: 13px;
    }

    .prev-next {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .featured-grid,
    .all-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero-controls {
        bottom: 20px;
    }

    .rank-item,
    .horizontal-card {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .rank-item .rank-number {
        display: none;
    }
}
