:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --text: #101827;
    --muted: #667085;
    --line: #e6ebf2;
    --primary: #0f72e5;
    --primary-dark: #0959bd;
    --cyan: #04b6d6;
    --teal: #0da6a6;
    --dark: #101626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

img {
    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: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 10px 28px rgba(15, 114, 229, 0.28);
}

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

.brand-text strong,
.footer-logo strong {
    font-size: 22px;
    color: var(--text);
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #475467;
    font-weight: 700;
    transition: 0.25s ease;
}

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

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: #eef6ff;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--primary);
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 24%, rgba(4, 182, 214, 0.36), transparent 28%),
        linear-gradient(90deg, rgba(10, 16, 30, 0.94) 0%, rgba(10, 16, 30, 0.78) 45%, rgba(10, 16, 30, 0.36) 100%),
        linear-gradient(180deg, transparent 60%, rgba(10, 16, 30, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    min-height: 680px;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    padding: 90px 0;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #b8eef6;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy p,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 0 0 24px;
    color: #e9f8ff;
    font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-tag,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.24s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 16px 34px rgba(15, 114, 229, 0.32);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(15, 114, 229, 0.38);
}

.primary-btn.light {
    color: var(--primary);
    background: #ffffff;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 470px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 470px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.58);
    font-size: 14px;
    font-weight: 800;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: 0.22s ease;
}

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

.stats-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.stats-grid div {
    padding: 30px 18px;
    text-align: center;
    border-right: 1px solid var(--line);
}

.stats-grid div:last-child {
    border-right: 0;
}

.stats-grid strong {
    display: block;
    color: var(--primary);
    font-size: 34px;
    line-height: 1;
}

.stats-grid span {
    color: var(--muted);
    font-weight: 700;
}

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

.white-block {
    background: #ffffff;
}

.gray-block {
    background: #f3f6fb;
}

.dark-block {
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #0d2743 55%, #123f58);
}

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

.section-head h2 {
    margin: 0 0 8px;
    color: inherit;
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

.dark-block .section-head p {
    color: rgba(255, 255, 255, 0.72);
}

.section-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 800;
}

.dark-block .section-action {
    color: #8ee9ff;
}

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.category-card a {
    position: relative;
    display: block;
    min-height: 260px;
    color: #ffffff;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.9));
}

.category-card-body {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
}

.category-card-body span,
.category-card-body small {
    display: inline-flex;
    margin-bottom: 10px;
    color: #b8eef6;
    font-weight: 800;
}

.category-card-body h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: 0.28s ease;
}

.dark-block .movie-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    backdrop-filter: blur(12px);
}

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

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.1);
}

.movie-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.58));
    opacity: 0.76;
}

.movie-type,
.movie-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.movie-type {
    left: 12px;
    top: 12px;
    background: var(--primary);
}

.movie-year {
    right: 12px;
    top: 12px;
    background: rgba(0, 0, 0, 0.55);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    background: #ef4444;
}

.movie-play {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 50%;
    color: var(--primary);
    background: #ffffff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: 0.26s ease;
}

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

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

.movie-card-body h3 {
    display: -webkit-box;
    min-height: 58px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--text);
    font-size: 20px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dark-block .movie-card-body h3 {
    color: #ffffff;
}

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

.dark-block .movie-card-body p {
    color: rgba(255, 255, 255, 0.72);
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.dark-block .movie-meta {
    color: rgba(255, 255, 255, 0.72);
}

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

.tag-row span {
    color: #475467;
    background: #f1f5f9;
}

.dark-block .tag-row span {
    color: #d8f8ff;
    background: rgba(255, 255, 255, 0.12);
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 18%, rgba(4, 182, 214, 0.34), transparent 26%),
        linear-gradient(135deg, #101827, #0f3b61 58%, #0aa6bd);
}

.compact-hero .container,
.page-hero .container {
    padding: 74px 0;
}

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

.page-hero p {
    color: #d8f8ff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #c7f4ff;
    font-weight: 700;
}

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

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box span {
    position: absolute;
    left: 16px;
    top: 50%;
    color: var(--muted);
    transform: translateY(-50%);
}

.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: 0;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(15, 114, 229, 0.12);
}

.filter-info {
    color: var(--muted);
    font-weight: 800;
    white-space: nowrap;
}

.detail-hero-inner {
    padding: 54px 0 64px;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

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

.detail-one-line {
    color: #e7faff;
}

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

.detail-meta-grid div {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
}

.detail-meta-grid dt {
    color: #b8eef6;
    font-size: 13px;
    font-weight: 800;
}

.detail-meta-grid dd {
    margin: 4px 0 0;
    color: #ffffff;
    font-weight: 800;
}

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

.player-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.player-title-row h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

.player-title-row .hero-kicker {
    color: var(--primary);
}

.player-title-row a {
    color: var(--primary);
    font-weight: 800;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #050912;
}

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

.play-trigger {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(5, 9, 18, 0.08), rgba(5, 9, 18, 0.58));
    cursor: pointer;
}

.play-trigger span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}

.play-trigger strong {
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
}

.video-shell.is-playing .play-trigger {
    display: none;
}

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

.detail-text-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-text-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.detail-text-card p {
    margin: 0;
    color: #475467;
}

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

.ranking-item {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: 0.24s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.ranking-link {
    display: grid;
    grid-template-columns: 72px 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px;
}

.ranking-number {
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    font-size: 20px;
    font-weight: 900;
}

.ranking-link img {
    width: 180px;
    height: 108px;
    object-fit: cover;
    border-radius: 18px;
}

.ranking-content h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.ranking-content p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
}

.cta-block {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
}

.cta-inner {
    padding: 72px 0;
    text-align: center;
}

.cta-inner h2 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 48px);
}

.cta-inner p {
    max-width: 760px;
    margin: 0 auto 28px;
    color: #e8fbff;
    font-size: 18px;
}

.site-footer {
    color: #d1d5db;
    background: #0b1220;
}

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

.site-footer h3,
.site-footer strong {
    color: #ffffff;
}

.site-footer p {
    color: #9ca3af;
}

.site-footer ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.site-footer li {
    margin: 8px 0;
    color: #9ca3af;
}

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

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

@media (max-width: 1024px) {
    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

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

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

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

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

    .mobile-toggle {
        display: block;
    }

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

    .hero-content {
        padding: 70px 0 92px;
    }

    .hero-actions,
    .section-head,
    .player-title-row,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-grid,
    .category-grid,
    .movie-grid,
    .compact-grid,
    .ranking-grid,
    .detail-text-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid div {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .detail-poster img {
        height: auto;
    }

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

    .ranking-link {
        grid-template-columns: 52px 96px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    .ranking-link img {
        width: 96px;
        height: 76px;
    }

    .ranking-number {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 16px;
    }

    .ranking-content h3 {
        font-size: 18px;
    }

    .ranking-content p,
    .ranking-meta,
    .ranking-content .tag-row {
        display: none;
    }
}
