:root {
    color-scheme: light;
    --green-950: #052e16;
    --green-900: #064e3b;
    --green-800: #065f46;
    --green-700: #047857;
    --green-600: #059669;
    --green-500: #10b981;
    --green-300: #86efac;
    --green-100: #dcfce7;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-deep: 0 28px 80px rgba(2, 6, 23, 0.32);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--slate-900);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem),
        linear-gradient(180deg, #f8fafc 0%, #ecfdf5 45%, #f8fafc 100%);
}

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

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

button,
input {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--green-950), var(--green-800));
    box-shadow: 0 12px 36px rgba(6, 78, 59, 0.28);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--green-950);
    background: linear-gradient(135deg, #bbf7d0, #34d399);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 12px 28px rgba(16, 185, 129, 0.32);
}

.brand-text,
.footer-brand span:last-child {
    display: grid;
    line-height: 1.15;
}

.brand-text strong,
.footer-brand strong {
    font-size: 20px;
    letter-spacing: 0.03em;
}

.brand-text em,
.footer-brand em {
    margin-top: 3px;
    font-size: 12px;
    font-style: normal;
    color: var(--green-300);
}

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

.main-nav a {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--green-300);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-panel input,
.search-page-form input {
    min-width: 210px;
    border: 1px solid rgba(134, 239, 172, 0.22);
    border-radius: 14px;
    padding: 10px 14px;
    outline: none;
    color: var(--white);
    background: rgba(6, 95, 70, 0.72);
}

.header-search input::placeholder,
.mobile-panel input::placeholder,
.search-page-form input::placeholder {
    color: rgba(187, 247, 208, 0.78);
}

.header-search button,
.mobile-panel button,
.search-page-form button {
    border: 0;
    border-radius: 14px;
    padding: 10px 16px;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    box-shadow: 0 10px 22px rgba(4, 120, 87, 0.22);
}

.menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
}

.menu-btn span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--white);
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(187, 247, 208, 0.18);
    padding: 14px 16px 18px;
    background: var(--green-900);
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-panel form {
    display: flex;
    gap: 10px;
}

.mobile-panel input {
    min-width: 0;
    width: 100%;
}

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    background: linear-gradient(135deg, var(--green-900), var(--slate-950));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.84) 0%, transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 150px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green-300);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 800px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 660px;
    margin: 22px 0 0;
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.card-tags,
.detail-tags,
.catalog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.catalog-tags a {
    border: 1px solid rgba(134, 239, 172, 0.28);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--green-100);
    background: rgba(6, 78, 59, 0.42);
    backdrop-filter: blur(12px);
}

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

.btn,
.wide-link,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
    min-height: 48px;
    padding: 0 22px;
}

.btn:hover,
.wide-link:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.btn.primary {
    color: var(--green-950);
    background: linear-gradient(135deg, #bbf7d0, #34d399);
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.35);
}

.btn.ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls > button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: var(--white);
    font-size: 26px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 28px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.active {
    width: 46px;
    background: var(--green-300);
}

.hero-rail {
    position: absolute;
    right: calc((100vw - min(1180px, calc(100vw - 32px))) / 2);
    bottom: 110px;
    z-index: 4;
    width: min(420px, calc(100% - 32px));
    display: grid;
    gap: 12px;
}

.content-section {
    margin-top: 54px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--slate-600);
}

.section-link {
    flex-shrink: 0;
    min-height: 42px;
    padding: 0 16px;
    color: var(--green-900);
    background: var(--green-100);
}

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

.category-card {
    min-height: 172px;
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: var(--radius-lg);
    padding: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(236, 253, 245, 0.86)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.2), transparent 55%);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(6, 95, 70, 0.16);
}

.category-card span {
    display: block;
    color: var(--green-700);
    font-weight: 900;
    font-size: 20px;
}

.category-card strong {
    display: block;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--slate-700);
}

.category-card em {
    display: block;
    margin-top: 14px;
    font-style: normal;
    font-size: 12px;
    color: var(--slate-500);
}

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

.home-aside,
.detail-side {
    position: sticky;
    top: 96px;
}

.sticky-card,
.side-card,
.detail-info,
.text-panel,
.player-card {
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.sticky-card {
    padding: 20px;
}

.mini-head {
    display: block;
    margin-bottom: 16px;
}

.mini-head h2 {
    font-size: 26px;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-item {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 76px;
    border-radius: 17px;
    padding: 9px;
    background: #f8fafc;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mini-item:hover {
    transform: translateX(4px);
    background: var(--green-100);
}

.mini-item img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--green-800), var(--slate-900));
}

.mini-item span {
    min-width: 0;
}

.mini-item strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mini-item em {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 12px;
    font-style: normal;
    color: var(--slate-500);
}

.mini-rank,
.rank-index {
    display: inline-grid;
    place-items: center;
    font-weight: 900;
}

.mini-rank {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    color: var(--green-950);
    background: linear-gradient(135deg, #bbf7d0, #34d399);
}

.wide-link {
    width: 100%;
    min-height: 46px;
    margin-top: 14px;
    color: var(--green-950);
    background: var(--green-100);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 58px rgba(6, 95, 70, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-800), var(--slate-900));
}

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

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

.card-badge,
.card-score,
.rank-index {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.card-badge {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    background: rgba(6, 95, 70, 0.76);
}

.card-score {
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    color: var(--green-950);
    background: rgba(187, 247, 208, 0.9);
}

.rank-index {
    left: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #f59e0b, #10b981);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.24);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--green-700);
}

.card-meta {
    margin: 8px 0 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
    color: var(--slate-500);
}

.card-desc {
    min-height: 64px;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--slate-600);
}

.card-tags {
    margin-top: 14px;
}

.card-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    color: var(--green-800);
    background: var(--green-100);
}

.page-main {
    padding-bottom: 64px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(circle at 75% 20%, rgba(52, 211, 153, 0.34), transparent 26rem),
        linear-gradient(135deg, var(--slate-950), var(--green-900));
}

.page-hero .container {
    padding: 86px 0 78px;
}

.page-hero p {
    max-width: 760px;
    margin: 20px 0 0;
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

.catalog-tags {
    margin-top: 26px;
}

.catalog-tags a:hover {
    background: rgba(187, 247, 208, 0.22);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding: 24px 0 0;
    font-size: 14px;
    color: var(--slate-500);
}

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

.detail-layout {
    margin-top: 22px;
}

.player-card {
    overflow: hidden;
    padding: 14px;
    background: var(--slate-950);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #000000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.video-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-ring {
    position: absolute;
    z-index: 3;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--green-950);
    font-size: 34px;
    text-indent: 5px;
    background: linear-gradient(135deg, #bbf7d0, #34d399);
    box-shadow: 0 22px 52px rgba(16, 185, 129, 0.34);
}

.detail-info {
    margin-top: 22px;
    padding: 26px;
}

.detail-info h1 {
    font-size: clamp(32px, 5vw, 52px);
    color: var(--slate-950);
}

.detail-one-line {
    margin: 16px 0 0;
    font-size: 18px;
    line-height: 1.75;
    color: var(--slate-600);
}

.detail-tags {
    margin-top: 20px;
}

.detail-tags span {
    color: var(--green-800);
    background: var(--green-100);
}

.text-panel {
    margin-top: 22px;
    padding: 28px;
}

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

.text-panel p {
    margin: 0;
    font-size: 17px;
    line-height: 1.9;
    color: var(--slate-700);
}

.side-card {
    margin-bottom: 18px;
    padding: 20px;
}

.poster-side {
    padding: 0;
    overflow: hidden;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, var(--green-800), var(--slate-900));
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.side-card dt {
    color: var(--slate-500);
}

.side-card dd {
    margin: 0;
    font-weight: 700;
}

.search-page-form {
    display: flex;
    gap: 12px;
    width: min(680px, 100%);
    margin-top: 28px;
}

.search-page-form input {
    width: 100%;
    min-width: 0;
    background: rgba(255, 255, 255, 0.12);
}

.site-footer {
    margin-top: 80px;
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(180deg, var(--slate-900), #000000);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr;
    gap: 42px;
    padding: 54px 0;
}

.footer-brand strong {
    color: var(--white);
}

.site-footer p {
    max-width: 460px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.62);
}

.site-footer h3 {
    margin: 0 0 18px;
    color: var(--white);
}

.site-footer a {
    display: block;
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.72);
}

.site-footer a:hover {
    color: var(--green-300);
}

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

    .menu-btn {
        display: block;
        margin-left: auto;
    }

    .hero-rail {
        display: none;
    }

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

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

    .home-aside,
    .detail-side {
        position: static;
    }
}

@media (max-width: 860px) {
    .hero {
        min-height: 620px;
    }

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

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

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .header-inner {
        height: 64px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .hero {
        min-height: 600px;
    }

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

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

    .hero-controls {
        bottom: 22px;
    }

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

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

    .search-page-form,
    .mobile-panel form {
        flex-direction: column;
    }

    .detail-info,
    .text-panel,
    .side-card {
        padding: 18px;
    }
}
