:root {
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    --cyan-800: #155e75;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-hover: 0 26px 70px rgba(8, 145, 178, 0.18);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(135deg, var(--cyan-700), var(--cyan-800));
    box-shadow: 0 10px 30px rgba(14, 116, 144, 0.26);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: var(--cyan-800);
    background: #fff;
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.24);
    font-size: 14px;
}

.brand-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fff;
    transform: translateY(-1px);
}

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

.header-search {
    width: 270px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.header-search input,
.mobile-search input,
.big-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: inherit;
    background: transparent;
}

.header-search input {
    padding: 10px 12px 10px 16px;
    color: #fff;
}

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

.header-search button,
.mobile-search button,
.big-search button,
.filter-panel button {
    border: 0;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    background: var(--cyan-600);
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.filter-panel button:hover {
    background: var(--cyan-700);
    transform: translateY(-1px);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    display: none;
    place-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    background: #fff;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--cyan-800);
}

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

.mobile-panel a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 8px 0;
}

.mobile-search {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-search input {
    padding: 12px 16px;
    color: #fff;
}

.mobile-search button {
    padding: 12px 18px;
}

.hero {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    color: #fff;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img,
.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide img.is-missing,
.detail-bg img.is-missing,
.detail-poster img.is-missing,
.poster-frame img.is-missing,
.video-shell video[poster].is-missing {
    opacity: 0;
}

.hero-mask,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.48) 46%, rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    min-height: 68vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 150px;
    padding-bottom: 86px;
}

.hero-pill,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-pill {
    padding: 7px 14px;
    color: #fff;
    background: var(--cyan-600);
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.32);
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    max-width: 820px;
    margin: 20px 0 16px;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.7;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    min-height: 48px;
    padding: 0 26px;
    color: #fff;
    background: var(--cyan-600);
    box-shadow: 0 18px 45px rgba(8, 145, 178, 0.35);
}

.primary-btn:hover {
    background: var(--cyan-700);
    transform: translateY(-2px);
}

.ghost-btn {
    min-height: 48px;
    padding: 0 24px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 30px;
    background: #fff;
}

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

.section-white {
    background: #fff;
}

.intro-section {
    padding: 54px 0;
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 32px;
    align-items: center;
}

.intro-grid h2,
.section-head h2,
.story-card h2 {
    margin: 8px 0 0;
    color: var(--slate-800);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.intro-grid p {
    margin: 18px 0 0;
    color: var(--slate-500);
    font-size: 18px;
    line-height: 1.8;
}

.section-kicker {
    padding: 6px 12px;
    color: var(--cyan-700);
    background: var(--cyan-50);
    font-size: 14px;
}

.big-search {
    min-height: 62px;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-soft);
}

.big-search input {
    padding: 0 22px;
    color: var(--slate-800);
}

.big-search button {
    align-self: stretch;
    padding: 0 28px;
}

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

.section-more {
    color: var(--cyan-700);
    border: 1px solid var(--cyan-100);
    background: var(--cyan-50);
    padding: 10px 18px;
}

.section-more:hover {
    color: #fff;
    background: var(--cyan-600);
    border-color: var(--cyan-600);
}

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

.movie-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 320px);
    gap: 20px;
    overflow-x: auto;
    padding: 6px 2px 20px;
    scroll-snap-type: x mandatory;
}

.rail-item {
    scroll-snap-align: start;
}

.movie-card {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    color: inherit;
    text-decoration: none;
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cyan-100), var(--slate-200));
}

.poster-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 55%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.6), transparent);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan-500), var(--cyan-700));
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.35);
}

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

.meta-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}

.meta-row span,
.detail-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--slate-100);
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: var(--slate-800);
    font-size: 19px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h3 a {
    color: inherit;
    text-decoration: none;
}

.movie-card h3 a:hover {
    color: var(--cyan-700);
}

.movie-card p {
    margin: 0;
    min-height: 3.4em;
    color: var(--slate-500);
    font-size: 14px;
    line-height: 1.7;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--cyan-700);
    background: var(--cyan-50);
    font-size: 12px;
    font-weight: 800;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.26), transparent 35%), linear-gradient(135deg, var(--slate-900), var(--cyan-800));
}

.compact-hero {
    padding: 92px 0 72px;
}

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

.slim-actions {
    margin-top: 22px;
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card > a {
    display: block;
    min-height: 190px;
    padding: 26px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--cyan-600), var(--cyan-800));
}

.category-card span {
    display: inline-block;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 800;
}

.category-card h2 {
    margin: 18px 0 10px;
    font-size: 28px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.category-samples {
    display: grid;
    gap: 10px;
    padding: 20px 26px 24px;
}

.category-samples a {
    color: var(--slate-700);
    text-decoration: none;
    font-weight: 700;
}

.category-samples a:hover {
    color: var(--cyan-700);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(130px, 1fr)) auto;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-xl);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--slate-800);
    background: #fff;
    outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.filter-panel button {
    min-height: 48px;
    border-radius: 14px;
    padding: 0 18px;
}

.empty-state {
    padding: 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--slate-500);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: var(--slate-900);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.55;
    filter: blur(3px) scale(1.02);
}

.detail-wrap {
    position: relative;
    padding: 46px 0 68px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

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

.breadcrumb a:hover {
    color: #fff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--cyan-100), var(--slate-200));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    margin-top: 18px;
}

.detail-meta {
    margin: 18px 0;
}

.detail-meta span {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.large-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.player-section {
    padding: 48px 0;
    background: #050b16;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.18), rgba(0, 0, 0, 0.56));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--cyan-600);
    box-shadow: 0 20px 50px rgba(8, 145, 178, 0.36);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 18px;
}

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

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

.story-card {
    border-radius: var(--radius-xl);
    padding: 30px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.story-card p {
    margin: 18px 0 0;
    color: var(--slate-700);
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    color: rgba(255, 255, 255, 0.74);
    background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.site-footer p {
    margin: 12px 0 0;
    line-height: 1.8;
}

.site-footer a {
    display: block;
    margin: 9px 0;
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

    .menu-toggle {
        display: grid;
    }

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

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

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

    .hero,
    .hero-content {
        min-height: 72vh;
    }

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

    .detail-layout {
        align-items: start;
    }

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

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

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

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

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

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

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

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

    .movie-grid,
    .ranking-list,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .movie-rail {
        grid-auto-columns: minmax(245px, 82vw);
    }

    .big-search {
        align-items: stretch;
        border-radius: var(--radius-lg);
        flex-direction: column;
    }

    .big-search input {
        min-height: 56px;
    }

    .big-search button {
        min-height: 52px;
    }
}
