:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #ecfdf5;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #059669;
    --brand-strong: #047857;
    --brand-soft: #d1fae5;
    --accent: #0f766e;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

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

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
    font-size: 14px;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px 0 16px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

main {
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    background: #020617;
    color: #ffffff;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.58fr);
    align-items: center;
    gap: 56px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 88px 0 150px;
}

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

.hero-bg {
    position: absolute;
    inset: 0 calc((100vw - min(1180px, calc(100vw - 32px))) / -2);
    background-size: cover;
    background-position: center;
    filter: saturate(1.15);
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 24%, rgba(16, 185, 129, 0.34), transparent 30%), linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.82));
}

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

.eyebrow {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.light-heading .eyebrow {
    color: #a7f3d0;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(46px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.hero-tags,
.movie-tags,
.detail-meta,
.hero-pills,
.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.movie-tags span,
.detail-meta span,
.hero-pills a,
.filter-chip {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.86);
    color: #0f172a;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 700;
}

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

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.strip-heading a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 16px 36px rgba(5, 150, 105, 0.34);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.strip-heading a:hover {
    transform: translateY(-2px);
}

.hero-poster {
    width: min(100%, 390px);
    justify-self: end;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.22);
    transform: rotate(2.5deg);
}

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

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

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(10px);
    font-size: 30px;
    line-height: 1;
}

.hero-search-panel {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 6;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 120px minmax(220px, 420px) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.hero-search-panel label {
    color: #ffffff;
    font-weight: 800;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 15px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.search-box span {
    color: var(--brand);
    font-weight: 900;
}

.hero-pills a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.content-section,
.category-overview,
.filter-panel,
.detail-content,
.watch-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 70px 0;
}

.section-heading,
.strip-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.section-heading h2,
.strip-heading h2,
.page-hero h1,
.detail-copy h1,
.text-panel h2 {
    margin: 0;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.section-heading h2,
.strip-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-link,
.strip-heading a {
    color: var(--brand);
    background: var(--brand-soft);
}

.light-heading h2,
.light-heading .section-link,
.light-link {
    color: #ffffff;
}

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

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

.movie-card,
.category-card,
.text-panel,
.related-card {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.86);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.movie-card {
    border-radius: 22px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-play,
.related-cover span,
.detail-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.92);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play,
.related-cover:hover span,
.detail-poster:hover span {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.25);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.movie-info h2 {
    margin: 9px 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.movie-info h2 a:hover,
.related-card h3 a:hover,
.category-body h2 a:hover {
    color: var(--brand);
}

.movie-info p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags span {
    background: #f8fafc;
    color: #475569;
    padding: 5px 9px;
    font-size: 12px;
}

.ranking-band {
    padding: 70px max(16px, calc((100vw - 1180px) / 2));
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.25), transparent 30%), linear-gradient(135deg, #064e3b, #0f172a 70%);
}

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 180px;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scrollbar-width: thin;
}

.movie-card-compact .movie-info h2 {
    font-size: 16px;
}

.category-strip {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
    border-top: 1px solid rgba(226, 232, 240, 0.82);
}

.strip-heading .eyebrow {
    max-width: 720px;
    color: var(--muted);
    letter-spacing: 0;
    text-transform: none;
}

.page-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 38px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 32px;
    min-height: 310px;
    padding: 46px;
    border-radius: 34px;
    color: #ffffff;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(167, 243, 208, 0.2), transparent 35%), linear-gradient(135deg, #064e3b, #0f172a);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.page-hero p:not(.eyebrow) {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.page-search {
    justify-self: end;
    width: 100%;
}

.filter-panel {
    align-items: center;
    padding: 34px 0 0;
}

.filter-chip {
    border: 0;
    cursor: pointer;
    color: var(--text);
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}

.category-overview {
    padding: 54px 0 76px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.category-card {
    overflow: hidden;
    border-radius: 26px;
}

.category-art {
    display: flex;
    align-items: end;
    justify-content: end;
    min-height: 190px;
    padding: 18px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
}

.category-art span {
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    font-weight: 800;
}

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 10px;
    font-size: 25px;
}

.category-body p {
    margin: 0 0 16px;
    color: var(--muted);
}

.category-samples {
    display: grid;
    gap: 7px;
}

.category-samples a {
    color: #334155;
    font-size: 14px;
}

.category-samples a:hover {
    color: var(--brand);
}

.detail-hero {
    position: relative;
    color: #ffffff;
    background: #020617;
    overflow: hidden;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 34px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #a7f3d0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.detail-copy h1 {
    font-size: clamp(42px, 6vw, 76px);
}

.detail-line {
    max-width: 820px;
    margin: 22px 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.detail-meta span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.22);
}

.detail-tags {
    margin: 18px 0 28px;
}

.watch-section {
    padding: 70px 0 34px;
}

.player-shell {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.22);
    aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background: #020617;
    overflow: hidden;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.1);
}

.player-cover strong,
.big-play {
    position: relative;
    z-index: 3;
}

.player-cover strong {
    display: block;
    margin-top: 118px;
    font-size: clamp(24px, 4vw, 44px);
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
}

.big-play {
    position: absolute;
    left: 50%;
    top: 46%;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 20px 54px rgba(5, 150, 105, 0.36);
    transform: translate(-50%, -50%);
    font-size: 28px;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.detail-content {
    padding: 24px 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.text-panel {
    border-radius: 26px;
    padding: 30px;
}

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

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

.related-section {
    padding-top: 40px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    border-radius: 22px;
    padding: 12px;
}

.related-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #0f172a;
}

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

.related-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

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

.site-footer {
    background: linear-gradient(135deg, #0f172a, #111827 58%, #064e3b);
    color: rgba(255, 255, 255, 0.82);
    margin-top: 50px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 38px;
}

.footer-brand p {
    max-width: 390px;
    color: rgba(255, 255, 255, 0.62);
}

.footer-group h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 16px;
    text-align: center;
    color: rgba(255, 255, 255, 0.56);
    font-size: 14px;
}

[data-search-card].is-hidden {
    display: none;
}

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

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

@media (max-width: 860px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .brand-text {
        font-size: 22px;
    }

    .hero-carousel {
        min-height: 780px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 58px 0 260px;
    }

    .hero-poster {
        justify-self: start;
        width: 220px;
        transform: rotate(0deg);
    }

    .hero-search-panel {
        grid-template-columns: 1fr;
        bottom: 20px;
    }

    .hero-controls {
        bottom: 222px;
    }

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

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

    .page-search {
        justify-self: stretch;
    }

    .detail-poster {
        width: 220px;
    }

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

@media (max-width: 540px) {
    .site-nav {
        width: min(100% - 22px, 1180px);
        min-height: 66px;
    }

    .hero-slide,
    .content-section,
    .category-strip,
    .category-overview,
    .filter-panel,
    .detail-content,
    .watch-section,
    .detail-wrap,
    .page-hero {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-copy,
    .detail-line,
    .page-hero p:not(.eyebrow) {
        font-size: 16px;
    }

    .hero-actions,
    .section-heading,
    .strip-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .movie-row {
        grid-auto-columns: 74%;
    }

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

    .player-shell {
        border-radius: 20px;
    }

    .big-play {
        width: 72px;
        height: 72px;
    }
}
