:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --bg-card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --muted-dark: #cbd5e1;
    --line: #e5e7eb;
    --primary: #059669;
    --primary-strong: #047857;
    --primary-soft: #d1fae5;
    --accent: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
    --max: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
    line-height: 1.65;
}

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

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

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

.navbar {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #2563eb);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.35);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #d1d5db;
    font-size: 14px;
}

.nav-links a {
    padding: 7px 0;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #34d399;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
}

.page-main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: -26px;
    background-size: cover;
    background-position: center;
    filter: blur(22px) brightness(0.42);
    transform: scale(1.08);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 30%, rgba(16, 185, 129, 0.34), transparent 28%),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.28), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.92));
}

.hero-content {
    position: relative;
    width: min(100%, var(--max));
    min-height: 560px;
    margin: 0 auto;
    padding: 64px 18px 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
    gap: 42px;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.92);
    font-size: 13px;
    font-weight: 700;
}

.badge.light {
    color: #065f46;
    background: #d1fae5;
}

.badge.blue {
    background: rgba(37, 99, 235, 0.92);
}

.meta-dot {
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 22px 0 0;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    max-width: 720px;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: #ffffff;
    color: #111827;
    font-weight: 750;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.button.primary {
    background: var(--primary);
    color: #ffffff;
}

.button.primary:hover {
    background: var(--primary-strong);
}

.button.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.hero-card {
    position: relative;
    min-height: 420px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
    background:
        radial-gradient(circle at 30% 18%, rgba(16, 185, 129, 0.36), transparent 26%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-card img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.hero-card.is-fallback img {
    opacity: 0;
}

.hero-card::after {
    content: attr(data-title);
    position: absolute;
    inset: auto 20px 20px 20px;
    z-index: 2;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.34);
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 38%, rgba(15, 23, 42, 0.9));
}

.hero-controls {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.container {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 0 18px;
}

.section {
    padding: 56px 0;
}

.section.compact {
    padding: 34px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.heading-line {
    height: 4px;
    flex: 1 1 auto;
    border-radius: 999px;
    background: linear-gradient(90deg, #10b981, rgba(16, 185, 129, 0));
}

.lead {
    color: var(--muted);
    font-size: 17px;
    margin: 10px 0 0;
    max-width: 850px;
}

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

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
}

.card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(5, 150, 105, 0.28);
}

.poster {
    position: relative;
    overflow: hidden;
    margin: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.28), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b);
}

.poster.portrait {
    aspect-ratio: 3 / 4;
}

.poster.landscape {
    aspect-ratio: 16 / 10;
}

.poster.square {
    aspect-ratio: 1 / 1;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.card:hover .poster img {
    transform: scale(1.07);
}

.poster.is-fallback img {
    opacity: 0;
}

.poster.is-fallback::after {
    content: attr(data-title);
    position: absolute;
    inset: 18px;
    display: grid;
    place-items: center;
    color: #ffffff;
    text-align: center;
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 850;
    line-height: 1.28;
    text-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.poster-meta {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.poster-meta span {
    padding: 3px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 700;
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

.card:hover .card-title {
    color: var(--primary);
}

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

.card-foot {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

.feature-band {
    border-radius: 32px;
    padding: clamp(24px, 5vw, 42px);
    background:
        radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.22), transparent 30%),
        linear-gradient(135deg, #ecfdf5, #eff6ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.category-tile {
    min-height: 188px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #0f172a, #047857);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile h3 {
    margin: 0;
    font-size: 24px;
}

.category-tile p {
    color: rgba(255, 255, 255, 0.78);
    margin: 10px 0 18px;
}

.category-tile .count {
    display: inline-flex;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.35), transparent 28%),
        radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.24), transparent 28%),
        linear-gradient(135deg, #0f172a, #111827);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 860px;
    color: #d1d5db;
    font-size: 17px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: #a7f3d0;
    font-size: 14px;
}

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

.filter-panel {
    margin: -28px auto 36px;
    position: relative;
    z-index: 2;
    width: min(100% - 36px, var(--max));
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    padding: 18px;
}

.search-box {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0 16px;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 100px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.rank-no {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #2563eb);
    font-weight: 900;
}

.rank-thumb {
    height: 86px;
    border-radius: 14px;
    overflow: hidden;
}

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

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

.hot-score {
    padding: 6px 12px;
    border-radius: 999px;
    color: #065f46;
    background: #d1fae5;
    font-weight: 900;
    white-space: nowrap;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #030712;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 35%, rgba(16, 185, 129, 0.24), transparent 25%),
        linear-gradient(180deg, rgba(3, 7, 18, 0.1), rgba(3, 7, 18, 0.56));
    transition: opacity 0.25s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
}

.player-start {
    width: 78px;
    height: 78px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.96);
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.35);
    cursor: pointer;
    pointer-events: auto;
    font-size: 28px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover {
    transform: scale(1.08);
    background: var(--primary-strong);
}

.player-status {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.detail-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    padding: 22px;
}

.detail-card h2,
.detail-card h3 {
    margin-top: 0;
}

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

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

.tag {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-size: 13px;
}

.summary-text {
    color: #334155;
    font-size: 16px;
}

.aside-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

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

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

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

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

.footer-inner {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 46px 18px;
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 28px;
}

.footer-inner h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-inner p,
.footer-inner li {
    color: #94a3b8;
    font-size: 14px;
}

.footer-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-inner li + li {
    margin-top: 8px;
}

.footer-inner a:hover {
    color: #34d399;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 16px;
    display: none;
    place-items: center;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-top.is-visible {
    display: grid;
}

@media (max-width: 980px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 46px;
    }

    .hero-card {
        min-height: 330px;
    }

    .hero-card img {
        height: 330px;
    }

    .grid.cards-4,
    .grid.cards-3,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

@media (max-width: 760px) {
    .nav-toggle {
        display: grid;
    }

    .nav-links {
        position: absolute;
        left: 18px;
        right: 18px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-links a {
        width: 100%;
        padding: 11px 8px;
    }

    .hero {
        min-height: 660px;
    }

    .hero-content {
        min-height: 660px;
    }

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

    .section {
        padding: 38px 0;
    }

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

    .heading-line {
        width: 100%;
        flex: none;
    }

    .grid.cards-4,
    .grid.cards-3,
    .grid.cards-2,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 44px 78px minmax(0, 1fr);
    }

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

    .rank-thumb {
        height: 72px;
    }

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

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