* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --primary: #059669;
    --primary-dark: #047857;
    --secondary: #0e7490;
    --accent: #f59e0b;
    --rose: #e11d48;
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef9f7 42%, #f8fafc 100%);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #059669 0%, #0d9488 48%, #0891b2 100%);
    box-shadow: 0 12px 30px rgba(4, 120, 87, 0.24);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #facc15, #fb7185);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(250, 204, 21, 0.3);
}

.brand-name {
    font-size: 24px;
    letter-spacing: 0.03em;
}

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

.nav-link {
    position: relative;
    padding: 24px 0;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fde68a;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    height: 3px;
    border-radius: 999px;
    background: #fde68a;
}

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

.header-search input,
.mobile-search input,
.big-search input,
.inline-filter input {
    border: 0;
    outline: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.header-search input {
    width: 240px;
    padding: 11px 16px;
}

.header-search button,
.mobile-search button,
.big-search button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #e11d48);
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(225, 29, 72, 0.28);
}

.mobile-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    width: 44px;
    height: 44px;
    border-radius: 14px;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 20px;
}

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

.mobile-panel nav,
.mobile-cats {
    display: grid;
    gap: 12px;
}

.mobile-cats {
    margin-top: 14px;
    grid-template-columns: repeat(2, 1fr);
}

.mobile-cats a {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    background: #031c1a;
    color: #ffffff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    min-height: 650px;
    opacity: 0;
    pointer-events: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 44px;
    padding: 72px max(24px, calc((100vw - 1280px) / 2 + 24px)) 92px;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-bg img {
    filter: blur(16px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.46;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 28, 26, 0.96), rgba(3, 28, 26, 0.66) 50%, rgba(6, 78, 59, 0.82)), radial-gradient(circle at 28% 22%, rgba(20, 184, 166, 0.42), transparent 32%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

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

.hero-content h1 {
    max-width: 760px;
    margin: 18px 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 24px 0 30px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.24);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-poster {
    height: 480px;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    border-radius: inherit;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    bottom: 36px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    border: 0;
    width: 36px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.active {
    background: #facc15;
}

.quick-panel,
.content-section,
.category-showcase,
.page-main,
.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.quick-panel {
    margin-top: -58px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
}

.quick-search-card,
.hero-list-card,
.category-block,
.story-panel,
.category-overview-card,
.page-hero,
.detail-hero {
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.quick-search-card {
    padding: 34px;
}

.quick-search-card h2,
.section-head h2,
.category-block h2,
.story-panel h2,
.page-hero h1,
.detail-info h1 {
    margin: 8px 0 0;
    letter-spacing: -0.03em;
}

.quick-search-card h2 {
    font-size: clamp(30px, 4vw, 46px);
}

.big-search {
    margin-top: 24px;
}

.big-search input {
    min-width: min(520px, 100%);
    padding: 15px 20px;
}

.big-search button {
    padding: 15px 24px;
}

.hero-list-card {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.horizontal-poster {
    height: 112px;
    border-radius: 14px;
    overflow: hidden;
    background: #dbeafe;
}

.horizontal-rank {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.horizontal-rank strong {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #e11d48);
}

.horizontal-card h2 {
    margin: 4px 0;
    font-size: 17px;
}

.horizontal-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.content-section,
.category-showcase {
    padding-top: 70px;
    padding-bottom: 18px;
}

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

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

.section-head a,
.text-link {
    color: var(--primary-dark);
    font-weight: 800;
}

.section-head.light,
.section-head.light a {
    color: #ffffff;
}

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

.catalog-grid {
    align-items: stretch;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    height: 310px;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

.movie-card-compact .poster-wrap {
    height: 220px;
}

.poster-wrap img {
    transition: transform 0.35s ease;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: #ffffff;
    font-weight: 800;
}

.play-chip {
    right: 14px;
    bottom: 14px;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
}

.rank-badge {
    left: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #e11d48);
}

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

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

.movie-card h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 44px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.movie-card .tag-row span {
    background: #ecfeff;
    color: #0e7490;
}

.category-showcase {
    display: grid;
    gap: 24px;
}

.category-block {
    padding: 24px;
}

.section-head.mini {
    align-items: center;
    margin-bottom: 18px;
}

.section-head.mini h2 {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: 0;
    font-weight: 500;
}

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

.gradient-section {
    max-width: none;
    margin-top: 70px;
    padding: 70px max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: radial-gradient(circle at 10% 20%, rgba(250, 204, 21, 0.24), transparent 28%), linear-gradient(135deg, #064e3b, #0f766e 46%, #155e75);
}

.page-main {
    padding-top: 42px;
    padding-bottom: 80px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 46px;
    margin-bottom: 38px;
    background: linear-gradient(135deg, #064e3b, #0f766e 55%, #0891b2);
    color: #ffffff;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -110px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.18);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.75;
}

.compact-hero h1 {
    font-size: clamp(36px, 5vw, 58px);
}

.category-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 30px;
    align-items: center;
}

.category-top-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
}

.in-hero input {
    min-width: min(460px, 100%);
}

.inline-filter {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 700;
}

.inline-filter input {
    width: 290px;
    padding: 12px 16px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 18px;
}

.category-cover {
    position: relative;
    height: 156px;
    overflow: hidden;
    border-radius: 18px;
}

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

.category-cover span {
    position: absolute;
    z-index: 1;
    left: 16px;
    bottom: 14px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

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

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    margin: 0 0 22px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    padding: 30px;
    margin-bottom: 34px;
}

.detail-poster {
    height: 468px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #dbeafe);
    box-shadow: var(--shadow-soft);
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.lead-text {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.75;
}

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

.detail-meta div {
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.detail-meta dt {
    color: var(--muted);
    font-size: 13px;
}

.detail-meta dd {
    margin: 5px 0 0;
    font-weight: 800;
}

.big-tags {
    margin-bottom: 26px;
}

.big-tags span {
    color: #065f46;
    background: #d1fae5;
}

.player-section {
    margin: 34px 0;
    padding: 26px;
    border-radius: 28px;
    color: #ffffff;
    background: linear-gradient(135deg, #020617, #064e3b 54%, #155e75);
    box-shadow: var(--shadow);
}

.section-head.compact {
    margin-bottom: 18px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.62));
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    box-shadow: 0 20px 46px rgba(6, 182, 212, 0.36);
    font-size: 34px;
    text-indent: 5px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
}

.story-panel {
    padding: 30px;
}

.story-panel p {
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

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

.related-section {
    padding-left: 0;
    padding-right: 0;
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #064e3b);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 32px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
}

.site-footer h2 {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    line-height: 1.8;
}

.site-footer a {
    display: inline-flex;
    margin: 0 14px 10px 0;
    color: #a7f3d0;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

.no-results {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    border-radius: var(--radius);
    color: var(--muted);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

    .hero-slide,
    .quick-panel,
    .category-hero,
    .detail-hero,
    .detail-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .quick-panel {
        margin-top: -36px;
    }

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

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .header-inner {
        min-height: 64px;
        gap: 12px;
        padding: 0 16px;
    }

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

    .hero-carousel,
    .hero-slide {
        min-height: 580px;
    }

    .hero-slide {
        padding: 54px 18px 84px;
    }

    .hero-content p {
        font-size: 17px;
    }

    .quick-panel,
    .content-section,
    .category-showcase,
    .page-main,
    .detail-main {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

    .movie-grid,
    .mini-grid,
    .category-overview-grid,
    .ranking-list,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-poster {
        max-width: 380px;
        height: 520px;
    }
}

@media (max-width: 560px) {
    .mobile-cats,
    .movie-grid,
    .mini-grid,
    .category-overview-grid,
    .ranking-list,
    .footer-grid,
    .detail-meta {
        grid-template-columns: 1fr;
    }

    .quick-search-card,
    .page-hero,
    .detail-hero,
    .story-panel,
    .player-section {
        padding: 22px;
        border-radius: 20px;
    }

    .big-search {
        align-items: stretch;
        flex-direction: column;
    }

    .big-search input {
        min-width: 0;
        width: 100%;
    }

    .inline-filter {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .inline-filter input {
        width: 100%;
    }

    .poster-wrap {
        height: 360px;
    }

    .detail-poster {
        width: 100%;
        height: 460px;
    }
}
