:root {
    --page-bg: #f8faf9;
    --surface: #ffffff;
    --surface-strong: #f0fdf4;
    --text-main: #111827;
    --text-muted: #64748b;
    --line: #e5e7eb;
    --brand: #059669;
    --brand-dark: #047857;
    --brand-soft: #d1fae5;
    --teal: #0f766e;
    --amber: #f59e0b;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.18);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background: var(--page-bg);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--teal));
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.brand-text strong {
    font-size: 20px;
    line-height: 1.2;
}

.brand-text span {
    color: var(--text-muted);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.desktop-nav a,
.mobile-nav a {
    position: relative;
    color: #334155;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.25s ease;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -24px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--brand);
    transition: transform 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: var(--brand);
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
    transform: scaleX(1);
}

.nav-search-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #334155;
    background: #f1f5f9;
}

.nav-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    color: #334155;
    background: #f1f5f9;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 16px 18px;
    background: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    gap: 10px;
}

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

.hero {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #064e3b);
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.06);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 18%, rgba(16, 185, 129, 0.22), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.18)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 42%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: end;
    gap: 38px;
    min-height: 68vh;
    padding: 78px 0 62px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #dcfce7;
    background: rgba(5, 150, 105, 0.28);
    border: 1px solid rgba(187, 247, 208, 0.22);
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 4.7vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(24px, 3.4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.hero-copy p {
    max-width: 760px;
    margin: 0 0 24px;
    color: rgba(241, 245, 249, 0.92);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--teal));
    box-shadow: 0 14px 32px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 18px 42px rgba(5, 150, 105, 0.36);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: var(--brand-dark);
    border-color: #bbf7d0;
    background: #ffffff;
}

.hero-card {
    overflow: hidden;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-card-body {
    padding: 18px;
}

.hero-card-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
}

.hero-card-meta {
    color: rgba(226, 232, 240, 0.86);
    font-size: 13px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.46);
    transition: width 0.3s ease, background 0.3s ease;
}

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

.main-block {
    padding: 54px 0;
}

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

.section-head h2,
.page-head h1,
.detail-main h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p,
.page-head p {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--text-muted);
}

.panel {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.search-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 16px;
    color: var(--text-main);
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 8px 13px;
    color: #065f46;
    background: #ffffff;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-chip:hover,
.filter-chip.is-active {
    color: #ffffff;
    background: var(--brand);
    transform: translateY(-1px);
}

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: #bbf7d0;
    box-shadow: var(--shadow-sm);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #064e3b);
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.08);
}

.movie-score,
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.76);
    backdrop-filter: blur(8px);
    font-weight: 900;
}

.movie-score {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 48px;
    height: 30px;
    color: #fef3c7;
    font-size: 14px;
}

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

.movie-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

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

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

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 8px;
    color: #047857;
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 700;
}

.feature-band {
    margin: 54px 0;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    border: 1px solid #d1fae5;
}

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

.category-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 154px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: #86efac;
    box-shadow: var(--shadow-sm);
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.category-card span {
    margin-top: 18px;
    color: var(--brand);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 96px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: #bbf7d0;
}

.rank-badge {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #111827, var(--brand-dark));
}

.rank-cover {
    overflow: hidden;
    width: 96px;
    height: 64px;
    border-radius: 14px;
    background: #0f172a;
}

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

.rank-main h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-main h3 a:hover {
    color: var(--brand);
}

.rank-main p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}

.rank-score {
    color: #92400e;
    font-size: 18px;
    font-weight: 900;
}

.page-hero {
    padding: 64px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 8%, rgba(34, 197, 94, 0.28), transparent 30%),
        linear-gradient(135deg, #064e3b, #0f172a);
}

.page-head {
    max-width: 800px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.player-card,
.detail-card,
.related-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.22);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.48);
}

.play-mark {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--teal));
    box-shadow: 0 20px 45px rgba(5, 150, 105, 0.36);
}

.play-mark::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.detail-card {
    padding: 28px;
}

.detail-main h1 {
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    border-radius: 12px;
    padding: 7px 10px;
    color: #334155;
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 700;
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #374151;
}

.review-box {
    border-left: 4px solid var(--brand);
    border-radius: 0 18px 18px 0;
    padding: 18px 20px;
    background: #f8fafc;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

.side-poster-body {
    padding: 18px;
}

.related-card {
    margin-top: 18px;
    padding: 20px;
}

.related-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 96px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    background: #0f172a;
}

.related-item h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.35;
}

.related-item h3 a:hover {
    color: var(--brand);
}

.related-item span {
    color: var(--text-muted);
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 34px;
    border: 1px dashed #bbf7d0;
    border-radius: 22px;
    color: var(--text-muted);
    text-align: center;
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

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

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

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

    .hero-card {
        display: none;
    }
}

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

    .desktop-nav,
    .nav-search-link {
        display: none;
    }

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

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

    .brand-text span {
        display: none;
    }

    .hero,
    .hero-inner {
        min-height: 72vh;
    }

    .hero-inner {
        padding: 70px 0 70px;
    }

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

    .section-head {
        display: grid;
        align-items: start;
    }

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

    .movie-card-body {
        padding: 13px;
    }

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

    .search-row {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 42px 78px 1fr;
        gap: 12px;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }

    .rank-cover {
        width: 78px;
        height: 58px;
    }

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

    .feature-band {
        padding: 24px 16px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .section-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
