:root {
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-soft: #f1f5f9;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-line: #e2e8f0;
    --color-primary: #0f766e;
    --color-primary-bright: #14b8a6;
    --color-cyan: #0891b2;
    --color-dark: #0f172a;
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 30px rgba(15, 118, 110, 0.12);
    --radius-large: 28px;
    --radius-card: 20px;
    --radius-small: 12px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 26px;
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-logo__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    font-size: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    box-shadow: var(--shadow-soft);
}

.site-logo__text {
    font-size: 21px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.nav-link {
    color: #475569;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 32vw);
    padding: 5px;
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 8px 8px 8px 14px;
    color: var(--color-text);
    background: transparent;
    border: 0;
    outline: 0;
}

.header-search button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 750;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-bright));
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.24);
}

.btn-ghost {
    color: var(--color-primary);
    background: rgba(240, 253, 250, 0.92);
    border: 1px solid rgba(20, 184, 166, 0.24);
}

.header-search button:hover,
.btn:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--color-line);
    border-radius: 12px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--color-text);
    border-radius: 99px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #04111d;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 48px;
    align-items: center;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 90px 24px 82px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(16px) saturate(1.2);
    transform: scale(1.08);
}

.hero-slide__shade {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 22% 28%, rgba(20, 184, 166, 0.35), transparent 30%),
        linear-gradient(100deg, rgba(4, 17, 29, 0.94) 0%, rgba(15, 23, 42, 0.82) 48%, rgba(15, 23, 42, 0.42) 100%);
}

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

.hero-slide__content {
    color: #ffffff;
}

.hero-badges,
.detail-info__meta,
.movie-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-badges span,
.detail-info__meta span,
.movie-card__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 750;
    background: #ccfbf1;
    border-radius: 999px;
}

.hero-badges span {
    color: #d1fae5;
    background: rgba(15, 118, 110, 0.48);
    border: 1px solid rgba(153, 246, 228, 0.28);
}

.hero h1 {
    max-width: 860px;
    margin: 18px 0 4px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h2 {
    margin: 0 0 16px;
    color: #99f6e4;
    font-size: clamp(24px, 3.6vw, 44px);
    line-height: 1.12;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    max-height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.52));
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    background: rgba(255, 255, 255, 0.34);
    border: 0;
    border-radius: 99px;
    cursor: pointer;
}

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

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-heading h2,
.highlight-panel h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-heading p,
.highlight-panel p,
.page-hero p,
.detail-text p {
    margin: 10px 0 0;
    color: var(--color-muted);
}

.section-more {
    flex-shrink: 0;
    color: var(--color-primary);
    font-weight: 800;
}

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

.category-chip,
.category-card,
.movie-card,
.highlight-panel,
.search-panel,
.detail-text {
    background: var(--color-surface);
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: var(--shadow-card);
}

.category-chip {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 126px;
    padding: 22px;
    border-radius: var(--radius-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(20, 184, 166, 0.36);
}

.category-chip strong {
    font-size: 20px;
}

.category-chip span {
    color: var(--color-muted);
    font-size: 14px;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0, #ccfbf1);
}

.movie-card__cover img {
    transition: transform 0.35s ease;
}

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

.movie-card__play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(15, 118, 110, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .movie-card__play {
    opacity: 1;
    transform: translateY(0);
}

.movie-card__rank {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 12px;
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.25);
}

.movie-card__body {
    padding: 16px;
}

.movie-card__meta {
    margin-bottom: 10px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

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

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

.movie-card__tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.movie-card__tags span,
.detail-tags span {
    display: inline-flex;
    padding: 4px 9px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
    background: #f0fdfa;
    border-radius: 999px;
}

.highlight-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.highlight-panel {
    position: sticky;
    top: 92px;
    padding: 32px;
    border-radius: var(--radius-large);
}

.highlight-panel .btn {
    margin-top: 24px;
}

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

.movie-card--compact {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
}

.movie-card--compact .movie-card__cover {
    aspect-ratio: 2 / 3;
}

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

.movie-card--compact p,
.movie-card--compact .movie-card__tags {
    display: none;
}

.page-hero,
.detail-hero {
    background:
        radial-gradient(circle at 18% 0%, rgba(20, 184, 166, 0.22), transparent 26%),
        linear-gradient(135deg, #f8fafc 0%, #ecfeff 50%, #f0fdfa 100%);
}

.page-hero {
    padding: 82px 24px 54px;
}

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

.page-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

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

.category-card {
    position: relative;
    display: grid;
    min-height: 260px;
    overflow: hidden;
    color: #ffffff;
    border-radius: var(--radius-large);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.86));
}

.category-card div {
    position: relative;
    z-index: 2;
    align-self: end;
    padding: 26px;
}

.category-card span {
    display: inline-flex;
    margin-bottom: 6px;
    color: #99f6e4;
    font-weight: 850;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
}

.category-card--wide {
    grid-column: span 2;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.filter-bar a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 14px;
    color: var(--color-primary);
    font-weight: 750;
    background: #f0fdfa;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 999px;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-card);
}

.search-panel input {
    flex: 1;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    outline: 0;
}

.search-panel input:focus {
    border-color: var(--color-primary-bright);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.search-panel span {
    color: var(--color-muted);
    font-weight: 750;
}

.detail-hero {
    padding: 38px 24px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1280px;
    margin: 0 auto 24px;
    color: var(--color-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--color-primary);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 28px;
    align-items: stretch;
    max-width: 1280px;
    margin: 0 auto;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    min-height: 360px;
    background: #020617;
    border-radius: var(--radius-large);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.24);
}

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

.player-poster {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #020617;
    border: 0;
}

.player-poster.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-poster__shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(20, 184, 166, 0.22), transparent 34%),
        rgba(2, 6, 23, 0.45);
}

.player-poster__button {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: #ffffff;
    font-size: 30px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-bright));
    border-radius: 999px;
    box-shadow: 0 18px 40px rgba(20, 184, 166, 0.34);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.detail-info h1 {
    margin: 16px 0 12px;
    font-size: clamp(30px, 4.8vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0;
    color: var(--color-muted);
    font-size: 17px;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.detail-text {
    padding: 34px;
    border-radius: var(--radius-large);
}

.detail-text h2 + p {
    font-size: 17px;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #0f172a;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
    gap: 28px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
}

.site-logo--footer .site-logo__text {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer__brand p {
    max-width: 520px;
    margin: 16px 0 0;
    color: #94a3b8;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 12px;
}

.site-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    color: #dbeafe;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
}

.site-footer__links a:hover {
    color: #99f6e4;
}

@media (max-width: 1120px) {
    .header-search {
        display: none;
    }

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

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

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

    .highlight-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .site-header__inner {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 18px;
    }

    .site-nav {
        order: 3;
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 0 4px;
    }

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

    .nav-link {
        padding: 10px 12px;
        background: #f8fafc;
        border-radius: 12px;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 62px 20px 86px;
    }

    .hero-poster {
        width: min(270px, 78vw);
        justify-self: center;
    }

    .content-section {
        padding: 54px 18px;
    }

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

    .movie-grid--catalog,
    .movie-grid--home,
    .movie-grid--related,
    .category-chip-grid,
    .category-card-grid,
    .ranking-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-card--wide {
        grid-column: span 2;
    }

    .player-shell {
        min-height: auto;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .site-logo__text {
        font-size: 18px;
    }

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

    .hero h2 {
        font-size: 25px;
    }

    .hero p,
    .page-hero p {
        font-size: 16px;
    }

    .movie-grid--catalog,
    .movie-grid--home,
    .movie-grid--related,
    .category-chip-grid,
    .category-card-grid,
    .ranking-list {
        grid-template-columns: 1fr;
    }

    .category-card--wide {
        grid-column: span 1;
    }

    .movie-card--compact {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-info,
    .detail-text {
        padding: 22px;
    }
}
