:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.42);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --gold: #facc15;
    --green: #22c55e;
    --radius: 1.15rem;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.20), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.nav-shell {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.26rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.38);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #e2e8f0;
    font-weight: 700;
    font-size: 0.95rem;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--cyan);
}

.menu-toggle {
    display: none;
    border: 0;
    background: rgba(15, 23, 42, 0.86);
    color: #ffffff;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 12px;
    color: #e2e8f0;
}

.mobile-nav.is-open {
    display: block;
}

.hero-carousel {
    position: relative;
    height: min(760px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.64) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.10) 48%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 74px;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--gold);
    font-weight: 900;
    letter-spacing: 0.02em;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.8rem, 8vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: -0.08em;
    text-shadow: 0 20px 70px rgba(0, 0, 0, 0.65);
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(1rem, 2.2vw, 1.22rem);
    line-height: 1.85;
}

.hero-tags,
.detail-meta,
.card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.card-meta span {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(15, 23, 42, 0.62);
    color: #e5e7eb;
    border-radius: 999px;
    padding: 6px 11px;
    backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.ghost-button {
    padding: 0 22px;
    color: #e0f2fe;
    border: 1px solid rgba(103, 232, 249, 0.34);
    background: rgba(15, 23, 42, 0.50);
    backdrop-filter: blur(12px);
}

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

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 52px;
    z-index: 8;
    display: flex;
    gap: 12px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.66);
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(12px);
}

.quick-search,
.section-block {
    padding: 56px 0 0;
}

.quick-search {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 24px;
    align-items: end;
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-content h1,
.detail-content h2,
.side-panel h2,
.site-footer h2,
.ranking-info h2,
.category-overview-card h2 {
    margin: 0;
    color: #ffffff;
}

.quick-search p,
.page-hero p,
.category-tile p,
.category-overview-card p,
.detail-content p,
.site-footer p,
.ranking-info p {
    color: var(--muted);
    line-height: 1.78;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 0.42fr)) auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 13px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.70);
    outline: none;
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.filter-panel button {
    align-self: end;
    min-height: 44px;
    border: 0;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    padding: 0 18px;
    cursor: pointer;
    font-weight: 900;
}

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

.section-heading h2 {
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    letter-spacing: -0.04em;
}

.section-heading > a {
    color: var(--cyan);
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.26);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px) scale(1.015);
    border-color: var(--line-strong);
    box-shadow: 0 22px 58px rgba(8, 145, 178, 0.18);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    display: block;
    background:
        radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.35), transparent 45%),
        linear-gradient(145deg, #1e293b, #020617);
}

.card-poster {
    aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-frame img,
.compact-card:hover img,
.ranking-row:hover img {
    transform: scale(1.08);
}

.card-duration {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 0.74rem;
    font-weight: 800;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    transform: translate(-50%, -50%) scale(0.76);
    opacity: 0;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-body p {
    min-height: 45px;
    margin: 0 0 12px;
    color: var(--soft);
    font-size: 0.88rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-meta {
    gap: 6px;
    font-size: 0.78rem;
}

.card-meta span:first-child {
    color: var(--gold);
}

.tag-list,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}

.tag-list span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(8, 145, 178, 0.16);
    font-size: 0.74rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.ranking-panel,
.side-panel,
.detail-content,
.category-tile,
.category-overview-card,
.player-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.ranking-panel,
.side-panel {
    padding: 22px;
}

.compact-heading {
    margin-bottom: 16px;
}

.compact-list {
    display: grid;
    gap: 13px;
}

.compact-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.44);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: rgba(30, 41, 59, 0.88);
    transform: translateX(3px);
}

.compact-cover {
    aspect-ratio: 16 / 10;
    border-radius: 11px;
}

.compact-info {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.compact-info strong {
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-info em {
    color: var(--soft);
    font-style: normal;
    font-size: 0.82rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.category-tile {
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.category-tile h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.22rem;
}

.category-samples,
.category-link-list,
.more-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-samples a,
.category-link-list a,
.more-categories a {
    border-radius: 999px;
    color: #cffafe;
    background: rgba(34, 211, 238, 0.11);
    padding: 6px 10px;
    font-size: 0.82rem;
}

.page-hero {
    padding: 86px 0 62px;
    background:
        radial-gradient(circle at 72% 0%, rgba(34, 211, 238, 0.22), transparent 28rem),
        linear-gradient(135deg, rgba(8, 145, 178, 0.38), rgba(37, 99, 235, 0.24), rgba(15, 23, 42, 0.42));
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.07em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 1.08rem;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 26px;
    padding: 20px;
    align-items: center;
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    min-height: 150px;
}

.category-poster-stack img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 62px 130px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}

.ranking-number {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.ranking-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 13px;
}

.ranking-info h2 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.ranking-info p {
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.small-button {
    min-width: 74px;
    padding: 0 17px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--soft);
}

.breadcrumb a {
    color: #bae6fd;
}

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

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

.player-card {
    position: relative;
    overflow: hidden;
    background: #000000;
}

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

.player-start {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.34);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-size: 2rem;
    z-index: 5;
}

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

.detail-content {
    padding: 28px;
}

.detail-content h1 {
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.06em;
    margin-bottom: 18px;
}

.detail-content h2 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 1.32rem;
}

.detail-content p {
    margin: 0;
    text-align: justify;
}

.detail-content .one-line {
    margin-top: 22px;
    color: #e0f2fe;
    font-size: 1.1rem;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 20px;
}

.poster-card {
    aspect-ratio: 2 / 3;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 28px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 0.8fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.site-footer h2 {
    font-size: 1.05rem;
    margin-bottom: 12px;
}

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

.footer-bottom {
    border-top: 1px solid var(--line);
    padding: 20px 16px;
    text-align: center;
    color: var(--soft);
}

.is-filtered-out {
    display: none;
}

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

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

    .detail-side {
        position: static;
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .quick-search,
    .filter-panel,
    .footer-grid,
    .category-overview-card,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

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

    .hero-controls {
        left: 16px;
        right: auto;
        bottom: 28px;
    }

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

    .ranking-row {
        grid-template-columns: 44px 96px minmax(0, 1fr);
    }

    .ranking-row .small-button {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

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

    .site-logo,
    .footer-logo {
        font-size: 1rem;
    }

    .hero-copy h1 {
        font-size: 2.55rem;
    }

    .hero-tags span,
    .detail-meta span,
    .card-meta span {
        font-size: 0.72rem;
    }

    .movie-grid,
    .featured-grid,
    .recent-grid,
    .all-grid {
        gap: 12px;
    }

    .card-body {
        padding: 11px;
    }

    .card-body p,
    .tag-list {
        display: none;
    }

    .detail-content,
    .side-panel,
    .ranking-panel {
        padding: 18px;
    }

    .player-start {
        width: 66px;
        height: 66px;
        font-size: 1.6rem;
    }
}
