*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --emerald: #059669;
    --teal: #0d9488;
    --cyan: #0891b2;
    --dark: #0f172a;
    --muted: #64748b;
    --soft: #f1f5f9;
    --card: #ffffff;
    --line: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: #111827;
    background: #f8fafc;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.22);
}

.nav-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    opacity: 0.95;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    opacity: 1;
    color: #d1fae5;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.nav-search input,
.mobile-nav input,
.search-panel input,
.filter-panel input,
.filter-panel select,
.search-panel select {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}

.nav-search button,
.mobile-nav button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: var(--emerald);
    background: #ffffff;
    font-weight: 750;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 20px;
    gap: 14px;
    flex-direction: column;
}

.mobile-nav form {
    display: flex;
    gap: 8px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(45, 212, 191, 0.42), transparent 35%), linear-gradient(135deg, #047857, #0f766e 50%, #075985);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 120px;
    background: linear-gradient(0deg, #f8fafc, rgba(248, 250, 252, 0));
    pointer-events: none;
}

.hero-track {
    position: relative;
    max-width: 1240px;
    min-height: 620px;
    margin: 0 auto;
    padding: 76px 20px 110px;
}

.hero-slide {
    position: absolute;
    inset: 76px 20px 110px;
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(320px, 0.74fr);
    align-items: center;
    gap: 54px;
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.eyebrow {
    color: var(--emerald);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.hero-kicker {
    color: #bbf7d0;
    margin-bottom: 16px;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 700px;
    margin: 0 0 24px;
    color: #ecfeff;
    font-size: clamp(18px, 2.4vw, 25px);
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.detail-tags a,
.category-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #065f46;
    background: #d1fae5;
    font-size: 14px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.card-button,
.rank-action,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.card-button,
.rank-action {
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.26);
}

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

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

.hero-image {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    aspect-ratio: 4 / 5;
    box-shadow: 0 36px 90px rgba(15, 23, 42, 0.46);
    background: rgba(15, 23, 42, 0.28);
}

.hero-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.46), transparent 50%);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

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

.content-section,
.detail-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 70px 20px;
}

.content-section.tinted {
    max-width: none;
    background: linear-gradient(90deg, #ecfeff, #ecfdf5);
}

.content-section.tinted > * {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.dark-section {
    max-width: none;
    color: #ffffff;
    background: #0f172a;
}

.dark-section > * {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

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

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

.section-heading p {
    max-width: 680px;
    margin: 9px 0 0;
    color: var(--muted);
}

.dark-section .section-heading p {
    color: #cbd5e1;
}

.section-more {
    color: var(--emerald);
    background: #dcfce7;
}

.movie-grid,
.category-grid,
.overview-grid,
.ranking-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.movie-card,
.overview-card,
.category-tile,
.detail-card,
.player-card,
.sticky-card,
.search-result-card,
.rank-row {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.movie-card {
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #0f766e, #164e63);
}

.movie-card.compact .poster {
    aspect-ratio: 5 / 4;
}

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

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

.quality,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.quality {
    top: 12px;
    right: 12px;
    background: var(--emerald);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 30px;
    text-align: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 22px;
}

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

.card-body h3,
.rank-info h2,
.search-result-card h2,
.overview-card h2 {
    margin: 0 0 8px;
    line-height: 1.25;
}

.card-body h3 {
    font-size: 21px;
}

.movie-card.compact h3 {
    font-size: 17px;
}

.card-body p,
.one-line,
.meta-line,
.overview-card p,
.category-tile p,
.rank-info p,
.search-result-card p {
    color: var(--muted);
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    font-weight: 800;
}

.card-actions a:first-child,
.text-link {
    color: var(--emerald);
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal), var(--cyan));
}

.page-hero > div {
    max-width: 1240px;
    margin: 0 auto;
    padding: 72px 20px;
    text-align: center;
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 14px;
    color: #d1fae5;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(36px, 5vw, 56px);
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #ecfeff;
    font-size: 19px;
}

.compact-hero > div {
    padding: 54px 20px;
}

.category-tile a,
.overview-card > a {
    display: block;
    padding: 28px;
}

.category-tile {
    background: linear-gradient(135deg, #10b981, #0d9488);
    color: #ffffff;
}

.category-tile h3,
.overview-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.category-tile p {
    color: #ecfeff;
}

.tile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tile-links a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

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

.overview-card ul {
    margin: 0;
    padding: 0 28px 22px;
    list-style: none;
}

.overview-card li + li {
    margin-top: 8px;
}

.overview-card li a {
    color: var(--emerald);
    font-weight: 650;
}

.overview-card .card-button {
    margin-left: 28px;
}

.filter-panel,
.search-panel {
    display: grid;
    grid-template-columns: 1fr 190px 190px 190px;
    gap: 14px;
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.search-panel {
    grid-template-columns: 1fr 200px 160px 140px;
}

.filter-panel input,
.filter-panel select,
.search-panel input,
.search-panel select {
    border-color: var(--line);
    background: #f8fafc;
}

.search-panel button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--emerald), var(--teal));
}

.detail-wrap {
    padding-top: 36px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--muted);
    font-weight: 650;
}

.breadcrumb a {
    color: var(--emerald);
}

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

.player-card {
    margin-bottom: 26px;
    background: #000000;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
    cursor: pointer;
}

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

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 5px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 45px rgba(5, 150, 105, 0.42);
    font-size: 34px;
}

.detail-card {
    padding: 32px;
}

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.detail-card h1 {
    margin: 8px 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
}

.lead-text {
    margin: 0 0 22px;
    color: #334155;
    font-size: 19px;
}

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

.info-list div {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
}

.info-list dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.info-list dd {
    margin: 3px 0 0;
    font-weight: 750;
}

.text-block {
    border-top: 1px solid var(--line);
    padding-top: 24px;
    margin-top: 24px;
}

.text-block h2,
.sticky-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-block p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

.review-block {
    border: 0;
    border-radius: 22px;
    padding: 24px;
    background: linear-gradient(90deg, #ecfdf5, #ecfeff);
}

.sticky-card {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.related-list {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.related-list .movie-card {
    display: grid;
    grid-template-columns: 100px 1fr;
    border-radius: 18px;
}

.related-list .poster {
    aspect-ratio: 1;
}

.related-list .card-body {
    padding: 12px;
}

.related-list .one-line,
.related-list .text-link {
    display: none;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 110px minmax(0, 1fr) 100px;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 22px;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 4 / 3;
}

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

.rank-info div {
    color: var(--muted);
    font-weight: 650;
}

.rank-info a {
    color: var(--emerald);
}

.search-results {
    display: grid;
    gap: 18px;
}

.search-result-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 16px;
}

.search-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 4 / 3;
}

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

.search-result-card a,
.search-result-card div div a {
    color: var(--emerald);
}

.empty-state {
    padding: 32px;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 52px 20px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 36px;
}

.footer-logo {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

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

.site-footer li + li {
    margin-top: 8px;
}

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

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-image {
        max-width: 360px;
        width: 100%;
        margin: 0 auto;
    }

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

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

    .sticky-card {
        position: static;
    }

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

@media (max-width: 720px) {
    .nav-wrap {
        min-height: 62px;
    }

    .mobile-nav form,
    .section-heading,
    .detail-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .hero,
    .hero-track {
        min-height: 760px;
    }

    .hero-track {
        padding-top: 46px;
    }

    .hero-slide {
        inset: 46px 20px 96px;
    }

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

    .hero p {
        font-size: 17px;
    }

    .content-section,
    .detail-wrap {
        padding: 48px 16px;
    }

    .movie-grid,
    .catalog-grid,
    .compact-grid,
    .ranking-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-card {
        padding: 22px;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 56px 86px 1fr;
    }

    .rank-action {
        grid-column: 2 / 4;
    }

    .search-result-card {
        grid-template-columns: 96px 1fr;
    }

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