* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-soft: #1e293b;
    --line: #1f2937;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --cyan: #06b6d4;
    --cyan-2: #0891b2;
    --cyan-soft: rgba(6, 182, 212, 0.16);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(8, 145, 178, 0.18), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--text);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--cyan);
    background: var(--cyan-soft);
    border: 1px solid rgba(6, 182, 212, 0.28);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.14);
}

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

.main-nav a,
.search-toggle {
    border: 0;
    color: #cbd5e1;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.search-toggle:hover,
.main-nav .is-active {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 9px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 12px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #cbd5e1;
}

.search-bar {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.search-bar.is-open {
    display: block;
}

.search-bar form,
.inline-search {
    display: flex;
    gap: 10px;
}

.search-bar input,
.inline-search input,
.filter-box input {
    flex: 1;
    min-width: 0;
    color: var(--text);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    outline: none;
    padding: 12px 14px;
}

.search-bar input:focus,
.inline-search input:focus,
.filter-box input:focus {
    border-color: rgba(6, 182, 212, 0.78);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.search-bar button,
.inline-search button,
.primary-btn,
.secondary-btn,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--cyan-2);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-bar button:hover,
.inline-search button:hover,
.primary-btn:hover,
.player-button:hover {
    background: #0e7490;
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.18);
}

.secondary-btn {
    color: var(--text);
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.secondary-btn:hover {
    border-color: rgba(6, 182, 212, 0.62);
    transform: translateY(-1px);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.28) 55%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    padding: 96px 0 76px;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.2);
    border: 1px solid rgba(103, 232, 249, 0.18);
    border-radius: 999px;
    font-size: 14px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero-meta,
.meta-line,
.detail-meta,
.breadcrumbs,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    color: var(--muted);
}

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

.hero-meta span,
.detail-meta span,
.meta-line span,
.tag-row span,
.rank-label,
.poster-badge,
.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
}

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

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

.hero-dots button {
    width: 34px;
    height: 4px;
    padding: 0;
    border: 0;
    background: rgba(203, 213, 225, 0.36);
    border-radius: 999px;
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--cyan);
}

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

.section {
    padding: 64px 0;
}

.section-alt {
    padding: 64px 0;
    background: rgba(15, 23, 42, 0.46);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.detail-title p,
.category-block p {
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    flex: none;
    color: var(--cyan);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.84);
    border-color: rgba(6, 182, 212, 0.42);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(15, 23, 42, 0.7));
}

.movie-card-small .poster-link,
.compact-card img {
    aspect-ratio: 2 / 3;
}

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.84);
    border-color: rgba(103, 232, 249, 0.24);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

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

.card-body p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #cbd5e1;
    line-height: 1.6;
}

.meta-line {
    margin-bottom: 12px;
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #67e8f9;
    font-size: 12px;
}

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

.mosaic-grid .compact-card:nth-child(1),
.mosaic-grid .compact-card:nth-child(5),
.mosaic-grid .compact-card:nth-child(9) {
    grid-column: span 2;
    grid-row: span 2;
}

.compact-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 142px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
}

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

.compact-card span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 12px 12px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
    font-weight: 700;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 144px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(6, 182, 212, 0.34);
}

.rank-num {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 144px;
    height: 84px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-copy h2,
.rank-copy h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.page-title {
    padding: 56px 0 28px;
}

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

.category-block {
    min-height: 210px;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.2), transparent 12rem),
        rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-block:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.42);
}

.category-block h2 {
    margin: 0 0 12px;
}

.category-block p {
    margin: 0 0 18px;
}

.category-chip {
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.18);
}

.filter-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
}

.detail-shell {
    padding: 34px 0 72px;
}

.breadcrumbs {
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--cyan);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 30px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.3);
    cursor: pointer;
}

.player-cover.is-hidden {
    display: none;
}

.player-button {
    min-width: 132px;
    height: 54px;
    font-size: 18px;
    font-weight: 800;
    border-radius: 18px;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 12px 14px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.72);
    border: 1px solid rgba(248, 113, 113, 0.32);
    border-radius: 14px;
}

.player-message.is-visible {
    display: block;
}

.detail-title {
    margin-top: 28px;
}

.detail-title h1 {
    margin-bottom: 14px;
}

.detail-meta {
    margin-bottom: 20px;
}

.detail-panel {
    margin-top: 24px;
    padding: 26px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
}

.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-panel p {
    margin: 0 0 18px;
    color: #cbd5e1;
    line-height: 1.85;
}

.detail-panel p:last-child {
    margin-bottom: 0;
}

.side-panel {
    position: sticky;
    top: 94px;
    align-self: start;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
}

.side-panel h2 {
    margin: 0 0 16px;
}

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

.side-list a {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-list img {
    width: 82px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
}

.side-list strong {
    display: block;
    margin-bottom: 4px;
}

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

.search-results {
    min-height: 320px;
}

.empty-state {
    padding: 36px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 20px;
}

.site-footer {
    margin-top: 70px;
    background: #0f172a;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.footer-brand p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.75;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
    color: var(--muted-2);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

@media (max-width: 980px) {
    .main-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 18px;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    }

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

    .main-nav a,
    .search-toggle {
        padding: 12px 0;
        text-align: left;
    }

    .menu-toggle {
        display: block;
    }

    .grid-large,
    .grid-medium,
    .grid-small,
    .category-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .side-panel {
        position: static;
    }

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

    .rank-action {
        grid-column: 2 / -1;
    }
}

@media (max-width: 640px) {
    .nav-wrap,
    .page-shell,
    .section,
    .detail-shell,
    .footer-grid,
    .footer-bottom,
    .search-bar {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

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

    .hero-content {
        padding-bottom: 76px;
    }

    .hero-actions,
    .search-bar form,
    .inline-search,
    .filter-box {
        flex-direction: column;
        align-items: stretch;
    }

    .grid-large,
    .grid-medium,
    .grid-small,
    .category-cards {
        grid-template-columns: 1fr;
    }

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

    .mosaic-grid .compact-card:nth-child(1),
    .mosaic-grid .compact-card:nth-child(5),
    .mosaic-grid .compact-card:nth-child(9) {
        grid-column: span 1;
        grid-row: span 1;
    }

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

    .rank-item img {
        width: 92px;
        height: 74px;
    }

    .rank-copy p {
        display: none;
    }
}
