:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.78);
    --line: rgba(96, 165, 250, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --yellow: #facc15;
    --red: #ef4444;
    --radius-xl: 28px;
    --radius: 18px;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
        radial-gradient(circle at 90% 12%, rgba(59, 130, 246, 0.16), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 45px rgba(2, 6, 23, 0.45);
}

.header-inner {
    max-width: 1240px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111f;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.55);
}

.brand-text,
.footer-brand {
    font-size: 24px;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    position: relative;
    color: #dbeafe;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.58);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #e0f2fe;
    border-radius: 4px;
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 0;
    color: #dbeafe;
    border-top: 1px solid rgba(96, 165, 250, 0.14);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-slide img,
.detail-hero > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.12) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 55%, transparent 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 11%;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    z-index: 2;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-tags span,
.detail-tags span,
.movie-meta span,
.ranking-meta span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(103, 232, 249, 0.25);
    background: rgba(15, 23, 42, 0.58);
    color: #bae6fd;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
}

.hero-content h1,
.detail-hero-content h1,
.page-hero h1 {
    margin: 0 0 18px;
    max-width: 820px;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 14px 42px rgba(0, 0, 0, 0.52);
}

.hero-content p,
.detail-hero-content p,
.page-hero p {
    max-width: 760px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.center-action {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

.primary-button {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #00111f;
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.32);
}

.ghost-button {
    border: 1px solid rgba(125, 211, 252, 0.36);
    background: rgba(15, 23, 42, 0.56);
    color: #e0f2fe;
}

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

.hero-dots {
    position: absolute;
    right: 42px;
    bottom: 42px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

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

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

.home-shell,
.detail-shell {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 56px 0;
}

.content-section {
    margin-bottom: 76px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.section-title > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
    border: 1px solid var(--line);
}

.section-title h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.section-title p {
    margin: 5px 0 0;
    color: var(--muted);
}

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

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

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

.poster-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    padding: 28px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.22), rgba(88, 28, 135, 0.18));
}

.movie-card,
.ranking-card,
.category-panel,
.category-tile {
    background: var(--bg-card);
    border: 1px solid rgba(96, 165, 250, 0.16);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover,
.ranking-card:hover,
.category-panel:hover,
.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(15, 23, 42, 0.95);
}

.poster {
    position: relative;
    margin: 0;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.45));
}

.poster img,
.ranking-poster img,
.category-tile img,
.category-panel-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover .poster img,
.ranking-card:hover .ranking-poster img,
.category-tile:hover img,
.category-panel:hover img {
    transform: scale(1.08);
}

.poster::after {
    content: "";
    position: absolute;
    inset: 30% 0 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.poster-year,
.poster-score,
.rank-number,
.list-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}

.poster-year {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: rgba(2, 6, 23, 0.72);
    color: #e0f2fe;
}

.poster-score {
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    background: var(--yellow);
    color: #111827;
}

.rank-number,
.list-rank {
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: var(--red);
    color: #fff;
}

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

.movie-card h3,
.ranking-info h3,
.category-panel h2,
.category-tile h3 {
    margin: 0 0 9px;
    color: #f8fafc;
    line-height: 1.35;
}

.movie-card p,
.ranking-info p,
.category-panel p,
.category-tile p {
    margin: 0;
    color: var(--muted);
}

.movie-card p,
.ranking-info p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

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

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

.ranking-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    min-height: 158px;
}

.ranking-poster {
    position: relative;
    min-height: 158px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.65);
}

.ranking-info {
    padding: 18px;
}

.glow-section {
    position: relative;
}

.glow-section::before {
    content: "";
    position: absolute;
    inset: -24px;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.11), transparent 62%);
    filter: blur(10px);
}

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

.category-tile {
    position: relative;
    min-height: 220px;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.category-tile > div {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
}

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

.category-panel {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.category-panel-cover {
    min-height: 220px;
    overflow: hidden;
}

.category-panel-body {
    padding: 24px;
}

.category-mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-mini-links a {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
    font-size: 13px;
}

.page-hero,
.detail-hero {
    position: relative;
    min-height: 420px;
    display: grid;
    align-items: end;
    overflow: hidden;
    background: #020617;
}

.small-hero {
    min-height: 330px;
    padding: 72px 0 54px;
    background:
        radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.22), transparent 28%),
        radial-gradient(circle at 84% 30%, rgba(59, 130, 246, 0.22), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.54));
}

.page-hero > div,
.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #a5f3fc;
    border: 1px solid rgba(103, 232, 249, 0.3);
    background: rgba(15, 23, 42, 0.58);
}

.search-panel {
    margin-bottom: 32px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(15, 23, 42, 0.7);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.search-box {
    flex: 1 1 320px;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(103, 232, 249, 0.18);
}

.search-box span {
    color: #a5f3fc;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.filter-chip {
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    background: rgba(34, 211, 238, 0.24);
    color: #fff;
}

.movie-card.is-hidden {
    display: none;
}

.detail-hero {
    min-height: 560px;
}

.detail-hero-content {
    padding-bottom: 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: #bfdbfe;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(103, 232, 249, 0.22);
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 5px;
    color: #00111f;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 44px rgba(34, 211, 238, 0.55);
    font-size: 34px;
}

.play-overlay.is-hidden {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin: 32px 0 70px;
}

.detail-main,
.detail-side {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid rgba(96, 165, 250, 0.17);
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 14px;
}

.detail-main p {
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 17px;
}

.detail-side dl,
.detail-side dd {
    margin: 0;
}

.detail-side div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(96, 165, 250, 0.14);
}

.detail-side dt {
    color: var(--muted);
}

.detail-side dd {
    text-align: right;
    color: #e0f2fe;
}

.related-section {
    margin-bottom: 20px;
}

.site-footer {
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), #020617);
}

.footer-inner {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

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

    .hero-content h1,
    .detail-hero-content h1,
    .page-hero h1 {
        font-size: clamp(34px, 12vw, 54px);
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 24px;
    }

    .movie-grid,
    .featured-grid,
    .category-movie-grid,
    .poster-strip,
    .ranking-grid,
    .ranking-list,
    .category-grid,
    .category-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .category-panel-cover {
        aspect-ratio: 16 / 9;
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .home-shell,
    .detail-shell,
    .footer-inner,
    .page-hero > div,
    .detail-hero-content {
        width: calc(100% - 28px);
        padding-left: 0;
        padding-right: 0;
    }

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

    .hero-carousel {
        min-height: 600px;
    }

    .hero-content {
        width: calc(100% - 28px);
        bottom: 14%;
    }

    .movie-grid,
    .featured-grid,
    .category-movie-grid,
    .poster-strip,
    .ranking-grid,
    .ranking-list,
    .category-grid,
    .category-panels {
        grid-template-columns: 1fr;
    }

    .poster-strip {
        padding: 18px;
    }

    .ranking-card {
        grid-template-columns: 104px 1fr;
    }

    .ranking-poster {
        min-height: 142px;
    }

    .search-panel {
        padding: 14px;
    }

    .detail-hero {
        min-height: 500px;
    }

    .play-overlay span {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}
