:root {
    --bg-dark: #0f172a;
    --bg-deep: #020617;
    --cyan: #06b6d4;
    --cyan-soft: rgba(6, 182, 212, 0.16);
    --blue: #2563eb;
    --orange: #f97316;
    --red: #ef4444;
    --text: #111827;
    --muted: #64748b;
    --light: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 52%, #0f172a 100%);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.nav-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.45);
    color: #fff;
    font-size: 16px;
}

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

.desktop-nav,
.sub-nav-inner,
.mobile-nav,
.mobile-category-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.sub-nav-inner a,
.mobile-nav a {
    border-radius: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.sub-nav-inner a:hover,
.mobile-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

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

.sub-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 24px;
    overflow-x: auto;
}

.sub-nav-inner a {
    white-space: nowrap;
    font-size: 14px;
    padding: 7px 12px;
}

.menu-toggle {
    display: none;
    color: #fff;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 9px 12px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    background: #0f172a;
}

.mobile-nav.open {
    display: flex;
}

.mobile-category-links {
    flex-wrap: wrap;
    align-items: flex-start;
    padding-top: 8px;
}

.hero {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #020617);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    width: min(760px, calc(100% - 40px));
    margin-left: max(24px, calc((100% - 1280px) / 2 + 24px));
    color: #fff;
    animation: fadeUp 0.7s ease both;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.25);
    backdrop-filter: blur(10px);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 22px 0 8px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 4vw, 42px);
    color: #cffafe;
    font-weight: 800;
}

.hero p,
.page-hero p,
.detail-info .lead {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(16px, 2.2vw, 22px);
}

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

.hero-tags span,
.detail-meta span,
.tag-pill {
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 14px;
}

.hero-actions,
.search-row,
.section-heading,
.category-overview-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.32);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 42px rgba(6, 182, 212, 0.42);
}

.primary-btn.small,
.ghost-btn.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn.dark {
    color: #0f172a;
    background: #fff;
    border-color: #e2e8f0;
}

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

.hero-dot {
    width: 32px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 52px;
    background: #22d3ee;
}

.search-band,
.section-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.search-band {
    padding-top: 32px;
    padding-bottom: 24px;
}

.search-panel,
.filter-panel,
.search-page-box,
.article-panel,
.player-card,
.category-overview-card {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.search-panel,
.filter-panel,
.search-page-box {
    padding: 24px;
}

.search-panel h2 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 900;
}

.search-panel p,
.section-heading p,
.category-overview-head p,
.article-panel p {
    color: var(--muted);
}

.search-input {
    width: min(520px, 100%);
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    outline: none;
    padding: 0 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.search-input.big {
    width: 100%;
    min-height: 58px;
    font-size: 18px;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading.center {
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.section-heading.light h2,
.section-heading.light p {
    color: #fff;
}

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

.section-heading a {
    color: var(--blue);
    font-weight: 800;
}

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

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

.movie-card,
.compact-card,
.ranking-item,
.category-tile {
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap img,
.compact-card img,
.ranking-item img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-wrap img {
    transition: transform 0.45s ease, opacity 0.45s ease;
}

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.84);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(6, 182, 212, 0.88);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-year,
.poster-region {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    right: 12px;
    background: rgba(15, 23, 42, 0.78);
}

.poster-region {
    left: 12px;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card-body p {
    min-height: 46px;
    margin: 0 0 14px;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.movie-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tinted {
    max-width: none;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(219, 234, 254, 0.75));
}

.warm {
    max-width: none;
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
}

.tinted > *,
.warm > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

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

.category-tile {
    min-height: 250px;
    border-radius: 20px;
    overflow: hidden;
    color: #fff;
    background-size: cover;
    background-position: center;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: var(--shadow);
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile span {
    align-self: flex-start;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(6, 182, 212, 0.82);
    font-weight: 800;
    margin-bottom: 10px;
}

.category-tile strong {
    font-size: 22px;
    line-height: 1.25;
}

.category-tile em {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.80);
    font-style: normal;
    font-size: 14px;
}

.dark-section {
    padding: 70px 0;
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #020617);
}

.no-pad {
    padding-top: 0;
    padding-bottom: 0;
}

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

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 46px 116px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border-radius: 16px;
    padding: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.ranking-list.large .ranking-item {
    color: #0f172a;
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ranking-item:hover {
    transform: translateY(-3px);
    background: rgba(30, 64, 175, 0.72);
}

.ranking-list.large .ranking-item:hover {
    color: #fff;
}

.rank-no {
    color: #67e8f9;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.ranking-item img {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

.ranking-text {
    min-width: 0;
}

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

.ranking-text strong {
    font-size: 17px;
    font-weight: 900;
}

.ranking-text em {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

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

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

.compact-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

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

.compact-card img {
    aspect-ratio: 3 / 4;
}

.compact-card span,
.compact-card small {
    display: block;
    padding: 0 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card span {
    padding-top: 12px;
    font-weight: 900;
}

.compact-card small {
    padding-bottom: 12px;
    color: #64748b;
}

.page-hero {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a, #020617);
    background-size: cover;
    background-position: center;
    padding: 94px 24px;
}

.page-hero.slim {
    padding: 86px 24px;
}

.page-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.category-hero {
    min-height: 370px;
    display: flex;
    align-items: center;
}

.filter-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.filter-line span {
    color: #0f172a;
    font-weight: 900;
}

.filter-line button,
.search-hints button {
    border: 0;
    border-radius: 999px;
    padding: 7px 12px;
    color: #475569;
    background: #e2e8f0;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-line button.active,
.filter-line button:hover,
.search-hints button:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.category-overview {
    display: grid;
    gap: 26px;
}

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    justify-content: space-between;
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 900;
}

.search-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.detail-hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.detail-container {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.72);
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
    aspect-ratio: 3 / 4;
}

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

.detail-main {
    padding-top: 42px;
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: #020617;
}

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

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

.video-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.25), rgba(2, 6, 23, 0.72));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-cover span {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 48px rgba(6, 182, 212, 0.48);
    font-size: 34px;
}

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

.article-panel {
    margin-top: 28px;
    padding: 30px;
}

.article-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 900;
}

.article-panel p + h2 {
    margin-top: 26px;
}

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

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
    font-size: 18px;
}

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

.footer-grid p {
    margin: 0;
    color: #94a3b8;
}

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

.footer-links.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 24px;
    text-align: center;
    color: #94a3b8;
}

.hidden-by-filter {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .home-rankings,
    .ranking-list.large {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        height: 600px;
    }

    .hero-content {
        margin-left: 24px;
    }

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

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

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

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

@media (max-width: 560px) {
    .nav-shell,
    .section-shell,
    .search-band,
    .detail-container {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero {
        height: 620px;
    }

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

    .movie-grid,
    .featured-grid,
    .category-grid,
    .compact-grid,
    .compact-grid.mini,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 40px 92px minmax(0, 1fr);
    }

    .poster-wrap {
        aspect-ratio: 16 / 9;
    }

    .filter-panel,
    .search-panel,
    .search-page-box,
    .article-panel,
    .category-overview-card {
        padding: 18px;
    }
}
