:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --cyan: #0891b2;
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 22px 55px rgba(15, 23, 42, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    font-weight: 650;
    color: #374151;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--emerald);
}

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

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #111827;
    border-radius: 99px;
}

.search-box {
    position: relative;
    width: 270px;
}

.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 11px 16px;
    outline: none;
    color: #111827;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(430px, 92vw);
    max-height: 470px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-hover);
    padding: 10px;
}

.search-panel.is-open {
    display: grid;
    gap: 8px;
}

.search-result {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-result:hover {
    background: #f0fdf4;
}

.search-result img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.search-result strong {
    display: block;
    line-height: 1.3;
}

.search-result small {
    color: var(--muted);
}

.hero {
    position: relative;
    min-height: 530px;
    background: linear-gradient(135deg, #059669 0%, #0d9488 48%, #0891b2 100%);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.15));
    pointer-events: none;
}

.hero-slider {
    position: relative;
    z-index: 1;
    min-height: 530px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    filter: saturate(1.08);
}

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

.hero-copy {
    width: min(720px, 100%);
    color: #fff;
    padding: 70px 0;
}

.hero-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 13px 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: #fff;
    color: var(--emerald-dark);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
    background: #f8fafc;
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    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: 34px;
    background: #fff;
}

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

.section.narrow {
    width: min(960px, calc(100% - 32px));
}

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

.section-title h1,
.section-title h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

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

.grid {
    display: grid;
    gap: 24px;
}

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

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

.grid.auto {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

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

.poster-wrap {
    position: relative;
    display: block;
    height: 190px;
    overflow: hidden;
    background: #111827;
}

.movie-card.large .poster-wrap {
    height: 250px;
}

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

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--emerald-dark);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.poster-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 42px;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    background: rgba(0, 0, 0, 0.34);
}

.card-body {
    display: block;
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 50px;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    transition: color 0.2s ease;
}

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

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

.card-meta,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
}

.card-tags {
    margin-top: 10px;
}

.card-tags span,
.tag,
.category-chip {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #047857;
    font-weight: 700;
}

.category-band {
    background: linear-gradient(135deg, #ecfdf5, #f0f9ff);
    border-top: 1px solid #d1fae5;
    border-bottom: 1px solid #cffafe;
}

.category-card {
    display: block;
    padding: 24px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(209, 250, 229, 0.9);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.rank-item,
.compact-card {
    display: grid;
    align-items: center;
    gap: 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.rank-item {
    grid-template-columns: 48px 92px 1fr;
    padding: 12px;
}

.rank-item:hover,
.compact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.rank-item img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.35s ease;
}

.rank-info strong,
.compact-card strong {
    display: block;
    font-size: 17px;
}

.rank-info small,
.compact-card small {
    display: block;
    color: var(--muted);
    margin: 3px 0;
}

.rank-info em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #4b5563;
    font-style: normal;
    font-size: 14px;
}

.compact-card {
    grid-template-columns: 80px 1fr;
    padding: 12px;
}

.compact-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.35s ease;
}

.page-hero,
.detail-top {
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    color: #fff;
    padding: 62px 0;
}

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

.page-hero h1,
.detail-title h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.12;
}

.page-hero p,
.detail-title p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 14px;
    margin-bottom: 28px;
}

.empty-filter {
    display: none;
    margin: 20px 0;
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

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

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
}

.pagination a,
.pagination strong,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 0 12px;
    font-weight: 800;
}

.pagination strong {
    background: var(--emerald);
    color: #fff;
    border-color: var(--emerald);
}

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

.player-card,
.content-card,
.side-card {
    background: #fff;
    border-radius: 26px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.14));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-layer span {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border-radius: 999px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.play-layer b {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff;
    color: var(--emerald);
}

.player-info,
.content-card,
.side-card {
    padding: 24px;
}

.player-info h2,
.content-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.player-info p,
.content-card p {
    color: #374151;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

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

.info-list div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.info-list strong {
    display: block;
    color: #111827;
}

.info-list span {
    color: var(--muted);
}

.side-list {
    display: grid;
    gap: 12px;
}

.site-footer {
    margin-top: 72px;
    background: #111827;
    color: #d1d5db;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 36px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
}

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
}

.footer-about p {
    max-width: 620px;
    color: #cbd5e1;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 16px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 960px) {
    .nav-wrap {
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 0;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        order: 4;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 12px;
        border-radius: 12px;
        background: #f8fafc;
    }

    .search-box {
        width: 100%;
        order: 3;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .grid.three,
    .grid.four,
    .ranking-grid,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .section,
    .page-hero-inner,
    .detail-top-inner,
    .nav-wrap,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy {
        padding: 58px 0 86px;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 76px 1fr;
    }

    .rank-item img {
        width: 76px;
        height: 76px;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}
