:root {
    color-scheme: light;
    --teal-900: #0f3d3e;
    --teal-800: #115e59;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --cyan-600: #0891b2;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-soft: 0 24px 70px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 18px 42px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--slate-900);
    background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 46%, #ecfeff 100%);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(8, 145, 178, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 38px rgba(8, 47, 73, 0.18);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}

.nav-link {
    padding: 9px 13px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 300px;
}

.header-search input,
.big-search input {
    width: 100%;
    border: 0;
    border-radius: 16px;
    outline: 0;
    padding: 12px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.header-search input::placeholder,
.big-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.big-search button {
    border: 0;
    border-radius: 16px;
    padding: 12px 16px;
    color: var(--teal-800);
    background: var(--white);
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--white);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-panel a {
    padding: 11px 14px;
    color: var(--white);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 700;
}

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

main,
.page-main,
.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    width: min(1400px, calc(100% - 32px));
    min-height: clamp(560px, 72vh, 780px);
    margin: 28px auto 72px;
    overflow: hidden;
    border-radius: 36px;
    background: var(--slate-950);
    box-shadow: var(--shadow-soft);
}

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

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

.hero-image {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 22%, rgba(20, 184, 166, 0.38), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.66) 46%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 42%);
}

.hero-content {
    position: absolute;
    left: clamp(26px, 7vw, 84px);
    bottom: clamp(42px, 8vw, 92px);
    width: min(680px, calc(100% - 48px));
    color: var(--white);
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    color: #ccfbf1;
    background: rgba(13, 148, 136, 0.24);
    border: 1px solid rgba(153, 246, 228, 0.38);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 7vw, 84px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
}

.card-meta span,
.rank-meta span,
.detail-meta span {
    background: #e0f2fe;
    color: #075985;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.pill-link,
.rank-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
    box-shadow: 0 16px 36px rgba(8, 145, 178, 0.26);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.ghost-button.dark {
    color: var(--teal-800);
    background: #ecfeff;
    box-shadow: inset 0 0 0 1px #a5f3fc;
}

.primary-button:hover,
.ghost-button:hover,
.pill-link:hover,
.rank-action:hover {
    transform: translateY(-2px);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.intro-band,
.content-section,
.filter-panel,
.category-preview,
.page-hero,
.detail-content {
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(15, 118, 110, 0.08);
}

.intro-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    gap: 28px;
    align-items: center;
    padding: clamp(28px, 5vw, 48px);
    margin-bottom: 54px;
}

.intro-band h2,
.section-head h2,
.page-hero h1,
.category-preview h2,
.detail-copy h1 {
    margin: 12px 0 8px;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.big-search {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--teal-700), var(--cyan-600));
}

.content-section,
.category-preview {
    padding: clamp(24px, 4vw, 38px);
    margin-bottom: 54px;
}

.soft-panel {
    background: linear-gradient(135deg, #ecfeff, #f8fafc);
}

.rank-panel {
    background: linear-gradient(135deg, #0f172a, #134e4a 52%, #164e63);
    color: var(--white);
}

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

.section-head a,
.category-preview-head a,
.pill-link {
    color: var(--teal-700);
    font-weight: 900;
}

.rank-panel .section-head a {
    color: #a5f3fc;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--teal-800), var(--cyan-600));
}

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

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

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.32;
}

.movie-card p {
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--teal-700);
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    padding: 20px;
    overflow: hidden;
    border-radius: 24px;
    color: var(--white);
    background: var(--slate-900);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.16);
}

.category-tile img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.88));
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 2;
}

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

.category-tile strong {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.82);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 86px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.93);
    color: var(--slate-900);
}

.rank-panel .rank-row {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.14);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
    font-weight: 900;
}

.rank-thumb {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: var(--slate-100);
}

.rank-thumb img {
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 19px;
}

.rank-info p {
    margin: 0 0 10px;
    color: inherit;
    opacity: 0.78;
}

.rank-action {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
}

.page-main,
.detail-main {
    padding: 34px 0 60px;
}

.page-hero {
    padding: clamp(32px, 6vw, 62px);
    margin-bottom: 34px;
    background:
        radial-gradient(circle at 86% 22%, rgba(20, 184, 166, 0.25), transparent 28%),
        linear-gradient(135deg, #ffffff, #ecfeff);
}

.category-hero,
.rank-hero,
.search-hero {
    background:
        radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(135deg, var(--slate-900), var(--teal-800) 54%, var(--cyan-600));
    color: var(--white);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-600);
    font-size: 18px;
}

.category-hero p,
.rank-hero p,
.search-hero p {
    color: rgba(255, 255, 255, 0.86);
}

.small-actions {
    margin-top: 18px;
}

.filter-panel {
    padding: 22px;
    margin-bottom: 30px;
}

.search-field input,
.filter-controls select {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 16px;
    padding: 13px 14px;
    background: var(--slate-100);
    color: var(--slate-900);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.filter-controls label span {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-600);
    font-weight: 800;
    font-size: 13px;
}

.list-section {
    background: rgba(255, 255, 255, 0.72);
}

.empty-state {
    margin: 24px 0 0;
    padding: 20px;
    border-radius: 18px;
    color: var(--slate-600);
    background: var(--slate-100);
    text-align: center;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--slate-600);
    font-weight: 700;
}

.breadcrumb a {
    color: var(--teal-700);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 30px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: var(--slate-950);
    box-shadow: var(--shadow-soft);
    min-height: 480px;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: contain;
    background: var(--slate-950);
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.23), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.58));
}

.player-box.is-playing .play-overlay {
    display: none;
}

.play-ring {
    position: absolute;
    width: 102px;
    height: 102px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 54px rgba(8, 145, 178, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(12px);
}

.play-triangle {
    position: relative;
    z-index: 2;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 32px solid var(--white);
}

.detail-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-side img {
    flex: 1;
    min-height: 390px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow-card);
}

.detail-actions {
    margin-top: 0;
}

.detail-actions .primary-button,
.detail-actions .ghost-button {
    flex: 1;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 30px;
    padding: clamp(26px, 5vw, 46px);
    margin-bottom: 52px;
}

.detail-copy h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-copy h2,
.detail-panel h2 {
    margin: 30px 0 10px;
    font-size: 24px;
}

.detail-copy p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

.detail-tags {
    margin: 18px 0 12px;
}

.detail-panel {
    align-self: start;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ecfeff, #f8fafc);
}

.detail-panel a {
    display: block;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--teal-800);
    background: var(--white);
    font-weight: 900;
}

.related-section {
    background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.site-footer {
    margin-top: 50px;
    color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(135deg, var(--slate-950), var(--teal-900));
}

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

.footer-brand {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--white);
    font-size: 22px;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

[hidden] {
    display: none !important;
}

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

    .header-search {
        margin-left: auto;
    }

    .menu-button {
        display: block;
    }

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .detail-side img {
        min-height: 280px;
    }
}

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

    .intro-band {
        grid-template-columns: 1fr;
    }

    .big-search {
        flex-direction: column;
    }

    .hero-carousel {
        min-height: 620px;
        border-radius: 26px;
    }

    .hero-content {
        left: 22px;
        bottom: 70px;
    }

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

    .section-head,
    .category-preview-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

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

    .rank-action {
        grid-column: 3;
        width: max-content;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    main,
    .page-main,
    .detail-main,
    .footer-inner,
    .mobile-panel {
        width: min(100% - 22px, 1280px);
    }

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

    .hero-carousel {
        width: calc(100% - 22px);
        margin-top: 16px;
        min-height: 560px;
    }

    .hero-meta span {
        font-size: 12px;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 64px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .rank-info p {
        display: none;
    }

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

    .player-box,
    .movie-player {
        min-height: 300px;
    }
}
