:root {
    --bg: #f8faf7;
    --surface: #ffffff;
    --surface-soft: #f3f6f1;
    --text: #1c1917;
    --muted: #78716c;
    --line: #e7e5e4;
    --green: #16a34a;
    --green-dark: #15803d;
    --amber: #f59e0b;
    --stone: #292524;
    --shadow: 0 20px 60px rgba(28, 25, 23, 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.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
    backdrop-filter: blur(18px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--stone);
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    box-shadow: 0 14px 26px rgba(22, 163, 74, 0.28);
}

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

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

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

.nav-link:hover,
.nav-link.is-active {
    color: var(--green-dark);
    background: #ecfdf5;
}

.header-search,
.mobile-search,
.big-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(22, 163, 74, 0.7);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.header-search button,
.mobile-search button,
.big-search button,
.filter-panel button,
.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    box-shadow: 0 14px 26px rgba(22, 163, 74, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.filter-panel button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(22, 163, 74, 0.28);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.mobile-menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--stone);
}

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

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-panel nav a {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f5f5f4;
    font-weight: 800;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 12px 14px;
}

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

.hero-section {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-bg,
.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(22, 163, 74, 0.32), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0;
    color: #fff;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    max-width: 780px;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    color: #fff;
    background: var(--green);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.section-kicker {
    color: var(--green-dark);
    background: #dcfce7;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
}

.hero-tags span,
.tag {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 11px 18px;
    color: #fff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 36px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.is-active {
    background: #fff;
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: 38px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.quick-search-panel h2,
.section-heading h2,
.ranking-box h2,
.text-card h2,
.category-overview-card h2 {
    margin: 8px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.quick-search-panel p {
    margin: 10px 0 0;
    color: var(--muted);
}

.big-search input {
    min-width: 0;
    flex: 1;
    padding: 14px 18px;
}

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

.section-heading.compact {
    margin-top: 0;
}

.section-heading a,
.text-link {
    color: var(--green-dark);
    font-weight: 900;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 12px 30px rgba(28, 25, 23, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(22, 163, 74, 0.35);
    box-shadow: 0 24px 56px rgba(28, 25, 23, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(145deg, #1c1917, #44403c);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.08);
    filter: brightness(0.78);
}

.play-badge {
    position: absolute;
    inset: auto 12px 12px auto;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(22, 163, 74, 0.95);
    font-size: 13px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 8px 0 6px;
    font-size: 16px;
    line-height: 1.3;
}

.movie-card h3 a:hover {
    color: var(--green-dark);
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.mini-tags span {
    border-radius: 999px;
    padding: 4px 8px;
    background: var(--surface-soft);
    color: #57534e;
    font-size: 11px;
    font-weight: 800;
}

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

.ranking-box {
    position: sticky;
    top: 96px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: linear-gradient(180deg, #ffffff, #f6f8f4);
    box-shadow: var(--shadow);
}

.ranking-box ol,
.ranking-list-large {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 40px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-number {
    color: var(--amber);
    font-size: 20px;
    font-weight: 950;
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    background: #292524;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.category-tile {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 22px;
    border-radius: var(--radius);
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.55), transparent 35%),
        linear-gradient(135deg, #1c1917, #44403c);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile span {
    font-size: 22px;
    font-weight: 950;
}

.category-tile strong {
    margin: 6px 0;
    color: #bbf7d0;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 20% 30%, rgba(22, 163, 74, 0.36), transparent 28%),
        linear-gradient(135deg, #1c1917, #292524 45%, #0f172a);
}

.compact-page-hero .section-wrap {
    padding: 64px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 16px 38px rgba(28, 25, 23, 0.08);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: #292524;
}

.category-overview-card p {
    color: var(--muted);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 150px 140px auto auto;
    gap: 12px;
    align-items: center;
    padding: 18px;
    margin-top: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 34px rgba(28, 25, 23, 0.08);
}

.sticky-filter {
    position: sticky;
    top: 88px;
    z-index: 20;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 12px 14px;
}

.filter-count {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.ranking-page-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    padding-top: 42px;
}

.ranking-list-large {
    position: sticky;
    top: 96px;
    align-self: start;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    filter: blur(4px) scale(1.04);
    opacity: 0.72;
}

.detail-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.32)),
        linear-gradient(0deg, rgba(248, 250, 247, 1) 0%, rgba(248, 250, 247, 0) 34%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 44px 0 80px;
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    background: #292524;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
}

.detail-tags .tag {
    color: #fff;
}

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

.detail-meta div {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta dd {
    margin: 4px 0 0;
    color: #fff;
    font-weight: 900;
}

.player-section {
    margin-top: -40px;
    position: relative;
    z-index: 4;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.video-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(22, 163, 74, 0.22), transparent 28%),
        rgba(0, 0, 0, 0.35);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-start.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.play-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 4px;
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    box-shadow: 0 18px 44px rgba(22, 163, 74, 0.32);
    font-size: 30px;
}

.video-start strong {
    font-size: 24px;
}

.video-start em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
}

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

.text-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 16px 38px rgba(28, 25, 23, 0.08);
}

.text-card p {
    margin: 16px 0 0;
    color: #44403c;
    font-size: 16px;
}

.site-footer {
    margin-top: 72px;
    padding: 52px 0 26px;
    color: #d6d3d1;
    background: linear-gradient(135deg, #1c1917, #292524);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
    gap: 28px;
}

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

.footer-grid p,
.footer-grid li {
    color: #a8a29e;
    font-size: 14px;
}

.footer-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-grid a:hover {
    color: #86efac;
}

.footer-bottom {
    margin: 34px 0 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #a8a29e;
    text-align: center;
    font-size: 13px;
}

.is-hidden-card {
    display: none !important;
}

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

    .split-layout,
    .ranking-page-grid {
        grid-template-columns: 1fr;
    }

    .ranking-box,
    .ranking-list-large {
        position: static;
    }

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

    .filter-count {
        grid-column: 1 / -1;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-section {
        height: 68vh;
        min-height: 520px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(34px, 11vw, 56px);
    }

    .quick-search-panel,
    .category-overview-card,
    .detail-layout,
    .detail-text-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 640px) {
    .header-inner {
        min-height: 64px;
    }

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

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

    .hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.35));
    }

    .hero-content {
        justify-content: end;
        padding-bottom: 86px;
    }

    .hero-tags span,
    .tag {
        font-size: 12px;
    }

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

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

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

    .movie-card p,
    .mini-tags {
        display: none;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
        position: static;
    }

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

    .video-shell {
        border-radius: 18px;
    }
}
