:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --orange: #fb923c;
    --green: #22c55e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    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.12), transparent 30%), var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img,
video {
    max-width: 100%;
}

body.menu-open {
    overflow: hidden;
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: fit-content;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #03111a;
    font-size: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
    border-radius: 14px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.32);
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link,
.nav-button {
    color: #cbd5e1;
    font: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-button:hover {
    color: #ffffff;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    display: grid;
    width: 220px;
    padding: 10px;
    background: #0f172a;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a,
.mobile-panel a {
    padding: 10px 12px;
    color: #cbd5e1;
    border-radius: 10px;
}

.dropdown-panel a:hover,
.mobile-panel a:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.12);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
}

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

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    font-weight: 700;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
}

.header-search button,
.mobile-search button,
.primary-btn {
    color: #03111a;
    background: linear-gradient(135deg, var(--cyan), #67e8f9);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
    filter: brightness(1.08);
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid rgba(226, 232, 240, 0.22);
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.10);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--text);
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.mobile-panel {
    display: none;
    position: fixed;
    inset: 72px 16px auto 16px;
    z-index: 90;
    padding: 16px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

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

.mobile-panel nav {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}

.mobile-search input {
    width: 100%;
    padding: 12px 14px;
}

.hero-carousel {
    position: relative;
    height: min(85vh, 820px);
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.70) 42%, rgba(2, 6, 23, 0.18)), var(--cover);
    background-position: center;
    background-size: cover;
    transition: opacity 1s ease, transform 5s ease;
    transform: scale(1.02);
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.26) 40%, transparent 100%);
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 96px;
}

.hero-kicker,
.hero-meta,
.detail-chips,
.detail-stats,
.card-meta,
.tag-row,
.ranking-meta,
.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-kicker a,
.hero-kicker span,
.detail-chips span,
.detail-stats span,
.tag-row span,
.detail-tags span,
.compact-badge,
.ranking-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    color: #a5f3fc;
    font-size: 13px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.20);
    border-radius: 999px;
}

.hero-content h1 {
    max-width: 820px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.65;
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: white;
    font-size: 36px;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

.hero-arrow:hover {
    background: rgba(34, 211, 238, 0.22);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.42);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.content-section,
.player-section,
.detail-content,
.filter-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 72px 0;
}

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

.section-heading span,
.page-intro span {
    display: block;
    margin-bottom: 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-heading h2,
.page-intro h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.03em;
}

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

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

.category-tile,
.category-overview-card,
.story-card,
.filter-panel,
.player-shell,
.ranking-card,
.compact-item,
.movie-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.56));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
}

.category-tile {
    padding: 20px;
    border-radius: 20px;
}

.category-tile:hover,
.movie-card:hover,
.compact-item:hover,
.ranking-card:hover,
.category-overview-card:hover {
    border-color: rgba(34, 211, 238, 0.45);
    transform: translateY(-3px);
}

.category-tile,
.movie-card,
.compact-item,
.ranking-card,
.category-overview-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
}

.category-mini-links {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.category-mini-links a {
    color: #a5f3fc;
    font-size: 13px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
}

.card-poster,
.compact-cover,
.ranking-cover,
.detail-poster,
.category-cover-link {
    display: block;
    background-image: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.88)), var(--cover);
    background-position: center;
    background-size: cover;
}

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

.card-poster::after,
.compact-cover::after,
.ranking-cover::after,
.detail-poster::after,
.category-cover-link::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(251, 146, 60, 0.10));
}

.card-badge,
.card-score {
    position: absolute;
    top: 10px;
    z-index: 2;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
}

.card-badge {
    left: 10px;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.72);
}

.card-score {
    right: 10px;
    color: #03111a;
    background: var(--cyan);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #03111a;
    background: rgba(103, 232, 249, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: all 0.2s ease;
}

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

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    color: white;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-line {
    display: -webkit-box;
    min-height: 58px;
    margin: 10px 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #cbd5e1;
    font-size: 12px;
}

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

.tag-row span {
    min-height: 24px;
    padding: 0 8px;
    font-size: 12px;
}

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

.compact-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 12px;
    border-radius: 20px;
}

.compact-cover {
    min-height: 170px;
    border-radius: 16px;
}

.compact-body a {
    display: block;
    margin: 10px 0 8px;
    color: white;
    font-size: 20px;
    font-weight: 800;
}

.compact-body p {
    margin: 0 0 12px;
    color: #94a3b8;
    line-height: 1.65;
}

.compact-body div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #cbd5e1;
    font-size: 13px;
}

.page-intro {
    position: relative;
    overflow: hidden;
    padding: 86px 0 42px;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 34%), linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0));
}

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

.page-intro p {
    max-width: 780px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
}

.category-cover-link {
    min-height: 220px;
    border-radius: 18px;
}

.category-overview-card h2 {
    margin: 8px 0 10px;
    font-size: 24px;
}

.category-overview-card p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-top: 22px;
    padding: 14px;
    border-radius: 22px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
}

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

.ranking-card {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 16px;
    min-height: 176px;
    padding: 12px;
    border-radius: 20px;
}

.ranking-cover {
    min-height: 152px;
    border-radius: 16px;
}

.ranking-info h2 {
    margin: 8px 0 8px;
    font-size: 20px;
}

.ranking-info p {
    margin: 0 0 12px;
    color: #94a3b8;
    line-height: 1.65;
}

.ranking-meta {
    color: #cbd5e1;
    font-size: 13px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.30)), var(--cover);
    background-position: center;
    background-size: cover;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617, transparent 60%);
}

.detail-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: end;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 86px 0 56px;
}

.detail-poster {
    min-height: 465px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    gap: 10px;
    color: #a5f3fc;
    font-size: 14px;
}

.detail-info h1 {
    max-width: 820px;
    margin: 18px 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1.75;
}

.detail-stats {
    margin: 18px 0 26px;
}

.player-section {
    padding: 72px 0 30px;
}

.compact-heading {
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 26px;
    background: #000000;
}

.movie-video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 10px;
    color: white;
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.26), rgba(2, 6, 23, 0.70));
    border: 0;
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: #03111a;
    font-size: 28px;
    background: var(--cyan);
    border-radius: 999px;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.40);
}

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

.player-shell.is-playing .player-overlay,
.player-shell.is-ready .player-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 36px 0 30px;
}

.story-card {
    padding: 24px;
    border-radius: 24px;
}

.story-card:first-child {
    grid-column: span 2;
}

.story-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.9;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    color: #cbd5e1;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
}

.detail-tags {
    margin-top: 20px;
}

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

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

.site-footer {
    margin-top: 72px;
    border-top: 1px solid var(--line);
    background: #020617;
}

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

.footer-brand p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.7;
}

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

.footer-links h2 {
    margin: 0 0 6px;
    font-size: 16px;
}

.footer-links a {
    color: #94a3b8;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

[hidden] {
    display: none !important;
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

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

@media (max-width: 820px) {
    .hero-carousel {
        min-height: 560px;
    }

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

    .hero-arrow {
        display: none;
    }

    .category-grid,
    .category-overview-grid,
    .compact-grid,
    .rank-list,
    .ranking-grid,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

    .detail-wrap {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .detail-poster {
        width: min(280px, 72vw);
        min-height: 410px;
    }

    .story-card:first-child {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .header-inner {
        width: min(100% - 20px, 1180px);
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

    .content-section,
    .player-section,
    .detail-content,
    .filter-panel,
    .page-intro div,
    .detail-wrap,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 20px, 1180px);
    }

    .hero-content h1,
    .detail-info h1 {
        letter-spacing: -0.03em;
    }

    .movie-grid,
    .full-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .compact-item,
    .ranking-card,
    .category-overview-card {
        grid-template-columns: 96px 1fr;
    }

    .compact-cover,
    .ranking-cover,
    .category-cover-link {
        min-height: 140px;
    }
}
