:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --deep: #020617;
    --slate: #1e293b;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --ring: rgba(245, 158, 11, 0.34);
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.32);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.brand strong {
    display: block;
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.nav-links a {
    font-weight: 650;
    color: #e2e8f0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fbbf24;
    transform: translateY(-1px);
}

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

.nav-search input,
.wide-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
    border: 1px solid rgba(148, 163, 184, 0.35);
    outline: none;
    border-radius: 999px;
    padding: 11px 16px;
    min-width: 210px;
    color: var(--ink);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-search button,
.wide-search button,
.search-panel button,
.btn,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 750;
    color: #ffffff;
    background: var(--amber);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.wide-search button:hover,
.search-panel button:hover,
.btn:hover,
.filter-bar button:hover {
    transform: translateY(-1px);
    background: var(--amber-dark);
    box-shadow: 0 14px 28px var(--ring);
}

.menu-toggle {
    display: none;
    justify-self: end;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(90deg, #020617 0%, #1e293b 56%, #78350f 100%);
}

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

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

.hero-slide > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.24;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.3), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(120, 53, 15, 0.5) 100%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 900px;
    margin-left: max(16px, calc((100vw - 1180px) / 2));
}

.eyebrow {
    margin: 0 0 16px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0 0 22px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 0 0 34px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.btn.primary {
    background: var(--amber);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

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

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
    background: #fbbf24;
}

.search-panel {
    margin-top: -44px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.search-panel p {
    margin: 0;
}

.search-panel p {
    margin-top: 8px;
    color: var(--muted);
}

.search-panel form,
.wide-search {
    display: flex;
    gap: 10px;
}

.wide-search {
    margin-top: 26px;
    max-width: 720px;
}

.wide-search input {
    flex: 1;
}

.section-block {
    padding: 64px 0 0;
}

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

.section-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(26px, 3vw, 36px);
    color: #1e293b;
}

.section-head h2 span {
    color: var(--amber);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
}

.movie-cover {
    position: relative;
    display: block;
    height: 260px;
    overflow: hidden;
    background: #0f172a;
}

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

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(2, 6, 23, 0.78) 100%);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 11px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber);
    font-size: 13px;
    font-weight: 800;
}

.rank-badge {
    right: auto;
    left: 12px;
    background: #ef4444;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.88);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

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

.movie-meta,
.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.movie-desc {
    min-height: 68px;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 20px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.13);
}

.category-tile img,
.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    transition: transform 0.4s ease;
}

.category-tile:hover img,
.category-card-large:hover img {
    transform: scale(1.08);
}

.category-tile span,
.category-cover span {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.88));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
}

.category-tile strong {
    bottom: 46px;
    font-size: 20px;
}

.category-tile em {
    bottom: 22px;
    color: #fde68a;
    font-style: normal;
}

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

.rank-panel {
    align-self: start;
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: var(--radius);
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: var(--shadow);
}

.rank-panel h2 {
    margin: 0 0 18px;
    color: #ffffff;
}

.rank-row {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.rank-row span {
    grid-row: span 2;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: var(--amber);
    font-weight: 850;
}

.rank-row strong {
    color: inherit;
    line-height: 1.3;
}

.rank-row em {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    padding: 92px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.28), transparent 34%),
        linear-gradient(90deg, #020617, #1e293b 58%, #78350f);
}

.page-hero.slim {
    padding: 74px 0;
}

.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-bar input {
    flex: 1;
    min-width: 260px;
}

.result-count {
    margin-bottom: 18px;
    color: var(--muted);
    font-weight: 700;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    padding: 20px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.category-cover {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.category-card-large h2 {
    margin: 4px 0 10px;
    font-size: 28px;
}

.category-card-large p {
    color: var(--muted);
    line-height: 1.75;
}

.category-card-large strong {
    color: var(--amber-dark);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mini-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
}

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

.rank-list.big {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 26px;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
    filter: blur(4px);
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 22%, rgba(245, 158, 11, 0.25), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.82));
}

.detail-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 40px;
    align-items: center;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(2, 6, 23, 0.45);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.detail-line {
    max-width: 800px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

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

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 28px 78px rgba(15, 23, 42, 0.25);
    aspect-ratio: 16 / 9;
}

.video-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
    text-align: center;
    padding: 30px;
}

.player-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.96);
    font-size: 34px;
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.35);
}

.player-overlay strong {
    font-size: clamp(22px, 3vw, 34px);
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 14px;
    color: #1e293b;
}

.content-card p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
    font-size: 16px;
}

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

.all-link {
    display: block;
    padding: 14px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.all-link strong {
    display: block;
    margin-bottom: 6px;
    color: #1e293b;
}

.all-link span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 84px;
    padding: 54px 0 28px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

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

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 0 !important;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    font-size: 14px;
}

@media (max-width: 1080px) {
    .nav-shell {
        grid-template-columns: auto auto;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links,
    .nav-search {
        grid-column: 1 / -1;
        display: none;
        width: 100%;
    }

    .nav-links.is-open,
    .nav-search.is-open {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 0;
        border-top: 1px solid rgba(148, 163, 184, 0.22);
    }

    .nav-search {
        padding-bottom: 16px;
    }

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

    .split-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 780px) {
    .hero,
    .hero-content {
        min-height: 560px;
    }

    .search-panel,
    .category-card-large,
    .detail-wrap,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .top-grid,
    .all-list,
    .rank-list.big {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-wrap {
        padding: 44px 0;
    }

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

    .search-panel form,
    .wide-search,
    .nav-search {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-search input,
    .wide-search input,
    .search-panel input,
    .filter-bar input,
    .filter-bar select {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .featured-grid,
    .compact-grid,
    .category-grid,
    .top-grid,
    .all-list,
    .rank-list.big {
        grid-template-columns: 1fr;
    }

    .movie-cover {
        height: 300px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .player-circle {
        width: 70px;
        height: 70px;
    }
}
