:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #e2e8f0;
    --white: #ffffff;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(2, 8, 23, 0.52);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 36rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 70%);
    z-index: -1;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(120deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.28));
    color: var(--cyan);
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.25);
    font-size: 15px;
}

.desktop-nav,
.mobile-nav {
    align-items: center;
    gap: 24px;
}

.desktop-nav {
    display: flex;
}

.mobile-nav {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

.mobile-nav.open {
    display: grid;
}

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

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

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    padding: 10px;
}

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.2) brightness(0.5);
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.42) 70%, rgba(2, 6, 23, 0.82) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 40%);
}

.hero-content {
    position: relative;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 56px;
    padding: 80px 0 110px;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker,
.page-hero > span,
.section-heading span,
.category-overview-head span,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 20px 0 18px;
    color: var(--white);
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.96;
    font-weight: 900;
    letter-spacing: -0.07em;
}

.hero-copy p {
    max-width: 660px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.9;
}

.hero-tags,
.info-pills,
.genre-pills,
.tag-links,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.info-pills span,
.genre-pills span,
.movie-tags span,
.tag-links a {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(15, 23, 42, 0.58);
    color: #dbeafe;
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111a;
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.28);
}

.btn.ghost {
    color: #e0f2fe;
    border: 1px solid rgba(125, 211, 252, 0.35);
    background: rgba(15, 23, 42, 0.58);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    border: 1px solid rgba(255,255,255,0.12);
}

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

.hero-poster:hover img {
    transform: scale(1.06);
}

.hero-poster span,
.play-ring {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(34, 211, 238, 0.86);
    color: #00111a;
    box-shadow: 0 0 45px rgba(34, 211, 238, 0.55);
    font-size: 28px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 38px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 5;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.68);
    color: #dbeafe;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
}

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

.quick-category {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 12px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.quick-category a {
    min-height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.86);
    color: #dbeafe;
    font-weight: 800;
    box-shadow: 0 18px 45px rgba(2, 8, 23, 0.32);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.quick-category a:hover {
    transform: translateY(-4px);
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.45);
}

.content-section,
.category-overview-list,
.detail-layout {
    padding: 76px 0 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-article h2,
.side-panel h2,
.category-overview-head h2 {
    color: var(--white);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    margin-top: 12px;
    font-size: clamp(28px, 4vw, 46px);
}

.section-heading p,
.page-hero p,
.category-overview-head p,
.site-footer p,
.detail-article p,
.watch-info p,
.movie-card p {
    color: var(--muted);
    line-height: 1.8;
}

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

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

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

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

.movie-card {
    display: block;
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(2, 8, 23, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(15, 23, 42, 0.92);
}

.movie-card figure {
    position: relative;
    margin: 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

.movie-card figure::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.88), transparent 45%);
    opacity: 0.76;
}

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

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

.score,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.score {
    right: 12px;
    color: var(--amber);
    background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
    left: 12px;
    color: #00111a;
    background: linear-gradient(135deg, var(--amber), #fde68a);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 850;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-card p {
    display: -webkit-box;
    min-height: 50px;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #94a3b8;
    font-size: 13px;
}

.movie-tags {
    margin: 0 0 12px;
}

.movie-tags span {
    padding: 5px 8px;
    font-size: 12px;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: stretch;
}

.movie-card-wide figure {
    aspect-ratio: 4 / 5;
}

.movie-card-wide p {
    min-height: auto;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: #f8fafc;
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.empty-state {
    margin: 28px 0 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    color: #cbd5e1;
}

.page-main {
    padding-bottom: 80px;
}

.page-hero {
    padding: 82px 0 30px;
}

.page-hero h1 {
    max-width: 900px;
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.04;
}

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

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

.category-overview-card,
.side-panel,
.detail-article,
.player-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 18px 55px rgba(2, 8, 23, 0.3);
}

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 12px 0 8px;
    font-size: 30px;
}

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

.category-rank-strip {
    padding-top: 30px;
}

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

.strip-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    font-weight: 800;
    overflow: hidden;
}

.strip-links span {
    color: var(--amber);
    flex: 0 0 auto;
}

.rank-table {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 56px 58px minmax(0, 1fr) 130px 90px 80px 90px;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.66);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.42);
}

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

.rank-row strong {
    color: #f8fafc;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em,
.rank-row small,
.rank-row i {
    color: #94a3b8;
    font-style: normal;
}

.rank-row b,
.rank-num {
    color: var(--amber);
}

.watch-main {
    padding-bottom: 80px;
}

.watch-hero {
    position: relative;
    padding: 40px 0 70px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0)),
        radial-gradient(circle at 74% 16%, rgba(34, 211, 238, 0.16), transparent 28rem);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: #94a3b8;
    font-size: 14px;
}

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

.watch-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 30px;
    align-items: stretch;
}

.player-card {
    padding: 12px;
}

.watch-player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
}

.watch-player video,
.player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.watch-player video {
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
}

.player-cover img {
    object-fit: cover;
    filter: brightness(0.62);
}

.watch-player.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.watch-info {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
}

.watch-info h1 {
    margin: 18px 0 16px;
    color: var(--white);
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.info-pills,
.genre-pills,
.tag-links {
    margin-top: 18px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
}

.detail-article,
.side-panel {
    padding: 28px;
}

.detail-article h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-article p + h2 {
    margin-top: 30px;
}

.detail-article p {
    font-size: 17px;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    color: #e2e8f0;
    font-weight: 800;
}

.side-links span {
    color: #94a3b8;
    font-weight: 650;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.64), rgba(2, 6, 23, 0.98));
}

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

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

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

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

.site-footer p,
.site-footer li {
    color: #94a3b8;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    color: #64748b;
}

[hidden] {
    display: none !important;
}

@media (max-width: 1180px) {
    .quick-category,
    .library-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .watch-grid,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        gap: 28px;
        padding-top: 48px;
    }

    .hero-poster {
        max-width: 320px;
        margin: 0 auto;
        transform: none;
    }

    .quick-category,
    .feature-grid,
    .library-grid,
    .ranking-grid,
    .category-preview-grid,
    .strip-links,
    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-row {
        grid-template-columns: 42px 52px minmax(0, 1fr) 70px;
    }

    .rank-row em,
    .rank-row small,
    .rank-row i {
        display: none;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 20px;
    }

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

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

    .quick-category,
    .feature-grid,
    .library-grid,
    .ranking-grid,
    .category-preview-grid,
    .strip-links,
    .filter-panel,
    .top-three {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .category-overview-head,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-card-wide {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .watch-info,
    .detail-article,
    .side-panel,
    .category-overview-card {
        padding: 20px;
        border-radius: 22px;
    }
}
