:root {
    color-scheme: dark;
    --bg: #090a12;
    --bg-soft: #111322;
    --surface: rgba(20, 22, 38, 0.82);
    --surface-strong: rgba(30, 34, 56, 0.94);
    --text: #f7f8ff;
    --muted: #aeb4c9;
    --line: rgba(255, 255, 255, 0.12);
    --brand: #8b5cf6;
    --brand-2: #ec4899;
    --brand-3: #22d3ee;
    --radius: 24px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 10%, rgba(139, 92, 246, 0.22), transparent 32rem),
        radial-gradient(circle at 80% 0%, rgba(236, 72, 153, 0.16), transparent 30rem),
        linear-gradient(180deg, #070812 0%, #111323 48%, #080910 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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;
    border-bottom: 1px solid var(--line);
    background: rgba(9, 10, 18, 0.72);
    backdrop-filter: blur(20px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 34px rgba(139, 92, 246, 0.38);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--muted);
    transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    width: 42px;
    height: 42px;
    padding: 9px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 99px;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

.surface {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(236, 72, 153, 0.14));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 7, 12, 0.92) 0%, rgba(6, 7, 12, 0.68) 48%, rgba(6, 7, 12, 0.12) 100%),
        linear-gradient(0deg, rgba(6, 7, 12, 0.88) 0%, transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 96px 54px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d7c8ff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0 18px;
    font-size: clamp(34px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.search-panel p,
.section-heading p,
.detail-copy .lead {
    color: var(--muted);
    font-size: 17px;
    max-width: 760px;
}

.hero-actions,
.footer-links,
.tag-row,
.filter-buttons,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.primary-btn,
.ghost-btn,
.section-more,
.category-tile,
.filter-buttons button,
.tag-row a,
.tag-row span,
.tag-cloud span,
.info-grid a {
    border: 1px solid var(--line);
    border-radius: 999px;
}

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 800;
}

.primary-btn {
    border: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: white;
    box-shadow: 0 14px 34px rgba(236, 72, 153, 0.24);
}

.ghost-btn,
.section-more {
    background: rgba(255, 255, 255, 0.08);
}

.full {
    width: 100%;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 54px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.hero-dots button.active {
    width: 54px;
    background: white;
}

.search-panel,
.filter-bar,
.page-hero {
    margin-top: 28px;
    padding: 28px;
}

.search-panel,
.filter-bar {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 22px;
    align-items: center;
}

.search-box {
    display: grid;
    gap: 8px;
}

.search-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    outline: 0;
    padding: 14px 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.wide {
    min-width: 280px;
}

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

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

.section-heading h2,
.rank-panel h2,
.article-section h2,
.player-heading h2,
.category-card h2,
.ranking-card h2 {
    margin: 6px 0;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.1);
}

.poster-link,
.ranking-poster,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.12));
}

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

.score-badge,
.detail-poster span,
.ranking-poster span {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.card-content {
    padding: 15px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 17px;
    line-height: 1.25;
}

.movie-card p,
.ranking-card p,
.article-section p {
    color: var(--muted);
}

.tag-row a,
.tag-row span,
.tag-cloud span,
.info-grid a {
    padding: 5px 10px;
    color: #dbe3ff;
    background: rgba(255, 255, 255, 0.07);
    font-size: 12px;
}

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

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

.category-tile {
    display: grid;
    gap: 8px;
    padding: 18px;
    min-height: 128px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08));
    transition: transform 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile strong {
    color: var(--muted);
    font-size: 14px;
}

.rank-panel {
    padding: 24px;
    position: sticky;
    top: 92px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.rank-row span {
    color: #d7c8ff;
    font-weight: 900;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

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

.category-card {
    transition: transform 0.22s ease;
}

.category-card a {
    display: grid;
    gap: 12px;
    min-height: 230px;
    padding: 26px;
}

.category-card p {
    color: var(--muted);
}

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

.filter-buttons button {
    padding: 9px 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: var(--text);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.52), rgba(236, 72, 153, 0.38));
}

.result-count {
    color: var(--muted);
    font-size: 14px;
}

.ranking-list {
    display: grid;
    gap: 16px;
    padding-top: 28px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 18px;
    padding: 16px;
}

.ranking-poster img {
    width: 128px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 18px;
    color: var(--muted);
}

.breadcrumb a {
    color: #d7c8ff;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 28px;
    padding: 28px;
}

.detail-poster {
    border-radius: 24px;
}

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

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

.info-grid div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.info-grid strong {
    color: var(--muted);
    font-size: 12px;
}

.player-section,
.article-section {
    margin-top: 28px;
    padding: 24px;
}

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

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

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #02030a;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7));
    cursor: pointer;
}

.player-start span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 44px rgba(236, 72, 153, 0.32);
    font-size: 28px;
}

.player-shell.is-playing .player-start {
    display: none;
}

.article-section h2 {
    font-size: 26px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
}

.footer-inner strong {
    color: var(--text);
    font-size: 18px;
}

.footer-links a {
    color: #d7c8ff;
}

[data-card].is-hidden {
    display: none;
}

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

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

    .rank-panel {
        position: static;
    }

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

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

    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        right: 16px;
        left: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(9, 10, 18, 0.96);
    }

    .main-nav.open {
        display: flex;
    }

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

    .hero-content {
        padding: 68px 24px;
    }

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

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

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

    .category-grid,
    .category-list-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-poster img {
        width: 92px;
    }

    .footer-inner {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    main {
        width: min(100% - 20px, 1180px);
        padding-top: 16px;
    }

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

    .page-hero,
    .search-panel,
    .filter-bar,
    .detail-hero,
    .player-section,
    .article-section {
        padding: 18px;
        border-radius: 20px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }
}
