:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --deep: #0f172a;
    --deep-2: #172554;
    --primary: #059669;
    --primary-2: #10b981;
    --primary-soft: #d1fae5;
    --accent: #f59e0b;
    --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #22c55e);
    box-shadow: 0 12px 28px rgba(5, 150, 105, 0.32);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #047857;
    background: var(--primary-soft);
}

.header-search {
    position: relative;
    width: min(310px, 30vw);
}

.search-box {
    position: relative;
    display: block;
}

.search-box input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 16px 10px 40px;
    color: var(--text);
    outline: none;
    background: #ffffff;
    transition: 0.2s ease;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-weight: 900;
}

.search-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(520px, 86vw);
    max-height: 430px;
    overflow: auto;
    padding: 10px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-result {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: 0.2s ease;
}

.search-result:hover {
    background: #f1f5f9;
}

.search-result img {
    width: 48px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.search-result strong {
    display: block;
    font-size: 15px;
}

.search-result span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.menu-button {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #ecfdf5;
    color: #047857;
}

.mobile-nav {
    padding: 8px 22px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav-link {
    display: block;
    padding: 12px 2px;
    color: #334155;
    font-weight: 800;
}

.mobile-nav-link.active {
    color: var(--primary);
}

.mobile-search {
    margin-bottom: 10px;
}

.page-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 22px 70px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    border-radius: 0 0 42px 42px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.46), transparent 34%),
        linear-gradient(135deg, #031b15 0%, #0f172a 47%, #172554 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.62) 46%, rgba(2, 6, 23, 0.84) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    opacity: 0.8;
    transition: background-image 0.35s ease;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -35% -10%;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.34), transparent 66%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    padding: 86px 22px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
    gap: 44px;
    align-items: center;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(167, 243, 208, 0.4);
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(14px);
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.button.primary {
    color: #052e1b;
    background: linear-gradient(135deg, #a7f3d0, #34d399);
    box-shadow: 0 18px 38px rgba(16, 185, 129, 0.28);
}

.button.secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-tags a,
.hero-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.09);
}

.hero-panel {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 34px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(18px) scale(0.98);
    pointer-events: none;
    transition: 0.45s ease;
    background: rgba(15, 23, 42, 0.55);
    box-shadow: 0 38px 80px rgba(2, 6, 23, 0.38);
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 4%, rgba(2, 6, 23, 0.18) 72%);
}

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

.hero-slide h2 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.16;
}

.hero-slide p {
    margin: 0 0 18px;
    color: #e2e8f0;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: 26px;
    bottom: 24px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
    width: 24px;
    border-radius: 999px;
    background: #34d399;
}

.section {
    margin-top: 44px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(25px, 4vw, 36px);
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.section-subtitle {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

.more-link {
    color: #047857;
    font-weight: 900;
    white-space: nowrap;
}

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

.category-pill {
    min-height: 108px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 0%, rgba(16, 185, 129, 0.18), transparent 40%),
        #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
    transition: 0.22s ease;
}

.category-pill:hover {
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.38);
    box-shadow: var(--shadow);
}

.category-pill strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.category-pill span {
    color: var(--muted);
    font-size: 14px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(14, 165, 233, 0.22)),
        #e2e8f0;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #064e3b;
    background: rgba(209, 250, 229, 0.92);
    font-size: 12px;
    font-weight: 900;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

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

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

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

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 18px;
    border-radius: 28px;
    background: #0f172a;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.rank-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item a {
    display: grid;
    grid-template-columns: 36px 48px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 9px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.rank-item a:hover {
    background: rgba(16, 185, 129, 0.18);
}

.rank-no {
    color: #a7f3d0;
    font-weight: 900;
}

.rank-item img {
    width: 48px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
}

.rank-info em {
    display: block;
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 12px;
    font-style: normal;
}

.rank-heat {
    color: #fef3c7;
    font-size: 12px;
    font-weight: 900;
}

.page-hero {
    padding: 44px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 20%, rgba(52, 211, 153, 0.33), transparent 35%),
        linear-gradient(135deg, #064e3b, #0f172a 62%, #172554);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 6vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

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

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0;
}

.toolbar input,
.toolbar select {
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 10px 16px;
    background: #ffffff;
    outline: none;
}

.toolbar input {
    flex: 1 1 280px;
}

.toolbar select {
    flex: 0 0 170px;
}

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

.category-card {
    min-height: 210px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
    transition: 0.22s ease;
}

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

.category-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 32px;
    padding: 30px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.22), transparent 35%),
        linear-gradient(135deg, #0f172a, #111827 54%, #064e3b);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

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

.breadcrumb {
    margin-bottom: 18px;
    color: #a7f3d0;
    font-size: 14px;
    font-weight: 800;
}

.detail-content h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

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

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 800;
}

.detail-intro {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

.content-card {
    margin-top: 26px;
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

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

.content-card p {
    margin: 0 0 14px;
    color: #334155;
}

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), rgba(2, 6, 23, 0.12));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-circle {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #064e3b;
    background: #a7f3d0;
    font-size: 34px;
    box-shadow: 0 22px 48px rgba(16, 185, 129, 0.38);
}

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

.site-footer {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #111827 58%, #064e3b);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 44px 22px;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 900;
}

.footer-brand p {
    max-width: 430px;
    color: #cbd5e1;
}

.footer-links h2 {
    margin: 0 0 12px;
    color: #a7f3d0;
    font-size: 18px;
}

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

.footer-link-grid a {
    color: #cbd5e1;
}

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

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 22px 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 14px;
}

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

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

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

    .rank-panel {
        position: static;
    }

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

@media (max-width: 880px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-button {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero {
        min-height: auto;
        border-radius: 0 0 28px 28px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        padding-top: 54px;
    }

    .hero-panel {
        min-height: 460px;
    }

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

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

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

    .detail-poster {
        max-width: 340px;
    }

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

@media (max-width: 620px) {
    .header-inner {
        padding: 12px 16px;
    }

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

    .page-main {
        padding: 24px 16px 52px;
    }

    .hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .button {
        width: 100%;
    }

    .hero-panel {
        min-height: 430px;
    }

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

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

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

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

    .page-hero {
        padding: 28px;
    }

    .content-card,
    .detail-hero {
        padding: 20px;
        border-radius: 24px;
    }
}
