* {
    box-sizing: border-box;
}

:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --blue-700: #1d4ed8;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.08);
    --radius-xl: 26px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: linear-gradient(180deg, var(--slate-50) 0%, #ffffff 46%, var(--sky-50) 100%);
    color: var(--slate-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    min-height: 68vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--sky-600), var(--blue-700));
    color: var(--white);
    box-shadow: 0 14px 35px rgba(2, 132, 199, 0.26);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    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.28);
    font-weight: 900;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.02em;
}

.brand-text em {
    font-style: normal;
    font-size: 12px;
    opacity: 0.85;
}

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

.nav-link,
.mobile-nav-link {
    border-radius: 999px;
    padding: 9px 15px;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.nav-search {
    display: flex;
    align-items: center;
    height: 42px;
    border-radius: 999px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.nav-search input,
.mobile-search input {
    width: 210px;
    border: 0;
    outline: none;
    color: #ffffff;
    background: transparent;
    padding: 0 12px;
}

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

.nav-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    color: var(--sky-600);
    background: #ffffff;
    padding: 7px 14px;
    font-weight: 700;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.nav-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.08);
}

.nav-strip-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 9px 0;
}

.nav-chip {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 13px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}

.mobile-panel {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

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

.mobile-search {
    display: flex;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 4px;
}

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: var(--slate-900);
    color: #ffffff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    align-items: center;
    gap: 48px;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 84px;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slider::before,
.hero-slider::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-slider::before {
    background: radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.42), transparent 34%), radial-gradient(circle at 82% 18%, rgba(29, 78, 216, 0.42), transparent 36%), linear-gradient(135deg, #0f172a 0%, #075985 48%, #1d4ed8 100%);
}

.hero-slider::after {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.55) 46%, rgba(15, 23, 42, 0.28));
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    border-radius: 999px;
    padding: 7px 13px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 720px;
    margin: 20px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2.2vw, 22px);
}

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

.btn-primary,
.btn-ghost,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 11px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: #ffffff;
    color: var(--sky-600);
    box-shadow: 0 16px 32px rgba(255, 255, 255, 0.2);
}

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

.btn-soft {
    background: var(--sky-100);
    color: var(--sky-600);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-tags span {
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.12);
    color: #bfdbfe;
    font-size: 14px;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    min-height: 460px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(29, 78, 216, 0.38));
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.42);
}

.hero-poster-card img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    opacity: 0.88;
}

.hero-poster-card img.is-broken {
    opacity: 0;
}

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.8));
}

.hero-poster-info {
    position: absolute;
    z-index: 2;
    left: 24px;
    right: 24px;
    bottom: 24px;
}

.hero-poster-info strong {
    display: block;
    font-size: 22px;
}

.hero-poster-info span {
    color: #dbeafe;
}

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

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

.hero-dot.is-active {
    background: #ffffff;
}

.page-hero {
    background: linear-gradient(135deg, var(--sky-500), var(--blue-700));
    color: #ffffff;
    padding: 66px 0;
}

.page-hero-inner,
.content-shell,
.section-block,
.footer-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: #dbeafe;
    font-size: 14px;
}

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

.section-block {
    padding: 56px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
}

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

.section-more {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--sky-600);
    background: var(--sky-100);
    font-weight: 800;
}

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

.category-card {
    min-height: 170px;
    border-radius: var(--radius-lg);
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-700));
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
}

.poster-frame {
    display: block;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--sky-100), #dbeafe 42%, #bfdbfe);
    overflow: hidden;
}

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

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

.poster-frame img.is-broken {
    opacity: 0;
}

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sky-600);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.2);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    padding: 0 8px;
    background: linear-gradient(135deg, #ffffff, #dbeafe);
    color: var(--sky-600);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

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

.movie-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--sky-600);
}

.movie-line {
    min-height: 44px;
    margin: 8px 0 12px;
    color: var(--slate-500);
    font-size: 14px;
}

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

.movie-meta span {
    border-radius: 999px;
    padding: 3px 8px;
    background: var(--slate-100);
}

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

.tag-row span {
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--sky-600);
    background: var(--sky-100);
    font-size: 12px;
    font-weight: 700;
}

.compact-card .movie-card-body {
    padding: 14px;
}

.compact-card .movie-line {
    display: none;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-radius: var(--radius-lg);
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-number {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-700));
    font-weight: 900;
}

.rank-row h3 {
    margin: 0;
    font-size: 18px;
}

.rank-row h3 a:hover {
    color: var(--sky-600);
}

.rank-row p {
    margin: 4px 0 0;
    color: var(--slate-500);
}

.rank-extra {
    color: var(--sky-600);
    font-weight: 900;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px 170px;
    gap: 12px;
    margin: 0 0 26px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.toolbar input,
.toolbar select {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 11px 14px;
    color: var(--slate-700);
    background: #ffffff;
    outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--sky-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.detail-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    padding: 44px 0 0;
}

.detail-main,
.detail-side,
.text-panel {
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.detail-main {
    overflow: hidden;
}

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.82));
    cursor: pointer;
}

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

.play-circle {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sky-600);
    font-size: 34px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.34);
}

.player-cover strong {
    display: block;
    font-size: 22px;
}

.detail-content {
    padding: 28px;
}

.detail-content h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.12;
}

.detail-content .lead {
    margin: 0 0 18px;
    color: var(--slate-700);
    font-size: 18px;
}

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

.info-item {
    border-radius: var(--radius-md);
    padding: 13px;
    background: var(--slate-100);
}

.info-item span {
    display: block;
    color: var(--slate-500);
    font-size: 13px;
}

.info-item strong {
    display: block;
    margin-top: 4px;
    color: var(--slate-900);
}

.text-panel {
    padding: 24px;
    margin-top: 22px;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: var(--slate-700);
}

.detail-side {
    align-self: start;
    padding: 20px;
    position: sticky;
    top: 106px;
}

.detail-cover {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--sky-100), #dbeafe);
}

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

.detail-cover img.is-broken {
    opacity: 0;
}

.side-title {
    margin: 18px 0 12px;
    font-size: 20px;
}

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    border-radius: 14px;
    padding: 11px 12px;
    background: var(--slate-100);
    color: var(--slate-700);
}

.side-links a:hover {
    color: var(--sky-600);
    background: var(--sky-100);
}

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

.search-panel {
    border-radius: var(--radius-xl);
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.search-large {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-large input {
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 14px 18px;
    outline: none;
}

.search-large button {
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-700));
    font-weight: 900;
    cursor: pointer;
}

.empty-state {
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    color: var(--slate-500);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-800), var(--slate-900));
}

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    display: inline-block;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.footer-shell p {
    max-width: 620px;
    margin: 0;
}

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

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

.footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

[hidden] {
    display: none !important;
}

@media (max-width: 1120px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 48px;
    }

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

    .hero-poster-card {
        min-height: 360px;
    }

    .hero-poster-card img {
        height: 390px;
    }

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

    .rank-layout,
    .detail-shell,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }

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

@media (max-width: 680px) {
    .brand-text em,
    .nav-strip {
        display: none;
    }

    .nav-shell {
        height: 64px;
    }

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

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

    .hero-poster-card img {
        height: 330px;
    }

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

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

    .toolbar,
    .info-grid,
    .search-large {
        grid-template-columns: 1fr;
    }

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

    .rank-extra {
        grid-column: 2;
    }
}

@media (max-width: 440px) {
    .movie-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-ghost,
    .btn-soft {
        width: 100%;
    }
}
