:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #101827;
    --muted: #667085;
    --line: #e5e7eb;
    --accent: #059669;
    --accent-strong: #047857;
    --accent-soft: #d1fae5;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
}

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

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

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 650;
}

.main-nav a,
.mobile-nav a {
    color: #374151;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 14px 24px 20px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 8px;
}

.mobile-category-links a,
.pill-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 13px;
    font-weight: 650;
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 74% 32%, rgba(16, 185, 129, 0.25), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.10) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.80) 0%, transparent 42%);
}

.hero-content {
    position: absolute;
    inset: 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 84px 24px 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #ffffff;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-kicker a,
.hero-kicker span,
.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(16, 185, 129, 0.18);
    color: #d1fae5;
    border: 1px solid rgba(110, 231, 183, 0.35);
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero h2 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
}

.hero p {
    max-width: 720px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    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, #10b981, #047857);
    box-shadow: 0 15px 35px rgba(5, 150, 105, 0.38);
}

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

.btn-light {
    color: #047857;
    background: #ffffff;
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.45);
    font-size: 34px;
    cursor: pointer;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.hero-search {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 74px;
    width: min(660px, calc(100% - 48px));
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.hero-search input,
.panel-search input,
.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: #ffffff;
    color: #111827;
    font-size: 15px;
}

.hero-search input {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.92);
}

.hero-search button,
.panel-search button,
.search-box button {
    border: 0;
    color: #ffffff;
    background: #059669;
    font-weight: 800;
    cursor: pointer;
}

.hero-search button {
    padding: 0 24px;
}

.site-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0;
    color: var(--muted);
}

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-poster.wide {
    aspect-ratio: 16 / 9;
}

.movie-poster img,
.movie-thumb img,
.category-tile img,
.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.badge {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.badge-dark {
    color: #ffffff;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(8px);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.05));
}

.poster-title {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    color: #ffffff;
}

.poster-title span {
    display: inline-flex;
    margin-bottom: 8px;
    border-radius: 999px;
    padding: 5px 10px;
    background: #10b981;
    font-size: 12px;
    font-weight: 800;
}

.poster-title strong {
    display: block;
    font-size: 21px;
    line-height: 1.25;
}

.movie-info {
    padding: 16px;
}

.movie-info.compact {
    padding: 10px 12px 10px 0;
}

.movie-tags,
.movie-meta,
.movie-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.movie-tags {
    margin-bottom: 9px;
}

.movie-tags a,
.movie-tags span,
.movie-meta span,
.detail-meta a,
.detail-meta span {
    border-radius: 8px;
    padding: 5px 8px;
    color: #047857;
    background: #ecfdf5;
    font-size: 12px;
    font-weight: 700;
}

.movie-tags span,
.movie-meta span:nth-child(2),
.detail-meta span {
    color: #6b7280;
    background: #f3f4f6;
}

.movie-info h3 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--accent);
}

.movie-info p,
.movie-info em {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-row {
    justify-content: space-between;
    margin-top: 14px;
    color: #667085;
    font-size: 13px;
}

.movie-card-horizontal {
    display: flex;
    gap: 14px;
    min-height: 110px;
}

.movie-thumb.small {
    width: 160px;
    min-width: 160px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #111827;
}

.movie-card-horizontal strong {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0;
    font-size: 15px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-tile {
    position: relative;
    min-height: 170px;
    overflow: hidden;
    border-radius: 22px;
    color: #ffffff;
    background: #111827;
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.08));
}

.category-tile span {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 10px;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile em {
    font-style: normal;
    color: rgba(255, 255, 255, 0.78);
}

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

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

.ranking-list li {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.ranking-list li > span,
.rank-num {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #ffffff;
    background: #111827;
    font-weight: 900;
}

.ranking-list a {
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-list a:hover,
.rank-table a:hover {
    color: var(--accent);
}

.ranking-list em {
    color: #667085;
    font-style: normal;
    font-size: 13px;
}

.side-panel,
.detail-card,
.related-panel,
.category-card,
.table-wrap {
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 26px;
}

.side-panel h2 {
    margin: 0 0 10px;
}

.side-panel p {
    color: #667085;
    line-height: 1.75;
}

.panel-search,
.search-box {
    display: flex;
    overflow: hidden;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
}

.panel-search input,
.search-box input {
    padding: 14px 15px;
}

.panel-search button,
.search-box button {
    padding: 0 18px;
}

.pill-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-main {
    min-height: 64vh;
}

.page-hero {
    background: radial-gradient(circle at 72% 20%, rgba(16, 185, 129, 0.20), transparent 32%), linear-gradient(135deg, #04111f, #0f172a 60%, #064e3b);
    color: #ffffff;
}

.compact-hero {
    padding: 82px 24px;
}

.compact-hero > div {
    max-width: 1280px;
    margin: 0 auto;
}

.compact-hero span {
    color: #86efac;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.compact-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.06em;
}

.compact-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.75;
}

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

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

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    height: 150px;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
}

.category-covers img:first-child {
    grid-column: span 2;
}

.category-card h2 {
    margin: 4px 0 10px;
}

.category-card p {
    margin: 0 0 14px;
    color: #667085;
    line-height: 1.7;
}

.category-card span {
    color: var(--accent);
    font-weight: 800;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 26px;
}

.pagination + .movie-grid {
    margin-bottom: 28px;
}

.page-btn,
.page-ellipsis {
    min-width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    color: #374151;
    font-weight: 700;
}

.page-btn.active,
.page-btn:hover {
    border-color: #059669;
    color: #ffffff;
    background: #059669;
}

.table-wrap {
    overflow: auto;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.rank-table th {
    color: #667085;
    background: #f9fafb;
    font-size: 13px;
}

.rank-table td:nth-child(2) {
    font-weight: 800;
}

.search-hero .search-box {
    max-width: 720px;
    margin-top: 24px;
}

.search-status {
    margin-bottom: 22px;
    color: #667085;
    font-weight: 800;
}

.player-section {
    background: #020617;
}

.player-section > div {
    max-width: 1280px;
    margin: 0 auto;
}

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

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

.poster-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.54));
    cursor: pointer;
}

.player-shell.is-playing .poster-start {
    display: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #047857);
    box-shadow: 0 18px 48px rgba(16, 185, 129, 0.35);
    font-size: 31px;
}

.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px 66px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: #667085;
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

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

.detail-card {
    padding: 32px;
}

.detail-card h1 {
    margin: 18px 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.detail-tags span {
    color: #047857;
    background: #ecfdf5;
    border-color: #d1fae5;
}

.detail-card section {
    margin-top: 28px;
}

.detail-card h2,
.related-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p {
    color: #374151;
    line-height: 1.92;
}

.lead-text {
    font-size: 18px;
    font-weight: 750;
}

.review-box {
    border-left: 4px solid #10b981;
    border-radius: 14px;
    padding: 20px;
    color: #374151;
    background: #f8fafc;
    line-height: 1.88;
}

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

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

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 34px;
}

.footer-about p {
    max-width: 560px;
    color: #9ca3af;
    line-height: 1.75;
}

.footer-brand .brand-text strong {
    color: #ffffff;
}

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

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

.site-footer a:hover {
    color: #6ee7b7;
}

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

    .large-grid,
    .split-section,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .side-panel,
    .related-panel {
        position: static;
    }

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .header-inner {
        padding: 0 16px;
    }

    .hero {
        height: 78vh;
        min-height: 620px;
    }

    .hero-content {
        padding: 72px 18px 160px;
    }

    .hero-search {
        bottom: 78px;
    }

    .hero-arrow {
        display: none;
    }

    .site-section {
        padding: 42px 16px;
    }

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

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

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

    .ranking-list li {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .ranking-list em {
        grid-column: 2;
    }

    .detail-card {
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .brand-text small {
        display: none;
    }

    .brand {
        min-width: auto;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-search,
    .panel-search,
    .search-box {
        flex-direction: column;
        border-radius: 16px;
    }

    .hero-search button,
    .panel-search button,
    .search-box button {
        min-height: 46px;
    }

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

    .movie-card-horizontal {
        gap: 10px;
    }

    .movie-thumb.small {
        width: 122px;
        min-width: 122px;
    }

    .detail-wrap {
        padding: 22px 14px 50px;
    }
}
