:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0d9488;
    --cyan: #0891b2;
    --teal-dark: #0f766e;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
}

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

.brand-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.28);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

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

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

.nav-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.search-panel input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 16px;
}

.nav-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.filter-bar input:focus,
.search-panel input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.nav-search button,
.mobile-search button,
.big-search button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    padding: 10px 16px;
}

.nav-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.search-panel button:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.22);
}

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

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-panel nav,
.footer-links,
.footer-links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.mobile-search input {
    padding: 11px 16px;
}

.mobile-search button {
    padding: 11px 18px;
}

.hero-carousel {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

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

.hero-bg.is-missing,
.detail-bg.is-missing,
.poster-frame img.is-missing,
.hero-poster img.is-missing,
.detail-poster img.is-missing,
.category-posters img.is-missing,
.category-cover-stack img.is-missing {
    opacity: 0;
}

.poster-frame,
.hero-poster,
.detail-poster,
.category-posters,
.category-cover-stack,
.player-shell {
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.35), transparent 32%),
        linear-gradient(135deg, #0f172a, #164e63 48%, #0f766e);
}

.hero-overlay,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 56px;
    height: 100%;
    color: #ffffff;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #0d9488;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-info .eyebrow {
    color: #67e8f9;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-summary,
.detail-one-line,
.page-hero p {
    max-width: 740px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.8;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 800;
}

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

.hero-tags span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

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

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    font-weight: 900;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

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

.hero-dot.active {
    width: 30px;
    background: #67e8f9;
}

.quick-panel {
    position: relative;
    z-index: 5;
    margin-top: -52px;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.big-search,
.search-panel,
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.big-search input,
.search-panel input,
.filter-bar input {
    padding: 15px 20px;
}

.big-search button,
.search-panel button {
    padding: 15px 26px;
    white-space: nowrap;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.stat-grid div {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
}

.stat-grid strong {
    display: block;
    font-size: 28px;
    color: var(--ink);
}

.stat-grid span {
    color: var(--muted);
    font-weight: 700;
}

.content-section {
    padding: 58px 0;
}

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

.section-header h2,
.ranking-head h2,
.detail-main-card h2,
.detail-side-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.section-header p:last-child,
.ranking-head p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-action,
.inline-more {
    color: var(--teal);
    font-weight: 900;
}

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

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

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

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

.movie-card:hover {
    border-color: rgba(13, 148, 136, 0.28);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-frame {
    position: relative;
    display: block;
    overflow: hidden;
}

.poster-frame img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-frame img {
    transform: scale(1.05);
}

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
}

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

.movie-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 900;
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card.compact h3 {
    font-size: 16px;
}

.movie-card.compact p {
    min-height: 40px;
    font-size: 13px;
}

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

.category-tile,
.category-overview-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-posters,
.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 10px;
}

.category-cover-stack {
    grid-template-columns: repeat(4, 1fr);
}

.category-posters img,
.category-cover-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.category-tile > div:last-child,
.category-overview-card > div:last-child {
    padding: 18px;
}

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

.category-tile p,
.category-overview-card p {
    color: var(--muted);
    line-height: 1.65;
}

.category-tile span {
    color: var(--teal);
    font-weight: 900;
}

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

.ranking-panel,
.detail-main-card,
.detail-side-card,
.search-panel,
.table-wrap {
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.ranking-panel {
    align-self: start;
    position: sticky;
    top: 92px;
    padding: 24px;
}

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

.ranking-item a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.ranking-item a:hover {
    background: #f0fdfa;
}

.ranking-number {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    font-size: 13px;
    font-weight: 900;
}

.ranking-title {
    font-weight: 900;
}

.ranking-meta {
    color: var(--muted);
    font-size: 12px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
}

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

.site-footer p {
    max-width: 480px;
    color: #94a3b8;
    line-height: 1.7;
}

.site-footer h3 {
    margin-top: 0;
    color: #ffffff;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #67e8f9;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.5), transparent 30%),
        linear-gradient(135deg, #0f172a, #164e63 55%, #0f766e);
}

.small-hero {
    padding: 78px 0;
}

.page-hero h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.category-hero .btn-ghost {
    background: rgba(15, 23, 42, 0.2);
}

.filter-bar {
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-bar span {
    color: var(--muted);
    font-weight: 900;
    white-space: nowrap;
}

.table-wrap {
    overflow-x: auto;
}

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

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

.rank-table th {
    color: #334155;
    background: #f8fafc;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table-rank {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--teal);
    font-weight: 900;
}

.table-title {
    color: var(--ink);
    font-weight: 900;
}

.search-panel {
    padding: 18px;
}

.search-hint {
    color: var(--muted);
    font-weight: 700;
}

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

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: center;
    gap: 44px;
    min-height: 620px;
    padding: 70px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #67e8f9;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
}

.player-section {
    padding-bottom: 20px;
}

.compact-header {
    margin-bottom: 18px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.62));
    cursor: pointer;
    font-weight: 900;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 22px 50px rgba(13, 148, 136, 0.32);
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    margin: 0;
    color: #e2e8f0;
    font-size: 13px;
}

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

.detail-main-card,
.detail-side-card {
    padding: 28px;
}

.detail-main-card p {
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.detail-side-card dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 10px 14px;
    margin: 18px 0 0;
}

.detail-side-card dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side-card dd {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.prev-next {
    display: grid;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.prev-next a {
    color: var(--teal);
    font-weight: 800;
}

.hidden-by-filter {
    display: none !important;
}

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

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
        padding: 86px 0 72px;
    }

    .hero-poster {
        width: min(240px, 72vw);
        transform: none;
    }

    .hero-control {
        display: none;
    }

    .stat-grid,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .detail-hero-inner {
        grid-template-columns: 180px 1fr;
        min-height: 520px;
    }

    .detail-info h1 {
        font-size: 38px;
    }
}

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

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

    .hero-carousel {
        min-height: 690px;
    }

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

    .quick-panel {
        margin-top: -28px;
        padding: 16px;
    }

    .big-search,
    .search-panel,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .stat-grid,
    .movie-grid,
    .compact-grid,
    .related-grid,
    .all-movie-grid,
    .category-grid,
    .overview-grid,
    .footer-grid,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        gap: 22px;
        padding: 48px 0;
    }

    .detail-poster {
        width: min(220px, 70vw);
    }

    .detail-info h1 {
        font-size: 34px;
    }

    .detail-side-card dl {
        grid-template-columns: 1fr;
    }

    .content-section {
        padding: 40px 0;
    }
}
