:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --blue: #2563eb;
    --deep: #020617;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-text {
    font-size: 20px;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.34);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--cyan);
    background: #ecfeff;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input,
.mobile-search input,
.filter-search input,
.quick-search input {
    border: 0;
    outline: 0;
    background: transparent;
    min-width: 220px;
    padding: 9px 12px;
    color: var(--text);
}

.header-search button,
.mobile-search button,
.filter-search button,
.quick-search button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
    color: #0f172a;
    cursor: pointer;
    font-size: 20px;
}

.mobile-nav {
    display: none;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

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

.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 6px;
}

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

.hero-slide {
    display: none;
    min-height: 72vh;
    position: relative;
}

.hero-slide.is-active {
    display: block;
    animation: fadeIn 0.6s ease;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    filter: saturate(1.12);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 30%, rgba(8, 145, 178, 0.42), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.32)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.92));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 72vh;
    margin: 0 auto;
    padding: 72px 24px 96px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.56fr);
    gap: 48px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.22);
    border: 1px solid rgba(103, 232, 249, 0.36);
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0 12px;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero-copy h2 {
    margin: 0 0 18px;
    color: #e0f2fe;
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ecfeff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(37, 99, 235, 0.36);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
}

.ghost-button.light {
    color: var(--text);
    border-color: var(--line);
    background: #ffffff;
}

.hero-card {
    justify-self: end;
    width: min(360px, 100%);
    padding: 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 36px 80px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(18px);
    transition: 0.2s ease;
}

.hero-card:hover {
    transform: translateY(-4px) scale(1.01);
}

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

.hero-card div {
    padding: 16px 6px 4px;
    display: grid;
    gap: 6px;
}

.hero-card strong {
    color: #ffffff;
    font-size: 22px;
}

.hero-card span {
    color: #bae6fd;
}

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

.hero-controls button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-controls button.is-active {
    width: 56px;
    background: #67e8f9;
}

.quick-search {
    margin: -36px 24px 0;
    position: relative;
    z-index: 5;
}

.quick-search-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 0.9fr);
    gap: 24px;
    align-items: center;
    padding: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.quick-search span,
.section-heading span {
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.quick-search h2 {
    margin: 6px 0 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.quick-search form {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
}

.quick-search input {
    flex: 1;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px 0;
}

.dark-section {
    max-width: none;
    margin-top: 72px;
    padding: 72px max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: #0f172a;
}

.dark-section .section-heading h2,
.dark-section .section-heading p {
    color: #ffffff;
}

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

.section-heading h2 {
    margin: 8px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.05em;
    font-weight: 900;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link {
    white-space: nowrap;
    color: var(--cyan);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.28s ease;
}

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

.score-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    min-width: 46px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.24);
}

.score-badge.large {
    top: 18px;
    right: 18px;
    min-width: 58px;
    height: 38px;
}

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

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

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.movie-card h2 a:hover {
    color: var(--cyan);
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card .tag-row span {
    color: #0e7490;
    background: #ecfeff;
    border-color: #cffafe;
}

.movie-card.compact {
    display: grid;
    grid-template-columns: 132px 1fr;
}

.movie-card.compact .movie-poster img {
    height: 100%;
    aspect-ratio: auto;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 28px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.24);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.3s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

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

.category-tile span {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 8px;
    color: #cffafe;
    font-size: 14px;
    line-height: 1.6;
}

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

.split-section .movie-grid {
    grid-template-columns: 1fr;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 62px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    transition: 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: #67e8f9;
}

.rank-number {
    color: var(--cyan);
    font-size: 24px;
    font-weight: 900;
}

.rank-row img {
    width: 62px;
    height: 82px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-title {
    font-weight: 900;
}

.rank-meta {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 900;
}

.page-hero {
    min-height: 360px;
    padding: 86px 24px;
    background:
        radial-gradient(circle at 80% 20%, rgba(103, 232, 249, 0.24), transparent 30%),
        linear-gradient(135deg, #0f172a, #0e7490 48%, #2563eb);
}

.compact-hero > div {
    max-width: 1180px;
    margin: 0 auto;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 62px);
}

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

.filter-panel {
    position: sticky;
    top: 84px;
    z-index: 10;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.filter-search {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
    background: #ffffff;
}

.filter-search input {
    flex: 1;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-buttons button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 800;
}

.filter-buttons button.is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.empty-state {
    margin-top: 26px;
    padding: 44px;
    text-align: center;
    border-radius: 24px;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--line);
    font-weight: 800;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 380px) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 74px max(24px, calc((100vw - 1280px) / 2 + 24px));
    background:
        radial-gradient(circle at 18% 20%, rgba(8, 145, 178, 0.28), transparent 26%),
        linear-gradient(135deg, #020617, #0f172a 52%, #0e7490);
}

.detail-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 34px 84px rgba(0, 0, 0, 0.36);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bae6fd;
    margin-bottom: 18px;
    font-weight: 800;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: rgba(2, 6, 23, 0.48);
    cursor: pointer;
    transition: 0.2s ease;
}

.player-cover:hover {
    background: rgba(2, 6, 23, 0.34);
}

.player-cover span {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(8, 145, 178, 0.38);
    font-size: 28px;
}

.player-cover strong {
    font-size: 20px;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    padding-top: 46px;
}

.article-card {
    padding: 34px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.article-card h2:not(:first-child) {
    margin-top: 34px;
}

.article-card p {
    margin: 0;
    color: #334155;
    line-height: 1.95;
    font-size: 17px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.detail-meta-grid div {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.detail-meta-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.detail-meta-grid strong {
    font-size: 16px;
}

.site-footer {
    margin-top: 86px;
    background: #020617;
    color: #94a3b8;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 48px;
}

.footer-brand {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    max-width: 520px;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    padding: 20px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
}

[hidden] {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content,
    .quick-search-inner,
    .split-section,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-card {
        justify-self: start;
        max-width: 320px;
    }

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

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

@media (max-width: 760px) {
    .header-inner {
        padding: 0 16px;
        min-height: 64px;
    }

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

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

    .hero-content {
        padding: 48px 18px 86px;
    }

    .quick-search {
        margin: -28px 14px 0;
    }

    .quick-search-inner,
    .quick-search form,
    .filter-search,
    .mobile-search,
    .section-heading,
    .hero-actions,
    .page-actions {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .content-section,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .dark-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .movie-card.compact {
        grid-template-columns: 110px 1fr;
    }

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

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

    .movie-card p {
        -webkit-line-clamp: 2;
        font-size: 14px;
    }

    .category-tile {
        min-height: 180px;
        padding: 18px;
    }

    .detail-hero {
        padding: 42px 16px;
    }

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

    .article-card {
        padding: 24px;
    }

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

    .rank-meta {
        display: none;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.compact {
        grid-template-columns: 96px 1fr;
    }

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