* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --line: #e5e7eb;
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --cyan: #0891b2;
    --orange: #ea580c;
    --rose: #e11d48;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 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;
    width: 100%;
}

button,
input,
select {
    font: inherit;
}

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

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 14px 30px rgba(5, 150, 105, 0.26);
}

.brand-text,
.footer-brand {
    font-size: 24px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--emerald-dark);
    background: #ecfdf5;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ecfdf5;
    color: var(--emerald-dark);
    cursor: pointer;
}

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

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 560px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    align-items: center;
    gap: 34px;
    padding: 58px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.55s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(20, 184, 166, 0.36), transparent 36%),
        radial-gradient(circle at 84% 16%, rgba(5, 150, 105, 0.32), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82));
}

.hero-content,
.hero-poster-wrap {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a7f3d0;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 14px 0 16px;
    color: #ffffff;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero h2 {
    font-size: clamp(30px, 5vw, 58px);
}

.hero p {
    max-width: 660px;
    margin: 0 0 24px;
    color: #d1fae5;
    font-size: 18px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.tag-row span,
.detail-tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ecfdf5;
    font-size: 13px;
    font-weight: 650;
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 16px 30px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-soft {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    padding: 8px;
    margin-top: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 0 12px;
}

.hero-search input::placeholder {
    color: rgba(236, 253, 245, 0.72);
}

.hero-search button {
    border: 0;
    cursor: pointer;
}

.hero-poster-wrap {
    display: grid;
    gap: 16px;
}

.hero-poster {
    aspect-ratio: 4 / 5;
    width: min(360px, 100%);
    justify-self: end;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
    background: rgba(255, 255, 255, 0.08);
}

.hero-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-slide:hover .hero-poster img {
    transform: scale(1.06);
}

.hero-stat {
    justify-self: end;
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 12px;
    color: #ffffff;
}

.hero-stat span {
    min-width: 84px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    text-align: center;
    font-weight: 750;
}

.hero-controls {
    position: absolute;
    left: 58px;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

.page-hero {
    margin: 28px auto 34px;
    padding: 46px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34%),
        linear-gradient(135deg, #ffffff, #f0fdfa);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    border: 1px solid #d1fae5;
}

.page-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.section {
    padding: 54px 0;
}

.section.alt {
    background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.035em;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-more {
    flex: 0 0 auto;
    color: var(--emerald-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(16, 185, 129, 0.35);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.year-pill,
.rank-badge,
.score-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 800;
}

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

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #cbd5e1;
}

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

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

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.detail-tag-row span {
    color: var(--emerald-dark);
    background: #ecfdf5;
}

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

.category-card {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    top: -34px;
    right: -34px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
}

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 22px;
}

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

.category-card strong {
    position: relative;
    color: var(--emerald-dark);
}

.accent-teal .category-glow { background: rgba(13, 148, 136, 0.18); }
.accent-indigo .category-glow { background: rgba(99, 102, 241, 0.16); }
.accent-orange .category-glow { background: rgba(249, 115, 22, 0.18); }
.accent-rose .category-glow { background: rgba(244, 63, 94, 0.16); }
.accent-slate .category-glow { background: rgba(71, 85, 105, 0.16); }
.accent-cyan .category-glow { background: rgba(8, 145, 178, 0.16); }
.accent-amber .category-glow { background: rgba(245, 158, 11, 0.18); }
.accent-lime .category-glow { background: rgba(101, 163, 13, 0.16); }
.accent-purple .category-glow { background: rgba(147, 51, 234, 0.16); }

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin-top: 28px;
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-weight: 750;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid #dbeafe;
    outline: 0;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px auto 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald-dark);
    font-weight: 750;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(16, 185, 129, 0.28), transparent 42%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 45px rgba(5, 150, 105, 0.36);
}

.play-icon::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-info-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-info-card h1 {
    margin: 10px 0 14px;
    font-size: clamp(30px, 4.5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 750;
    font-size: 13px;
}

.detail-lead {
    color: #334155;
    font-size: 17px;
}

.detail-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.content-card {
    margin-bottom: 24px;
    padding: 30px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.content-card p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 74px 96px minmax(0, 1fr) 110px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.ranking-number {
    color: #f97316;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.ranking-cover {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

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

.ranking-main h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.ranking-main p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ranking-score {
    justify-self: end;
    color: var(--emerald-dark);
    font-size: 18px;
    font-weight: 900;
}

.site-footer {
    margin-top: 54px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #111827 54%, #0f172a);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    gap: 16px;
}

.footer-brand {
    width: max-content;
    font-weight: 900;
}

.footer-inner p {
    max-width: 720px;
    margin: 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 750;
}

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

.copyright {
    font-size: 14px;
}

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

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

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

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

    .hero-poster-wrap {
        display: none;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border-radius: 18px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        justify-content: center;
    }

    .hero,
    .hero-track {
        min-height: 600px;
    }

    .hero-slide {
        padding: 34px 24px 74px;
    }

    .hero-controls {
        left: 24px;
        bottom: 28px;
    }

    .hero-search {
        flex-direction: column;
        align-items: stretch;
        border-radius: 22px;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 560px) {
    .brand-text {
        font-size: 20px;
    }

    .page-hero {
        padding: 30px 22px;
    }

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

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

    .hero,
    .hero-track {
        min-height: 650px;
    }

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

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