:root {
    color-scheme: light;
    --bg: #f6fbfc;
    --surface: #ffffff;
    --surface-strong: #ecfeff;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.1);
    --brand: #0f766e;
    --brand-bright: #06b6d4;
    --brand-soft: rgba(20, 184, 166, 0.12);
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.15), transparent 32rem), var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.32);
}

.logo-text {
    font-size: 1.45rem;
    color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    -webkit-background-clip: text;
    background-clip: text;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    position: relative;
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--brand);
    background: var(--brand-soft);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: white;
}

.header-search input,
.mobile-search input,
.catalog-toolbar input,
.catalog-toolbar select,
.search-panel input {
    border: 0;
    outline: none;
    min-width: 0;
    color: var(--text);
    background: transparent;
}

.header-search input {
    width: 210px;
    padding: 8px 4px 8px 12px;
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.search-panel button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 18px;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 14px 28px rgba(20, 184, 166, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(20, 184, 166, 0.34);
}

.secondary-button {
    color: var(--brand);
    background: white;
}

.menu-button {
    display: none;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--brand);
    background: var(--brand-soft);
    cursor: pointer;
}

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

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: linear-gradient(120deg, #0f766e, #0891b2 52%, #2563eb);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.25), transparent 16rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.62), rgba(15, 118, 110, 0.32));
    pointer-events: none;
}

.hero-wrap {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 54px 0 60px;
}

.hero-slider {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
    gap: 44px;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero h1 {
    max-width: 760px;
    margin: 22px 0 16px;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 0.96;
    letter-spacing: -0.08em;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.85;
}

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

.hero-poster {
    position: relative;
    border-radius: 34px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.36);
    aspect-ratio: 2 / 3;
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.88));
}

.poster-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 1;
}

.poster-caption strong {
    display: block;
    font-size: 1.5rem;
}

.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-dot {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 64px;
    background: white;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.main-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

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

.section-head h1,
.section-head h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-head p,
.page-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.38);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #ecfeff, #cffafe);
}

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

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

.type-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: white;
    font-size: 0.82rem;
    font-weight: 900;
    background: rgba(15, 118, 110, 0.92);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.rank-badge {
    left: auto;
    right: 12px;
    background: linear-gradient(135deg, #f97316, #eab308);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.35;
}

.card-body h2 a:hover {
    color: var(--brand);
}

.card-meta,
.card-line {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.card-line {
    min-height: 3.2em;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    background: var(--brand-soft);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 26px;
    border-radius: 28px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 18px 48px rgba(15, 118, 110, 0.24);
}

.category-card::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h2 {
    position: relative;
    margin: 0 0 12px;
    font-size: 1.55rem;
}

.category-card p,
.category-card ul {
    position: relative;
    color: rgba(255, 255, 255, 0.86);
}

.category-card ul {
    margin: 18px 0 22px;
    padding-left: 18px;
}

.category-card a {
    position: relative;
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--brand);
    font-weight: 900;
    background: white;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 74px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
}

.ranking-row img {
    width: 92px;
    height: 128px;
    border-radius: 16px;
    object-fit: cover;
}

.ranking-row h2 {
    margin: 0;
    font-size: 1.18rem;
}

.ranking-row p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.catalog-toolbar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 24px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.catalog-toolbar input,
.catalog-toolbar select,
.search-panel input {
    flex: 1 1 220px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.filter-chip {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 10px 16px;
    color: #334155;
    font-weight: 800;
    background: #f1f5f9;
}

.filter-chip.is-active {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 70px 0;
    color: white;
    background: linear-gradient(135deg, #0f766e, #0891b2 58%, #2563eb);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 22rem);
}

.page-title {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.page-title p {
    color: rgba(255, 255, 255, 0.84);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.detail-panel {
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: white;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.detail-panel h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.detail-panel p,
.content-card p {
    color: var(--muted);
    line-height: 1.9;
}

.player-section {
    margin-top: 42px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.3);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.64));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-overlay button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 16px 28px;
    color: white;
    font-size: 1.08rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 20px 50px rgba(20, 184, 166, 0.36);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 28px;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: white;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.content-card h2,
.player-section h2 {
    margin: 0 0 14px;
    font-size: 1.7rem;
}

.search-results {
    margin-top: 28px;
}

.empty-state {
    padding: 36px;
    border-radius: 24px;
    color: var(--muted);
    text-align: center;
    background: white;
    border: 1px solid var(--line);
}

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

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

.footer-grid h2 {
    margin: 0 0 14px;
    color: white;
    font-size: 1rem;
}

.footer-grid p {
    margin: 14px 0 0;
    line-height: 1.8;
}

.footer-logo {
    color: white;
    font-size: 1.35rem;
}

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

.footer-links a:hover {
    color: #5eead4;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

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

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

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

    .header-search {
        display: none;
    }
}

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

    .menu-button {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-wrap {
        min-height: auto;
    }

    .hero-slider {
        min-height: 780px;
    }

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

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
        transform: none;
    }

    .section-head {
        display: block;
    }

    .grid,
    .grid.compact-grid,
    .category-grid,
    .content-grid,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 360px;
        margin: 0 auto;
    }

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

    .ranking-row .primary-button {
        grid-column: 2 / -1;
        width: fit-content;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .main-wrap,
    .page-title,
    .footer-grid,
    .footer-bottom,
    .mobile-panel {
        width: min(100% - 22px, 1200px);
    }

    .logo-text {
        font-size: 1.22rem;
    }

    .hero h1 {
        letter-spacing: -0.05em;
    }

    .hero-slider {
        min-height: 720px;
    }

    .card-body {
        padding: 14px;
    }

    .detail-panel,
    .content-card {
        padding: 22px;
    }
}
