:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-strong: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --emerald: #10b981;
    --emerald-dark: #047857;
    --emerald-soft: rgba(16, 185, 129, 0.14);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(16, 185, 129, 0.08), transparent 34rem),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    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 {
    max-width: 100%;
    display: block;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 58%, #111827 100%);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ecfdf5;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.brand-text small {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
}

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

.nav-link {
    padding: 9px 12px;
    border-radius: 10px;
    color: #dbeafe;
    font-size: 14px;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.top-search {
    display: flex;
    align-items: center;
    width: min(330px, 30vw);
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
}

.top-search input {
    width: 100%;
    min-width: 0;
    color: #fff;
    border: 0;
    outline: 0;
    padding: 9px 12px;
    background: transparent;
}

.top-search input::placeholder {
    color: #94a3b8;
}

.top-search button,
.filter-search-row button {
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav .nav-link,
.mobile-category-links a {
    display: block;
    padding: 12px 8px;
    color: #e2e8f0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
}

main {
    min-height: 60vh;
}

.hero {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.7fr);
    gap: 22px;
}

.hero-main {
    position: relative;
    min-height: 590px;
    border-radius: 30px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 22%, rgba(16, 185, 129, 0.34), transparent 22rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.36) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 48%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 84px 56px 64px;
    color: #fff;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: #10b981;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

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

.hero-tags,
.detail-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(167, 243, 208, 0.25);
}

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

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 18px 36px rgba(16, 185, 129, 0.3);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-line {
    color: #a7f3d0;
    border: 1px solid rgba(167, 243, 208, 0.38);
}

.hero-dots {
    position: absolute;
    left: 56px;
    bottom: 36px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 28px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 48px;
    background: #10b981;
}

.hero-side {
    display: grid;
    gap: 18px;
}

.hero-search-card,
.hero-category-card,
.hero-mini-list,
.ranking-panel,
.filter-panel,
.detail-content,
.player-section,
.category-overview-card,
.side-recommend {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.hero-search-card {
    padding: 22px;
}

.hero-search-card strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
}

.hero-search-card p {
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.hero-search-card form {
    display: flex;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
}

.hero-search-card input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    background: transparent;
}

.hero-search-card button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: var(--dark);
    cursor: pointer;
}

.hero-category-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
}

.hero-category-card a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    color: #0f172a;
    background: #f8fafc;
    font-weight: 800;
}

.hero-category-card a:hover {
    color: #047857;
    background: #ecfdf5;
}

.hero-mini-list {
    padding: 14px;
}

.section {
    width: min(1220px, calc(100% - 32px));
    margin: 32px auto;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -0.035em;
}

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

.section-link {
    color: #047857;
    font-weight: 800;
}

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

.category-tile {
    min-height: 150px;
    padding: 22px;
    border-radius: 22px;
    color: #fff;
    background:
        radial-gradient(circle at 90% 20%, rgba(167, 243, 208, 0.28), transparent 9rem),
        linear-gradient(135deg, #0f172a, #1e293b);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-tile:hover,
.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.15);
}

.category-tile strong {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
}

.category-tile span {
    color: #cbd5e1;
    font-size: 14px;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 22;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.055);
}

.cover-gradient {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78));
}

.badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge-type {
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.badge-year {
    right: 12px;
    bottom: 12px;
    background: rgba(4, 120, 87, 0.92);
}

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

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

.movie-card h3 a:hover {
    color: #047857;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 13px;
}

.movie-meta-line span + span::before {
    content: "·";
    margin-right: 8px;
    color: #94a3b8;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 138px;
}

.movie-card-compact .movie-cover {
    aspect-ratio: auto;
    height: 100%;
}

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

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

.movie-card-compact p {
    min-height: 0;
    font-size: 13px;
}

.movie-card-compact .tag-list {
    display: none;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 40px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 8px;
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.18s ease, transform 0.18s ease;
}

.ranking-item:hover {
    background: #ecfdf5;
    transform: translateX(3px);
}

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

.ranking-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.ranking-info {
    min-width: 0;
}

.ranking-info strong,
.ranking-info small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-info small {
    color: var(--muted);
}

.page-hero,
.detail-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 28px auto;
    border-radius: 28px;
    background:
        radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.2), transparent 28rem),
        linear-gradient(135deg, #fff, #f8fafc);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.page-hero {
    padding: 52px;
}

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

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

.filter-panel {
    width: min(1220px, calc(100% - 32px));
    margin: 24px auto;
    padding: 20px;
}

.filter-search-row {
    display: flex;
    gap: 10px;
}

.filter-search-row input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 16px;
    outline: 0;
}

.filter-search-row input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-groups {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.filter-group {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.filter-group strong {
    padding-top: 6px;
    color: #0f172a;
}

.filter-group div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-group button {
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 6px 12px;
    color: #334155;
    background: #fff;
    cursor: pointer;
}

.filter-group button.is-active,
.filter-group button:hover {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.42);
    background: #ecfdf5;
}

.empty-state {
    display: none;
    padding: 42px;
    color: var(--muted);
    text-align: center;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.empty-state.is-visible {
    display: block;
}

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

.category-overview-card {
    overflow: hidden;
}

.category-overview-link {
    display: block;
}

.category-preview-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: 170px;
    background: #e2e8f0;
}

.category-preview-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-body {
    padding: 22px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
}

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

.category-overview-body span {
    color: #047857;
    font-weight: 800;
}

.ranking-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(360px, 0.48fr);
    gap: 24px;
    align-items: start;
}

.large-ranking-list {
    padding: 20px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
}

.side-recommend {
    padding: 20px;
}

.breadcrumb {
    width: min(1220px, calc(100% - 32px));
    margin: 24px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #047857;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    padding: 34px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.18);
    background: #e2e8f0;
}

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

.detail-info h1 {
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
}

.detail-one-line {
    margin: 18px 0 22px;
    color: #475569;
    font-size: 18px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.detail-meta-grid div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.detail-meta-grid strong,
.detail-meta-grid span {
    display: block;
}

.detail-meta-grid strong {
    color: var(--muted);
    font-size: 12px;
}

.detail-meta-grid span {
    margin-top: 4px;
    font-weight: 800;
}

.player-section {
    padding: 24px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.32);
    font-size: 34px;
    text-indent: 4px;
}

.player-overlay strong {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
}

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

.detail-content {
    padding: 28px;
}

.detail-content h2 {
    margin-top: 8px;
    font-size: 30px;
}

.detail-content p {
    margin: 12px 0 24px;
    color: #475569;
    font-size: 17px;
}

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

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    gap: 32px;
}

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

.footer-brand p {
    max-width: 620px;
    margin: 10px 0 0;
    color: #94a3b8;
}

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

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

@media (max-width: 1100px) {
    .hero,
    .two-column-section,
    .ranking-page-grid {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }

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

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

    .header-inner {
        height: 66px;
    }

    .mobile-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-main {
        min-height: 560px;
    }

    .hero-content {
        padding: 54px 28px 72px;
    }

    .hero-dots {
        left: 28px;
        bottom: 28px;
    }

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

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .brand {
        min-width: 0;
    }

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

    .brand-text small {
        display: none;
    }

    .hero,
    .section,
    .filter-panel,
    .page-hero,
    .detail-hero,
    .breadcrumb {
        width: min(100% - 22px, 1220px);
    }

    .hero-main {
        min-height: 520px;
        border-radius: 24px;
    }

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

    .hero-actions {
        display: grid;
    }

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

    .filter-search-row {
        display: grid;
    }

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

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

    .movie-card-compact {
        grid-template-columns: 94px minmax(0, 1fr);
    }

    .detail-hero {
        padding: 20px;
    }

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

    .player-section,
    .detail-content {
        padding: 18px;
    }
}
