:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111827;
    --card: rgba(15, 23, 42, 0.9);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.16);
    --cyan: #22d3ee;
    --blue: #2563eb;
    --amber: #f59e0b;
    --rose: #fb7185;
    --radius: 20px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 15% 5%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.18), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(2, 6, 23, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.24);
    color: white;
    font-size: 24px;
}

.brand-text,
.footer-brand {
    font-size: 22px;
    background: linear-gradient(90deg, #e0f2fe, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

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

.header-search input,
.mobile-search input,
.large-search input,
.search-form input,
.search-form select,
.card-filter input {
    border: 1px solid var(--line);
    outline: none;
    color: white;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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

.header-search button,
.mobile-search button,
.large-search button,
.search-form button,
.primary-btn,
.ghost-btn,
.section-more,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-form button,
.primary-btn {
    padding: 11px 18px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
    font-weight: 800;
}

.header-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.search-form button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover {
    transform: translateY(-2px);
}

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

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
    background: rgba(2, 6, 23, 0.96);
}

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

.mobile-panel nav,
.mobile-cats {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-panel a,
.mobile-cats a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.75);
    color: #dbeafe;
}

.hero-slider {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
    padding: 92px max(32px, calc((100vw - 1180px) / 2)) 108px;
    background-position: center;
    background-size: cover;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-content {
    max-width: 760px;
}

.hero-kicker,
.page-hero p,
.section-head p,
.detail-kicker,
.card-meta,
.search-hero p {
    margin: 0 0 10px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 680px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: #cffafe;
    background: rgba(8, 47, 73, 0.44);
    font-size: 13px;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.ghost-btn,
.section-more,
.text-link {
    padding: 11px 18px;
    border: 1px solid rgba(203, 213, 225, 0.22);
    background: rgba(15, 23, 42, 0.52);
    color: #e0f2fe;
    font-weight: 700;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

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

.hero-prev,
.hero-next,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: white;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
}

.hero-dots {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.54);
}

.hero-dot {
    width: 26px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
    width: 42px;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.search-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -44px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 4;
}

.search-hero h2,
.page-hero h1,
.section-head h2,
.detail-copy h1 {
    margin: 0;
    letter-spacing: -0.04em;
}

.search-hero h2 {
    font-size: clamp(24px, 3vw, 38px);
}

.large-search input {
    width: 100%;
    padding: 15px 16px;
}

.large-search button {
    padding: 15px 22px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
    font-weight: 900;
}

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

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

.section-head h2 {
    font-size: clamp(28px, 4vw, 48px);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64));
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 72px rgba(2, 6, 23, 0.36);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.34s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(2, 6, 23, 0.92));
}

.play-mini {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.92);
    color: #082f49;
    font-size: 13px;
    font-weight: 900;
}

.rank-num {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    color: white;
    box-shadow: 0 12px 24px rgba(251, 113, 133, 0.28);
}

.card-body {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    letter-spacing: 0;
    text-transform: none;
}

.card-meta span {
    color: #bae6fd;
}

.card-body h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.32;
}

.card-body h2 a:hover,
.rank-info h2 a:hover {
    color: var(--cyan);
}

.card-body p {
    margin: 12px 0 0;
    min-height: 48px;
    color: var(--muted);
    line-height: 1.6;
}

.tag-row {
    margin-top: 16px;
    gap: 7px;
}

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

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

.category-card {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.25);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-card span {
    color: var(--cyan);
    font-weight: 800;
}

.category-card h2 {
    margin: 8px 0;
    font-size: 25px;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
}

.page-main,
.detail-main {
    padding-bottom: 72px;
}

.page-hero {
    padding: 86px 0 20px;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
}

.page-hero h2 {
    max-width: 780px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.8;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.overview-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.overview-thumbs img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

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

.category-overview-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.7;
}

.card-filter {
    display: grid;
    gap: 8px;
    min-width: 260px;
    color: var(--muted);
    font-size: 14px;
}

.card-filter input {
    width: 100%;
    padding: 12px 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 92px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.34);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.rank-cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-cover span {
    position: absolute;
    top: 8px;
    left: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--amber), var(--rose));
    font-weight: 900;
}

.rank-info h2 {
    margin: 0;
    font-size: 24px;
}

.rank-info p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.score-box {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 16px 8px;
    border-radius: 18px;
    background: rgba(34, 211, 238, 0.1);
    color: #cffafe;
}

.score-box strong {
    font-size: 30px;
    color: white;
}

.search-form {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    margin-bottom: 26px;
}

.search-form input {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px;
}

.search-form select {
    width: 180px;
    padding: 14px 16px;
}

.detail-hero {
    min-height: 620px;
    padding: 90px 0 70px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    margin-bottom: 34px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-copy h1 {
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
}

.detail-copy h2 {
    max-width: 780px;
    color: #dbeafe;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.8;
}

.detail-meta-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.detail-meta-list li {
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.6);
}

.detail-meta-list span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.detail-meta-list strong {
    color: white;
}

.player-section {
    margin-top: -58px;
    position: relative;
    z-index: 5;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: black;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 12px;
    align-content: center;
    width: 100%;
    border: 0;
    color: white;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.video-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.36);
    font-size: 30px;
    padding-left: 5px;
}

.player-cover strong {
    font-size: 20px;
    letter-spacing: 0.08em;
}

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

.detail-text article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

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

.compact-card .card-body p {
    min-height: auto;
}

.detail-neighbor-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
}

.detail-neighbor-links a {
    flex: 1;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
}

.detail-neighbor-links a:last-child {
    text-align: right;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.9);
    padding: 54px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 0.8fr;
    gap: 36px;
}

.footer-grid p {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

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

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

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

.footer-bottom {
    margin-top: 42px;
    padding: 20px;
    border-top: 1px solid var(--line);
    text-align: center;
    color: #64748b;
}

.hidden-card {
    display: none !important;
}

@media (max-width: 1040px) {
    .header-search {
        display: none;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 32px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding-top: 86px;
        padding-bottom: 110px;
    }

    .hero-poster {
        display: none;
    }

    .search-hero,
    .detail-layout,
    .detail-text,
    .category-overview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .large-search,
    .search-form,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .score-box {
        grid-column: 1 / -1;
        grid-template-columns: auto auto;
        justify-content: center;
    }

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

    .detail-poster {
        max-width: 280px;
    }
}

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

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

    .hero-slider {
        min-height: 700px;
    }

    .hero-slide {
        padding-left: 18px;
        padding-right: 18px;
    }

    .hero-content p,
    .detail-copy h2,
    .page-hero h2 {
        font-size: 16px;
    }

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

    .detail-meta-list,
    .footer-links {
        grid-template-columns: 1fr;
    }

    .detail-neighbor-links {
        flex-direction: column;
    }

    .detail-neighbor-links a:last-child {
        text-align: left;
    }
}
