:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #059669;
    --brand-2: #0d9488;
    --brand-dark: #064e3b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

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

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    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-size: 20px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: #334155;
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-dark);
    background: #d1fae5;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #ecfdf5;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--brand-dark);
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
    padding: 90px 0 160px;
}

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

.hero-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
    transform: scale(1.03);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 20%, rgba(16, 185, 129, 0.28), transparent 30%), linear-gradient(180deg, rgba(2, 6, 23, 0.25), #020617 95%);
}

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

.hero-kicker,
.inner-hero span,
.section-head span,
.spotlight-card span {
    display: inline-flex;
    align-items: center;
    color: #10b981;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 780px;
    margin: 18px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 35px rgba(5, 150, 105, 0.32);
}

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

.hero-poster {
    display: block;
    border-radius: 34px;
    overflow: hidden;
    min-height: 500px;
    background: linear-gradient(135deg, #065f46, #14b8a6 50%, #0f172a);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
}

.hero-search-panel {
    position: absolute;
    left: 50%;
    bottom: 42px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(18px);
}

.hero-search-panel span {
    color: #a7f3d0;
    font-weight: 700;
}

.hero-search-panel strong {
    display: block;
    font-size: 20px;
}

.hero-dots {
    position: absolute;
    z-index: 6;
    right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
    bottom: 142px;
    display: flex;
    gap: 9px;
}

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

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

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(520px, 100%);
}

.search-form input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    padding: 0 18px;
    outline: none;
}

.search-form button {
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
}

.search-form.compact input {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.92);
}

.section {
    padding: 72px 0;
}

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

.section-head h2 {
    margin: 4px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-head a {
    color: var(--brand);
    font-weight: 800;
}

.section-head.light h2,
.section-head.light a {
    color: #ffffff;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.movie-card.featured .poster {
    aspect-ratio: 16 / 10;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #0f766e 52%, #0f172a);
}

.poster img,
.rank-cover img,
.channel-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.62);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 18px;
}

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

.movie-meta {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.movie-desc {
    margin: 0 0 14px;
    color: #334155;
    font-size: 15px;
}

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

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-size: 12px;
    font-weight: 700;
}

.tag-row.bright span {
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.channel-section {
    background: linear-gradient(135deg, #064e3b, #0f766e 55%, #020617);
}

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

.channel-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 24px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.channel-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 5%, rgba(2, 6, 23, 0.84) 92%);
}

.channel-card img {
    position: absolute;
    inset: 0;
    opacity: 0.82;
}

.channel-card strong,
.channel-card p,
.channel-glow {
    position: relative;
    z-index: 2;
}

.channel-card strong {
    font-size: 21px;
    margin-bottom: 6px;
}

.channel-card p {
    margin: 0;
    color: #d1fae5;
    font-size: 14px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
    gap: 28px;
    align-items: start;
}

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

.compact-rank .rank-item:nth-child(n + 7) {
    display: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    background: linear-gradient(135deg, #065f46, #14b8a6, #0f172a);
}

.rank-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-weight: 900;
}

.rank-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

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

.rank-item strong {
    color: #047857;
}

.spotlight-card {
    position: sticky;
    top: 96px;
    padding: 30px;
    border-radius: 28px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(52, 211, 153, 0.5), transparent 34%), linear-gradient(135deg, #064e3b, #0f172a);
    box-shadow: var(--shadow);
}

.spotlight-card h2 {
    margin: 10px 0;
    font-size: 34px;
    line-height: 1.12;
}

.spotlight-card p {
    color: #d1fae5;
}

.inner-hero {
    padding: 82px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.35), transparent 30%), linear-gradient(135deg, #064e3b, #0f766e 58%, #020617);
}

.ranking-hero {
    background: radial-gradient(circle at 80% 0%, rgba(45, 212, 191, 0.34), transparent 30%), linear-gradient(135deg, #020617, #064e3b 55%, #0f766e);
}

.inner-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 34px;
    align-items: center;
}

.inner-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

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

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.quick-links a {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.10);
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 28%, rgba(20, 184, 166, 0.35), transparent 26%), linear-gradient(180deg, rgba(2, 6, 23, 0.08), #020617 98%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 78px 0 86px;
}

.detail-poster {
    min-height: 460px;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b, #14b8a6, #0f172a);
    box-shadow: 0 34px 84px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
    margin: 12px 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.crumb {
    display: inline-flex;
    color: #a7f3d0;
    font-weight: 800;
}

.detail-one-line {
    max-width: 780px;
    color: #dbeafe;
    font-size: 19px;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

.player-section {
    padding-top: 38px;
}

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

.player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.54));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 24px 60px rgba(5, 150, 105, 0.42);
    cursor: pointer;
}

.play-button span {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 25px solid #ffffff;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    padding-top: 32px;
}

.detail-content article,
.detail-content aside {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #ffffff;
    padding: 26px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.detail-content h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 15px;
    color: #334155;
}

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

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    font-weight: 700;
}

.site-footer {
    color: #cbd5e1;
    background: #020617;
    padding: 54px 0;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

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

.footer-links a {
    color: #cbd5e1;
}

.no-result {
    padding: 24px;
    border-radius: 22px;
    color: #065f46;
    background: #d1fae5;
    font-weight: 800;
}

@media (max-width: 1024px) {
    .hero-slide,
    .inner-hero-grid,
    .detail-layout,
    .detail-content,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        padding-bottom: 210px;
    }

    .hero-poster {
        display: none;
    }

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

    .spotlight-card {
        position: static;
    }
}

@media (max-width: 780px) {
    .nav-wrap {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .main-nav.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-link {
        background: #f1f5f9;
    }

    .hero {
        min-height: 760px;
    }

    .hero-slide {
        padding-top: 70px;
        padding-bottom: 235px;
    }

    .hero-search-panel {
        align-items: stretch;
        flex-direction: column;
        bottom: 28px;
    }

    .search-form,
    .search-form.compact {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input,
    .search-form button {
        width: 100%;
    }

    .hero-dots {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 210px;
    }

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

    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-cover {
        aspect-ratio: 16 / 9;
    }

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

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

    .detail-poster {
        min-height: auto;
        aspect-ratio: 2 / 3;
    }
}
