:root {
    --accent: #059669;
    --accent-dark: #047857;
    --accent-soft: #d1fae5;
    --gold: #f59e0b;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --panel: #ffffff;
    --dark: #0f172a;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), #14b8a6);
    box-shadow: 0 12px 25px rgba(5, 150, 105, 0.28);
    font-size: 14px;
}

.brand-name {
    font-size: 22px;
}

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

.nav-link {
    color: #374151;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

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

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

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

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

.mobile-link {
    padding: 12px 0;
    color: #374151;
    font-weight: 700;
    border-top: 1px solid var(--line);
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    height: calc(100vh - 72px);
    overflow: hidden;
    background: #020617;
}

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

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

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

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

.hero-bg {
    opacity: 0.48;
    transform: scale(1.04);
}

.hero-gradient,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 68% 28%, rgba(16, 185, 129, 0.35), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 45%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px 88px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.hero-labels,
.hero-meta,
.hero-actions,
.detail-meta,
.detail-tags,
.hero-tags,
.card-meta,
.tag-row,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-pill,
.hero-score,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-pill {
    padding: 7px 13px;
    color: #ffffff;
    background: var(--accent);
}

.hero-score {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    max-width: 760px;
    margin: 20px 0 18px;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: clamp(16px, 2.1vw, 21px);
}

.hero-meta span,
.hero-tags span {
    color: #e5e7eb;
    font-size: 14px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.12);
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: #d1fae5;
    background: rgba(5, 150, 105, 0.35);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    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: var(--accent);
    box-shadow: 0 18px 30px rgba(5, 150, 105, 0.28);
}

.btn.primary:hover {
    background: var(--accent-dark);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.btn.ghost.light {
    color: #ffffff;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 4;
    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;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 36px;
    background: var(--accent);
}

.home-search-band {
    margin-top: -46px;
    position: relative;
    z-index: 5;
    padding: 0 22px;
}

.search-panel {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
    gap: 24px;
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.08em;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.story-section h2 {
    margin: 0;
    color: var(--text);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.search-panel h2 {
    font-size: clamp(26px, 4vw, 42px);
}

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

.search-form,
.filter-panel {
    display: flex;
    gap: 12px;
}

.search-form input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: #111827;
    background: #ffffff;
    outline: 0;
}

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

.search-form button {
    min-width: 96px;
    height: 48px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.content-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 22px;
}

.content-section.tinted {
    max-width: none;
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdfa 100%);
}

.content-section.tinted > * {
    max-width: 1196px;
    margin-left: auto;
    margin-right: auto;
}

.content-section.warm,
.content-section.tinted.warm {
    background: linear-gradient(90deg, #fffbeb 0%, #fff7ed 100%);
}

.section-heading {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.section-heading h2 {
    font-size: clamp(25px, 3vw, 36px);
}

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

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

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

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(5, 150, 105, 0.28);
    box-shadow: var(--shadow);
}

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

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.72));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.year-badge,
.rank-badge,
.play-badge {
    position: absolute;
    border-radius: 999px;
    font-weight: 900;
}

.year-badge {
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    color: #ffffff;
    background: var(--accent);
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: #fbbf24;
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.35);
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(5, 150, 105, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: var(--accent);
}

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

.card-meta {
    justify-content: space-between;
    color: #6b7280;
    font-size: 12px;
}

.tag-row {
    margin-top: 12px;
}

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

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

.category-tile {
    display: block;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

.category-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.page-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 75% 20%, rgba(16, 185, 129, 0.42), transparent 32%), linear-gradient(135deg, #020617, #064e3b);
    color: #ffffff;
}

.page-hero.small {
    min-height: 300px;
    padding: 72px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.page-hero > div {
    width: min(1196px, 100%);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: #d1fae5;
    font-size: 18px;
}

.category-head {
    justify-content: space-between;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.filter-panel select {
    max-width: 220px;
}

.empty-state {
    padding: 44px 16px;
    color: var(--muted);
    text-align: center;
    font-weight: 800;
}

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

.detail-bg {
    opacity: 0.38;
    filter: blur(1px);
}

.detail-wrap {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    min-height: 620px;
    margin: 0 auto;
    padding: 72px 22px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.breadcrumbs {
    margin-bottom: 16px;
    color: #d1fae5;
    font-weight: 750;
}

.detail-info h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: #e5e7eb;
    font-size: 19px;
}

.detail-meta span {
    color: #e5e7eb;
}

.detail-tags {
    margin: 18px 0 26px;
}

.player-section {
    max-width: 1120px;
    margin: -70px auto 0;
    padding: 0 22px;
    position: relative;
    z-index: 6;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
}

.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 20px 45px rgba(5, 150, 105, 0.38);
    font-size: 26px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: clamp(20px, 4vw, 32px);
    text-align: center;
}

.story-section {
    padding-top: 72px;
}

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

.story-grid article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.story-grid h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.story-grid p {
    margin: 0;
    color: #374151;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 46px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 32px;
}

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

.footer-main p {
    max-width: 620px;
    margin: 14px 0 0;
    color: #9ca3af;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 22px;
    align-content: start;
}

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

.footer-bottom {
    padding: 18px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

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

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

    .detail-wrap {
        grid-template-columns: 250px minmax(0, 1fr);
    }
}

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

    .menu-toggle {
        display: inline-block;
    }

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

    .hero-content {
        min-height: 620px;
        padding-bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

    .search-panel,
    .footer-inner,
    .story-grid,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .search-form,
    .filter-panel {
        flex-direction: column;
    }

    .filter-panel select {
        max-width: none;
    }

    .movie-grid.six,
    .movie-grid.five,
    .ranking-grid,
    .ranking-grid.wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .detail-wrap {
        min-height: auto;
        padding-top: 48px;
        align-items: start;
    }

    .detail-poster {
        width: min(240px, 80vw);
    }

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

    .content-section {
        padding: 44px 16px;
    }

    .page-hero.small {
        padding: 54px 16px;
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .brand-name {
        font-size: 19px;
    }

    .movie-grid.six,
    .movie-grid.five,
    .ranking-grid,
    .ranking-grid.wide {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-desc,
    .tag-row {
        display: none;
    }

    .hero-content h1,
    .detail-info h1 {
        letter-spacing: -0.03em;
    }
}
