* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #667085;
    --line: #e5e7eb;
    --brand: #059669;
    --brand-dark: #047857;
    --brand-soft: #d1fae5;
    --teal: #0f766e;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    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;
    width: 100%;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

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

.nav-shell {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

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

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

.nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #475467;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-dark);
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #111827;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 16px 18px;
    background: #ffffff;
}

.mobile-panel a {
    display: block;
    padding: 12px 8px;
    border-radius: 12px;
    color: #344054;
    font-weight: 700;
}

.mobile-panel a:hover {
    background: #f3f4f6;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #031f1d;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.42), transparent 34%),
        radial-gradient(circle at 80% 10%, rgba(20, 184, 166, 0.36), transparent 28%),
        linear-gradient(135deg, #064e3b 0%, #0f766e 42%, #111827 100%);
}

.hero-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    padding: 70px 0 52px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 46px;
}

.hero-slide.active {
    display: grid;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 700;
}

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

.hero p,
.page-hero p,
.detail-info .lead {
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.82;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

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

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

.primary-button,
.secondary-button {
    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;
}

.primary-button {
    background: linear-gradient(135deg, #10b981, #14b8a6);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(5, 150, 105, 0.28);
}

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

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

.primary-button.full {
    width: 100%;
}

.hero-cover {
    position: relative;
    display: block;
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.45));
}

.hero-cover img,
.poster img,
.category-poster-strip img {
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #d1fae5, #e0f2fe);
}

.hero-controls {
    display: flex;
    gap: 10px;
    margin-top: 38px;
}

.hero-dot {
    width: 38px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

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

.quick-search {
    background: #ffffff;
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.quick-search h2,
.quick-search p {
    margin: 0;
}

.quick-search p {
    color: var(--muted);
    margin-top: 4px;
}

.filter-bar {
    display: flex;
    align-items: end;
    gap: 12px;
    margin-top: 18px;
}

.search-box {
    flex: 1;
    display: grid;
    gap: 6px;
    color: #344054;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 15px;
    outline: none;
    background: #ffffff;
}

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

.filter-reset {
    height: 48px;
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.card-section {
    padding: 56px 0 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.section-heading span {
    width: 8px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), var(--teal));
}

.section-heading h2 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -0.02em;
}

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

.category-tile,
.category-overview-card,
.side-panel,
.text-panel,
.category-hot-box {
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-tile {
    padding: 22px;
    min-height: 210px;
}

.category-tile h3,
.category-overview-card h2,
.side-panel h2,
.category-hot-box h2,
.text-panel h2 {
    margin: 0 0 10px;
}

.category-tile p,
.category-overview-card p,
.side-panel p,
.text-panel p {
    margin: 0;
    color: var(--muted);
}

.tile-links {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.tile-links a,
.text-link {
    color: var(--brand-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.92);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #d1fae5;
}

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.58));
    opacity: 0.9;
}

.poster-play,
.rank-badge {
    position: absolute;
    z-index: 2;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 900;
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    font-size: 14px;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span,
.detail-meta span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

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

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

.movie-card .tag-row span {
    background: #ecfdf5;
    color: var(--brand-dark);
}

.movie-card.compact .card-body {
    padding: 13px;
}

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 56px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.ranking-num {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 900;
}

.ranking-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.ranking-meta,
.ranking-heat {
    color: #667085;
    font-size: 14px;
    font-weight: 700;
}

.ranking-heat {
    color: var(--brand-dark);
}

.side-panel {
    align-self: start;
    padding: 24px;
    position: sticky;
    top: 90px;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.34), transparent 32%),
        linear-gradient(135deg, #064e3b, #0f766e 46%, #111827);
}

.page-hero .content-shell {
    padding: 78px 0;
}

.compact-hero .content-shell {
    padding: 58px 0;
}

.category-hero-grid,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 34px;
}

.category-hot-box {
    padding: 22px;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    backdrop-filter: blur(16px);
}

.category-hot-box a {
    display: grid;
    gap: 2px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-weight: 900;
}

.category-hot-box span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-poster-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-poster-strip img {
    height: 130px;
    border-radius: 12px;
}

.detail-hero {
    padding: 44px 0;
}

.detail-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
}

.player-card {
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000000;
    overflow: hidden;
}

.player-cover img {
    height: 100%;
    object-fit: cover;
    opacity: 0.66;
    filter: blur(1px);
    transform: scale(1.03);
}

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

.large-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: var(--brand-dark);
    font-size: 30px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.detail-info .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

.detail-info h1 {
    font-size: clamp(32px, 4vw, 54px);
}

.detail-meta {
    margin-top: 18px;
}

.detail-meta span {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.15);
}

.detail-content {
    padding-top: 46px;
    display: grid;
    gap: 20px;
}

.text-panel {
    padding: 28px;
}

.text-panel p {
    font-size: 17px;
    line-height: 1.9;
}

.page-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.page-links a,
.page-links span {
    min-width: 98px;
    text-align: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: #344054;
    font-weight: 800;
}

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

.footer-shell {
    padding: 44px 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 36px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.footer-main p {
    max-width: 580px;
    color: #94a3b8;
}

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

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

.footer-links a {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-copy {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

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

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

    .menu-button {
        display: block;
    }

    .mobile-panel.open {
        display: block;
    }

    .hero-slide,
    .category-hero-grid,
    .detail-layout,
    .split-section,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .hero-cover {
        max-width: 360px;
        margin: 0 auto;
    }

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

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .nav-shell,
    .content-shell,
    .footer-shell,
    .hero-shell {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 20px;
    }

    .hero-shell {
        min-height: auto;
        padding: 44px 0 34px;
    }

    .hero-slide.active {
        display: grid;
        gap: 28px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 34px;
    }

    .hero p,
    .page-hero p,
    .detail-info .lead {
        font-size: 16px;
    }

    .filter-bar,
    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .ranking-meta,
    .ranking-heat {
        grid-column: 2;
    }

    .card-body {
        padding: 12px;
    }

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

    .detail-hero {
        padding: 26px 0;
    }

    .text-panel {
        padding: 20px;
    }
}

@media (max-width: 430px) {
    .movie-grid,
    .dense-grid,
    .category-grid,
    .featured-rank-grid {
        grid-template-columns: 1fr;
    }
}
