:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #34d399;
    --accent-strong: #10b981;
    --accent-glow: rgba(16, 185, 129, 0.35);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.14), transparent 32rem),
        radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.13), transparent 26rem),
        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,
video {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent), #22d3ee);
    color: #06221a;
    box-shadow: 0 12px 30px var(--accent-glow);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a,
.quick-links a,
.footer-links a {
    color: var(--soft);
    padding: 10px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.quick-links a:hover,
.footer-links a:hover {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.14);
}

.header-search {
    margin-left: auto;
    display: flex;
    width: min(360px, 34vw);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.large-search input,
.filter-input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
}

.header-search input {
    padding: 12px 14px;
}

.header-search button,
.large-search button {
    border: 0;
    color: #052e22;
    background: var(--accent);
    font-weight: 700;
    padding: 0 18px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    width: 42px;
    height: 42px;
    font-size: 20px;
}

main,
.page-main,
.detail-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.hero-wrap {
    position: relative;
    max-width: none;
    height: 600px;
    margin: 0 calc(50% - 50vw) 48px;
    overflow: hidden;
    background: #020617;
}

.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;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.08);
}

.hero-bg span {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.15) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 58%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(660px, calc(100% - 40px));
    margin: 0 auto;
    padding-top: 180px;
    transform: translateX(-300px);
}

.hero-tags,
.movie-badges,
.tag-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.movie-badges span,
.tag-list span {
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: #a7f3d0;
    font-size: 12px;
    line-height: 1;
    padding: 7px 10px;
}

.hero-content h1 {
    margin: 22px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-content p {
    color: var(--soft);
    font-size: 18px;
    line-height: 1.9;
    max-width: 620px;
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

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

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #052e22;
    background: var(--accent);
    box-shadow: 0 18px 45px var(--accent-glow);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

.hero-dots button {
    width: 36px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
    cursor: pointer;
}

.hero-dots button.active {
    background: var(--accent);
}

.quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 22px;
    margin-bottom: 58px;
}

.quick-search-card,
.page-hero,
.filter-bar,
.category-card,
.ranking-panel,
.text-section,
.player-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.quick-search-card {
    padding: 30px;
}

.quick-search-card h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.text-section h2 {
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.quick-search-card h2 {
    font-size: clamp(26px, 4vw, 42px);
}

.quick-search-card p,
.page-hero span,
.category-card p,
.text-section p,
.detail-info .lead {
    color: var(--soft);
    line-height: 1.85;
}

.large-search {
    display: flex;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.44);
}

.large-search input {
    padding: 16px 18px;
}

.quick-links {
    display: grid;
    gap: 12px;
}

.quick-links a {
    display: flex;
    align-items: center;
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    font-weight: 800;
}

.content-section,
.home-category-block,
.rank-section,
.detail-related {
    margin-top: 58px;
}

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

.section-head.single {
    margin-bottom: 18px;
}

.section-head p,
.page-hero p {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-head h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-head a,
.filter-bar a {
    color: #a7f3d0;
    font-weight: 800;
}

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

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

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.62);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.48);
    box-shadow: 0 22px 60px rgba(16, 185, 129, 0.12);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 50%);
}

.poster-play {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.92);
    color: #052e22;
    font-size: 12px;
    font-weight: 900;
    padding: 8px 12px;
}

.movie-info {
    display: flex;
    min-height: 162px;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
}

.movie-info h3 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--accent);
}

.movie-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.movie-badges span {
    font-size: 11px;
    padding: 6px 8px;
}

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

.rank-list a,
.rank-row,
.compact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.58);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-list a {
    min-height: 68px;
    padding: 14px;
}

.rank-list a:hover,
.rank-row:hover,
.compact-link:hover {
    transform: translateY(-2px);
    border-color: rgba(52, 211, 153, 0.48);
}

.rank-list strong,
.rank-row strong {
    color: var(--accent);
    font-size: 18px;
}

.rank-list span,
.compact-link span {
    flex: 1;
    color: #ffffff;
    font-weight: 800;
}

.rank-list em,
.compact-link em,
.rank-row em,
.rank-row i {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.page-hero {
    padding: 40px;
    margin-bottom: 24px;
}

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

.page-hero span {
    display: block;
    max-width: 820px;
    margin-top: 14px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-input {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    background: rgba(2, 6, 23, 0.48);
}

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

.category-card {
    padding: 22px;
}

.category-title {
    display: inline-flex;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.compact-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.compact-link {
    min-height: 52px;
    padding: 12px;
}

.ranking-panel {
    padding: 18px;
}

.rank-row {
    padding: 12px;
    margin-bottom: 10px;
}

.rank-row img {
    width: 54px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-row span {
    flex: 1;
    display: grid;
    gap: 6px;
}

.rank-row b {
    color: #ffffff;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin-bottom: 24px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.14), transparent 44%),
        rgba(15, 23, 42, 0.72);
    padding: 28px;
    box-shadow: var(--shadow);
}

.detail-cover {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    margin: 20px 0 14px;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.02;
}

.detail-info .lead {
    max-width: 800px;
    font-size: 18px;
}

.tag-list {
    margin-top: 20px;
}

.player-section,
.text-section {
    margin-top: 34px;
    padding: 26px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #000000;
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #052e22;
    box-shadow: 0 18px 60px var(--accent-glow);
    padding: 16px 28px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.player-box.is-ready .player-start {
    opacity: 0;
    pointer-events: none;
}

.text-section h2 {
    font-size: 28px;
    margin-bottom: 16px;
}

.text-section p {
    margin: 0;
    font-size: 17px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.footer-inner p {
    color: var(--muted);
    max-width: 560px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 28px;
    color: #64748b;
    font-size: 13px;
}

.is-hidden {
    display: none !important;
}

@media (max-width: 1160px) {
    .movie-grid.six,
    .catalog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-content {
        transform: none;
    }
}

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav,
    .header-search {
        display: none;
        width: 100%;
    }

    .site-header.open .main-nav,
    .site-header.open .header-search {
        display: flex;
    }

    .main-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .header-search {
        margin-left: 0;
    }

    .hero-wrap {
        height: 560px;
    }

    .hero-content {
        padding-top: 170px;
    }

    .quick-panel,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .movie-grid,
    .movie-grid.six,
    .catalog-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-cover {
        max-width: 320px;
    }
}

@media (max-width: 560px) {
    main,
    .page-main,
    .detail-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .header-inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-wrap {
        height: 520px;
    }

    .hero-content {
        padding-top: 140px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .large-search,
    .filter-bar,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .movie-grid,
    .movie-grid.six,
    .catalog-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .rank-row {
        align-items: flex-start;
    }

    .rank-row i {
        display: none;
    }

    .player-start {
        font-size: 16px;
        padding: 13px 22px;
    }
}
