:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --brand: #059669;
    --brand-2: #10b981;
    --brand-3: #14b8a6;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #1e293b, #0f172a 58%, #064e3b);
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.22);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.28);
}

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

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

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

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #dbeafe;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.18);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #ffffff;
}

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

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

.mobile-link {
    display: block;
    margin: 4px 0;
}

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

.mobile-category-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #a7f3d0;
    background: rgba(15, 23, 42, 0.28);
    font-size: 13px;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b 0%, #334155 42%, #065f46 100%);
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.35), transparent 32%),
        radial-gradient(circle at 82% 26%, rgba(20, 184, 166, 0.32), transparent 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.72));
}

.hero-inner {
    position: relative;
    padding: 72px 0 64px;
}

.hero-track {
    position: relative;
    min-height: 470px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
    gap: 48px;
    align-items: center;
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #a7f3d0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.hero-copy h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: #d1fae5;
    font-size: clamp(17px, 2vw, 21px);
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ecfdf5;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
}

.tag-row span {
    padding: 4px 8px;
    color: #047857;
    background: #d1fae5;
}

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

.primary-btn,
.ghost-btn,
.home-search button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button,
.filter-panel button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 16px 35px rgba(5, 150, 105, 0.26);
}

.ghost-btn {
    color: var(--ink);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.ghost-btn.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search button:hover,
.filter-panel button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.3);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
    font-weight: 800;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 26px;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 9px;
    height: 9px;
    min-width: 9px;
    min-height: 9px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.is-active {
    width: 28px;
    background: #34d399;
}

.section-block {
    margin-top: 56px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h2,
.quick-search-block h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-heading p,
.quick-search-block p {
    margin: 8px 0 0;
    color: var(--muted);
}

.split-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.text-link {
    color: var(--brand);
    font-weight: 800;
}

.quick-search-block {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: -46px;
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

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

.home-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    background: #ffffff;
    padding: 0 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.84);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #cbd5e1, #f8fafc);
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(8px);
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    font-size: 13px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

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

.card-body h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.card-body h3 a:hover {
    color: var(--brand);
}

.card-body p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-card .card-body p {
    min-height: 42px;
    font-size: 14px;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 236px;
    padding: 18px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #065f46);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-glow {
    position: absolute;
    inset: -30% -20% auto auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.24);
    filter: blur(6px);
}

.category-thumbs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
}

.category-card h3 {
    position: relative;
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    margin: 0;
    color: #d1fae5;
    font-size: 14px;
}

.category-more {
    position: relative;
    display: inline-flex;
    margin-top: 16px;
    color: #a7f3d0;
    font-weight: 900;
}

.rank-preview {
    padding: 30px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ecfdf5, #f8fafc);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.rank-row b {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.rank-row span {
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-row em {
    color: var(--brand);
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #334155 50%, #065f46);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 22%, rgba(16, 185, 129, 0.28), transparent 30%),
        radial-gradient(circle at 88% 24%, rgba(20, 184, 166, 0.25), transparent 30%);
}

.page-hero .container {
    position: relative;
    padding: 76px 0;
}

.slim-hero .container {
    padding: 58px 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.filter-empty {
    display: none;
    padding: 30px;
    border-radius: var(--radius);
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    box-shadow: var(--soft-shadow);
}

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

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

.entry-grid a {
    display: flex;
    min-height: 120px;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.entry-grid strong {
    font-size: 24px;
}

.entry-grid span {
    color: var(--muted);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.ranking-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #e2e8f0;
}

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

.ranking-cover b {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.92);
}

.ranking-info h2 {
    margin: 12px 0 8px;
    font-size: 24px;
}

.ranking-info p {
    margin: 0;
    color: var(--muted);
}

.score-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
}

.score-line strong {
    color: var(--brand);
    font-size: 24px;
}

.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #0f172a 52%, #065f46);
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 40px;
    align-items: center;
    padding: 64px 0;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #a7f3d0;
    font-size: 14px;
}

.breadcrumb strong {
    color: #ffffff;
}

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

.detail-one-line {
    max-width: 780px;
    margin: 20px 0;
    color: #d1fae5;
    font-size: 20px;
}

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

.detail-tags {
    margin-top: 20px;
}

.player-section {
    margin-top: 48px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.24), rgba(2, 6, 23, 0.68));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    position: relative;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 20px 45px rgba(16, 185, 129, 0.35);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 7px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 25px solid #ffffff;
}

.player-overlay strong {
    font-size: 22px;
}

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

.text-panel {
    padding: 26px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.text-panel p {
    margin: 0;
    color: #334155;
}

.pager-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.pager-links a {
    overflow: hidden;
    padding: 18px 20px;
    border-radius: 18px;
    color: var(--brand);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
}

.site-footer a {
    display: block;
    margin: 7px 0;
    color: #a7f3d0;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    text-align: center;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: auto;
    }

    .hero-inner {
        padding: 44px 0 52px;
    }

    .hero-track {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .quick-search-block,
    .detail-grid,
    .detail-content,
    .pager-links,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .home-search,
    .split-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .rank-list,
    .entry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-item {
        grid-template-columns: 110px 1fr;
    }

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

    .brand-text small {
        display: none;
    }

    .hero-track {
        min-height: 720px;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-poster,
    .hero-poster img {
        min-height: 350px;
    }

    .movie-grid,
    .featured-grid,
    .related-grid,
    .category-grid,
    .large-category-grid,
    .rank-list,
    .entry-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .home-search {
        flex-direction: column;
    }

    .ranking-item {
        grid-template-columns: 1fr;
    }

    .ranking-cover {
        max-width: 180px;
    }
}
