:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-850: #111827;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --cyan-700: #0e7490;
    --cyan-600: #0891b2;
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    --cyan-300: #67e8f9;
    --blue-500: #3b82f6;
    --yellow-400: #facc15;
    --white: #ffffff;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 16px 35px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50), var(--white));
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-950), var(--slate-900) 48%, #0f3947);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 15px 35px rgba(2, 6, 23, 0.28);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.site-logo span:last-child,
.footer-logo span:last-child {
    background: linear-gradient(90deg, var(--cyan-400), var(--blue-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 10px 26px rgba(6, 182, 212, 0.34);
    font-size: 13px;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan-300);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 6px 16px 18px;
    background: var(--slate-900);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.mobile-nav.open {
    display: grid;
    gap: 6px;
}

.mobile-nav-link {
    color: #cbd5e1;
    padding: 10px 4px;
    border-radius: 10px;
}

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

.hero {
    position: relative;
    min-height: 620px;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-950), #164e63 55%, var(--slate-950));
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 35%, rgba(34, 211, 238, 0.24), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.96)),
        linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(760px, 100%);
    padding: 86px 0 90px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan-300);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "★";
    color: var(--yellow-400);
}

.hero h1 {
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-actions,
.section-head,
.category-head,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.button-primary,
.button-ghost,
.button-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 15px 30px rgba(6, 182, 212, 0.25);
}

.button-ghost {
    color: var(--cyan-100);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.button-light {
    color: var(--cyan-700);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.button-primary:hover,
.button-ghost:hover,
.button-light:hover {
    transform: translateY(-2px);
}

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

.hero-tag-row {
    margin: 18px 0 28px;
}

.hero-tag-row span,
.tag-row span,
.detail-tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tag-row span {
    padding: 8px 13px;
    color: #e0f2fe;
    border: 1px solid rgba(103, 232, 249, 0.35);
    background: rgba(15, 23, 42, 0.4);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-control {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 22px;
}

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

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

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

.quick-search {
    margin-top: -42px;
    position: relative;
    z-index: 10;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(12px);
}

.search-input,
.filter-select {
    min-height: 48px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--slate-900);
    background: var(--white);
    outline: none;
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.section {
    padding: 72px 0;
}

.section.alt {
    background: linear-gradient(135deg, var(--slate-50), #ecfeff);
}

.section.dark {
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-950), var(--slate-900) 55%, #164e63);
}

.section-head {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-subtitle {
    margin: 6px 0 0;
    color: var(--slate-500);
}

.dark .section-subtitle {
    color: #cbd5e1;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.84);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--slate-200);
}

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

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

.poster-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.72);
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card-title {
    display: block;
    margin-bottom: 8px;
    color: var(--slate-900);
    font-weight: 850;
    line-height: 1.36;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-title:hover {
    color: var(--cyan-600);
}

.movie-card-body p {
    margin: 8px 0 12px;
    color: var(--slate-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 13px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta span + span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--cyan-500);
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 5px 8px;
    color: var(--cyan-700);
    background: #cffafe;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.movie-card-wide .poster-link {
    aspect-ratio: auto;
    height: 100%;
    min-height: 170px;
}

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

.category-card {
    min-height: 186px;
    padding: 22px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--cyan-700));
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 52px rgba(6, 182, 212, 0.2);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: #e0f2fe;
    font-size: 14px;
}

.category-card span {
    color: var(--cyan-300);
    font-weight: 800;
}

.page-hero {
    padding: 78px 0 64px;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.25), transparent 28%),
        linear-gradient(135deg, var(--slate-950), var(--slate-900) 52%, #164e63);
}

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

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--cyan-300);
    font-weight: 700;
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-bottom: 26px;
}

.empty-message {
    display: none;
    padding: 36px;
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--slate-600);
    text-align: center;
    box-shadow: var(--shadow-card);
}

.empty-message.visible {
    display: block;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 128px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.84);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    font-weight: 900;
}

.rank-item img {
    width: 128px;
    height: 78px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-info p {
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.detail-hero {
    padding: 58px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 76% 30%, rgba(34, 211, 238, 0.22), transparent 30%),
        linear-gradient(135deg, var(--slate-950), var(--slate-900) 52%, #164e63);
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.42);
    background: var(--slate-800);
}

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

.detail-title {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-desc {
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 18px;
}

.detail-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 26px;
}

.detail-tag-row span {
    padding: 7px 12px;
    color: #e0f2fe;
    border: 1px solid rgba(103, 232, 249, 0.35);
    background: rgba(15, 23, 42, 0.42);
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.content-card,
.side-card,
.player-card {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.84);
}

.content-card {
    padding: 28px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 18px;
    color: var(--slate-700);
}

.player-card {
    overflow: hidden;
    margin-bottom: 28px;
}

.player-frame {
    position: relative;
    background: var(--slate-950);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: var(--slate-950);
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    color: var(--white);
    background:
        radial-gradient(circle at center, rgba(6, 182, 212, 0.25), rgba(2, 6, 23, 0.72)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.75));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.22s ease;
}

.player-card.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    color: var(--white);
    background: linear-gradient(135deg, var(--cyan-500), var(--blue-500));
    box-shadow: 0 20px 48px rgba(6, 182, 212, 0.35);
    font-size: 34px;
}

.player-title-row {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--slate-200);
}

.player-title-row h2 {
    margin: 0;
    font-size: 20px;
}

.side-card {
    padding: 20px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.mini-card:hover {
    background: var(--slate-100);
}

.mini-card img {
    width: 96px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--slate-200);
}

.mini-card span {
    color: var(--slate-900);
    font-weight: 800;
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.site-footer {
    color: #cbd5e1;
    background: var(--slate-950);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.footer-grid p {
    max-width: 430px;
    color: #94a3b8;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--cyan-300);
}

.footer-bottom {
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.horizontal-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
    width: 310px;
    min-width: 310px;
    scroll-snap-align: start;
}

@media (max-width: 1024px) {
    .desktop-nav {
        gap: 16px;
    }

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

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

    .hero-controls {
        right: 16px;
        bottom: 22px;
    }

    .hero-dots {
        left: 24px;
        transform: none;
        bottom: 32px;
    }

    .search-panel,
    .filter-bar {
        grid-template-columns: 1fr;
    }

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

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 46px 96px 1fr;
    }

    .rank-item .button-light {
        grid-column: 2 / -1;
        justify-self: start;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-copy {
        padding-top: 64px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .section {
        padding: 52px 0;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 42px 1fr;
    }

    .rank-item img {
        grid-column: 1 / -1;
        width: 100%;
        height: 170px;
    }

    .rank-item .button-light {
        grid-column: 1 / -1;
    }

    .detail-poster {
        max-width: 100%;
    }

    .content-card {
        padding: 22px;
    }

    .player-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
