* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

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

.nav-link {
    padding: 9px 14px;
    color: #475569;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: #dbeafe;
}

.header-search,
.mobile-search,
.hero-search {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-search input,
.mobile-search input,
.hero-search input {
    width: 210px;
    border: 0;
    outline: 0;
    padding: 12px 16px;
    background: transparent;
}

.header-search button,
.mobile-search button,
.hero-search button {
    border: 0;
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover {
    background: var(--primary-dark);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 4px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
    background: white;
}

.mobile-panel.open {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
}

.hero-section {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 48%, #faf5ff 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    background-image: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.14), transparent 25%), radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.14), transparent 26%), radial-gradient(circle at 50% 90%, rgba(245, 158, 11, 0.12), transparent 28%);
}

.hero-shell {
    position: relative;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 74px 0 54px;
}

.hero-slider {
    position: relative;
    min-height: 470px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: 52px;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--primary);
    background: #dbeafe;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 680px;
    color: #475569;
    font-size: 18px;
    margin: 22px 0 0;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 999px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.btn.primary {
    color: white;
    background: var(--primary);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.32);
}

.btn.ghost {
    color: var(--primary);
    background: white;
    border: 1px solid #bfdbfe;
}

.btn.ghost:hover {
    background: #eff6ff;
    transform: translateY(-2px);
}

.btn.text {
    color: #334155;
    background: transparent;
}

.btn.wide {
    width: 100%;
    margin-top: 28px;
}

.hero-poster {
    position: relative;
    width: min(360px, 100%);
    justify-self: center;
    border-radius: 34px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) translateY(-6px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: linear-gradient(135deg, #dbeafe, #f5f3ff);
}

.hero-play,
.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    color: white;
    background: rgba(37, 99, 235, 0.92);
    border-radius: 999px;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);
    font-size: 28px;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    color: var(--primary);
    background: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #bfdbfe;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 28px;
    background: var(--primary);
}

.hero-search {
    margin-top: 30px;
    width: min(720px, 100%);
}

.hero-search input {
    flex: 1;
    width: auto;
    padding: 16px 20px;
}

.hero-search button {
    padding: 16px 26px;
}

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

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

.section-heading h2,
.related-panel h2,
.synopsis-card h2,
.site-footer h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.section-link {
    color: var(--primary);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow-soft);
}

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #f5f3ff);
}

.card-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.25s ease;
}

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

.play-pill {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: white;
    background: rgba(37, 99, 235, 0.9);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.26);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: block;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.35;
    color: #0f172a;
}

.card-body p {
    min-height: 44px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.card-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #cbd5e1;
}

.card-body .tag-row {
    gap: 6px;
    margin-top: 10px;
}

.card-body .tag-row span {
    padding: 4px 7px;
    font-size: 11px;
    background: #f8fafc;
}

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

.category-tile,
.category-card-large a {
    display: block;
    min-height: 150px;
    padding: 24px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large a:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
}

.category-tile span,
.category-card-large span {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small,
.category-card-large p {
    display: block;
    margin-top: 12px;
    color: #64748b;
}

.category-card-large b {
    display: inline-flex;
    margin-top: 20px;
    color: var(--primary);
}

.ranking-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
}

.compact-card .card-poster img {
    height: 100%;
    min-height: 168px;
}

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

.subpage-main {
    padding-bottom: 40px;
}

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

.soft-hero {
    background: linear-gradient(135deg, #eff6ff, #faf5ff);
}

.page-hero h1 {
    font-size: clamp(40px, 5vw, 60px);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-button {
    border: 1px solid #bfdbfe;
    background: white;
    color: var(--primary);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 800;
}

.filter-button.active,
.filter-button:hover {
    color: white;
    background: var(--primary);
}

.detail-hero {
    padding: 48px 0 58px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc 54%, #faf5ff);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 34px;
    align-items: center;
}

.breadcrumb {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-player video,
.video-player .player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.video-player video {
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #020617;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.62;
}

.player-cover.is-hidden {
    display: none;
}

.detail-info {
    padding: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-xl);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.detail-info h1 {
    font-size: clamp(34px, 4vw, 54px);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding-top: 44px;
}

.synopsis-card,
.related-panel {
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.synopsis-card h2 + p {
    margin-top: 14px;
}

.synopsis-card p {
    color: #475569;
    font-size: 17px;
}

.related-grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.search-layer {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.58);
    padding: 4vh 16px;
    overflow: auto;
}

.search-layer-panel {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 28px;
    background: white;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.search-close {
    float: right;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 26px;
    cursor: pointer;
}

.search-result-grid {
    clear: both;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.empty-state {
    padding: 32px;
    border-radius: 22px;
    background: #f8fafc;
    color: #64748b;
}

.site-footer {
    margin-top: 70px;
    padding: 54px 0 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: white;
}

.site-footer p {
    max-width: 480px;
    color: #94a3b8;
}

.site-footer h2 {
    color: white;
    font-size: 18px;
    margin-bottom: 14px;
}

.site-footer a:not(.site-logo) {
    display: block;
    color: #94a3b8;
    margin-top: 9px;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 36px;
    padding: 20px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
}

@media (max-width: 980px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-section,
    .hero-shell {
        min-height: auto;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 30px;
        align-content: center;
    }

    .hero-poster {
        width: min(290px, 86vw);
    }

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

    .detail-info {
        order: -1;
    }
}

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

    .header-inner {
        height: 64px;
    }

    .site-logo {
        font-size: 19px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .hero-shell {
        padding: 46px 0 34px;
    }

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

    .hero-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

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

    .hero-actions,
    .page-actions {
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search input,
    .hero-search button {
        width: 100%;
    }

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

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

    .compact-card {
        display: block;
    }

    .card-body {
        padding: 12px;
    }

    .card-body p {
        min-height: 40px;
    }

    .page-hero {
        padding: 56px 0 38px;
    }

    .detail-hero {
        padding: 28px 0 36px;
    }

    .detail-info,
    .synopsis-card,
    .related-panel,
    .search-layer-panel {
        padding: 20px;
        border-radius: 22px;
    }
}
