:root {
    --primary: #0891b2;
    --secondary: #2563eb;
    --accent: #14b8a6;
    --dark: #0f172a;
    --slate: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

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(--dark);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f1f5f9 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #2563eb 0%, #0891b2 52%, #0d9488 100%);
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.22);
}

.nav-wrap {
    width: min(1200px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    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);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(4deg);
}

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

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

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

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    height: 3px;
    border-radius: 999px;
    background: #ffffff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #ffffff;
}

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

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

.mobile-link {
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

main {
    min-height: 60vh;
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) saturate(1.08);
    transform: scale(1.08);
    opacity: 0.36;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 25%, rgba(20, 184, 166, 0.5), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.38));
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.55));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 56px;
    padding: 72px 0 82px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 14px;
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 11px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.34);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.3);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 16px 28px rgba(8, 145, 178, 0.34);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.quick-search button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    display: block;
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.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: 5;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: #ffffff;
}

.search-band,
.content-section,
.filter-panel,
.detail-content {
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    align-items: center;
    gap: 28px;
    margin-top: -52px;
    position: relative;
    z-index: 6;
    padding: 30px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(90deg, #2563eb, #0891b2, #0d9488);
    box-shadow: var(--shadow);
}

.search-band span {
    color: #cffafe;
    font-weight: 800;
}

.search-band h2 {
    margin: 6px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}

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

.quick-search input,
.filter-search input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 14px;
    color: var(--dark);
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
}

.quick-search input {
    min-height: 50px;
    padding: 0 16px;
}

.quick-search button {
    border: 0;
    padding: 0 22px;
    color: #0f172a;
    background: #ffffff;
    cursor: pointer;
}

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

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

.section-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-more {
    flex: none;
    min-height: 40px;
    padding: 0 16px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 22px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.46;
    transform: scale(1.04);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 20px;
    font-weight: 850;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.category-card:hover img {
    transform: scale(1.12);
    opacity: 0.58;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.card-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(8, 145, 178, 0.92);
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.3);
}

.card-body {
    padding: 16px;
}

.card-meta {
    min-height: 20px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card h2 {
    margin: 7px 0 6px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card.compact h2 {
    font-size: 16px;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 5px 9px;
    color: #0369a1;
    background: #e0f2fe;
}

.rank-section {
    padding-top: 72px;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 46px 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

.rank-number {
    color: #0891b2;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-info strong {
    color: #0f172a;
    font-size: 16px;
}

.rank-info em {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 20%, rgba(103, 232, 249, 0.35), transparent 28%),
        linear-gradient(90deg, #1d4ed8, #0891b2, #0f766e);
}

.page-hero > div {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 72px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-top: 28px;
    padding: 22px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-search input {
    min-height: 52px;
    padding: 0 16px;
    background: #f8fafc;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-buttons button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    color: #075985;
    font-weight: 800;
    background: #e0f2fe;
    cursor: pointer;
}

.filter-buttons button.active,
.filter-buttons button:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

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

.category-overview {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-covers img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: cover;
}

.category-overview span {
    color: var(--primary);
    font-weight: 850;
}

.category-overview h2 {
    margin: 6px 0 8px;
    font-size: 26px;
}

.category-overview p {
    margin: 0;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    margin: 42px auto 0;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
    color: #ffffff;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(34, 211, 238, 0.36), transparent 30%),
        linear-gradient(135deg, #0f172a, #164e63 52%, #0f766e);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #a5f3fc;
    font-weight: 750;
}

.detail-info h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.detail-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
}

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

.player-section {
    width: min(1100px, calc(100% - 32px));
    margin: 46px auto 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-cover.hidden {
    display: none;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    font-size: 36px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    box-shadow: 0 18px 40px rgba(8, 145, 178, 0.42);
}

.play-cover strong {
    max-width: min(760px, calc(100% - 48px));
    font-size: clamp(22px, 4vw, 38px);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
    gap: 24px;
    padding-top: 42px;
}

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

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

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.story-card p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.site-footer {
    margin-top: 78px;
    color: #e2e8f0;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 38px;
    padding: 48px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    color: #cbd5e1;
}

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

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #67e8f9;
}

.footer-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.12);
    padding: 18px 16px;
    color: #94a3b8;
    text-align: center;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1080px) {
    .category-grid,
    .small-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .hero-poster,
    .detail-poster {
        max-width: 320px;
    }

    .rank-list,
    .wide-rank,
    .detail-content,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-carousel,
    .hero-content {
        min-height: 680px;
    }

    .hero-content {
        padding-top: 48px;
        gap: 26px;
    }

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

    .search-band {
        grid-template-columns: 1fr;
        margin-top: -28px;
        padding: 22px;
    }

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

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

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

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

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

    .detail-hero {
        margin-top: 22px;
        padding: 22px;
    }

    .detail-info h1 {
        font-size: 34px;
    }

    .story-card {
        padding: 22px;
    }

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

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

    .hero-poster {
        max-width: 260px;
    }

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
