:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0f766e;
    --teal-bright: #14b8a6;
    --blue: #2563eb;
    --indigo: #4338ca;
    --amber: #f59e0b;
    --slate: #0f172a;
    --radius: 1.25rem;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-bright), var(--blue));
    box-shadow: 0 12px 24px rgba(20, 184, 166, 0.35);
}

.brand-text {
    font-size: 1.25rem;
}

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

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: 0.22s ease;
}

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

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.nav-search input,
.mobile-search input,
.search-panel input,
.toolbar input,
.toolbar select {
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.nav-search input {
    width: 190px;
    padding: 0 4px 0 12px;
}

.nav-search button,
.mobile-search button,
.search-panel button,
.primary-btn,
.ghost-btn,
.player-start,
.toolbar button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: 0.22s ease;
}

.nav-search button,
.mobile-search button,
.search-panel button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-bright), var(--blue));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.nav-search button {
    padding: 8px 14px;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: #e0f2fe;
    color: var(--teal);
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.mobile-search input {
    padding: 8px 10px;
}

.mobile-search button {
    padding: 8px 14px;
}

.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-categories a {
    padding: 7px 12px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 16%, rgba(45, 212, 191, 0.38), transparent 32%),
        radial-gradient(circle at 86% 22%, rgba(96, 165, 250, 0.34), transparent 34%),
        linear-gradient(135deg, #0f766e 0%, #2563eb 52%, #4338ca 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.5) 1px, transparent 1px), linear-gradient(-45deg, rgba(255,255,255,0.35) 1px, transparent 1px);
    background-size: 42px 42px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -15% -35% -15%;
    height: 320px;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(70px);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 470px;
    align-items: center;
    gap: 46px;
    padding: 70px 0;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
    font-weight: 800;
}

.hero-kicker {
    padding: 8px 14px;
    color: #dffcf6;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(2.8rem, 8vw, 5.4rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
}

.ghost-btn {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
}

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

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

.hero-tags a,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-tags a {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    max-width: 620px;
    margin: 0 0 22px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.search-panel input {
    min-width: 0;
    padding: 0 16px;
}

.search-panel button {
    padding: 12px 20px;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    border-radius: 32px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(18px);
}

.hero-slide {
    display: none;
    position: relative;
    overflow: hidden;
    min-height: 532px;
    border-radius: 24px;
    background: #0f172a;
}

.hero-slide.active {
    display: block;
    animation: fadeLift 0.5s ease both;
}

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

.hero-slide-content {
    position: absolute;
    inset: auto 0 0 0;
    padding: 34px;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.hero-slide-content h2 {
    margin: 8px 0;
    font-size: 2rem;
    line-height: 1.15;
}

.hero-slide-content p {
    margin: 0 0 18px;
    color: #dbeafe;
}

.slide-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: #a7f3d0;
    font-weight: 800;
    font-size: 0.9rem;
}

.carousel-dots {
    position: absolute;
    left: 34px;
    bottom: 22px;
    display: flex;
    gap: 8px;
}

.carousel-dots button {
    width: 28px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.carousel-dots button.active {
    width: 42px;
    background: #ffffff;
}

.main-section,
.page-hero,
.detail-layout,
.categories-grid,
.ranking-list,
.search-results-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.main-section {
    padding: 64px 0;
}

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

.section-kicker {
    padding: 7px 12px;
    color: var(--teal);
    background: #ccfbf1;
}

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 8px 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-panel p,
.detail-title p {
    color: var(--muted);
}

.link-arrow {
    color: var(--teal);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 55px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.24);
}

.year-badge {
    right: 12px;
    background: rgba(15, 23, 42, 0.78);
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.movie-meta-line,
.breadcrumb,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.movie-card h2 {
    margin: 9px 0 8px;
    font-size: 1.12rem;
    line-height: 1.25;
}

.movie-card h2 a:hover {
    color: var(--teal);
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.92rem;
}

.tag-row span,
.detail-tags span {
    padding: 5px 9px;
    color: #0f766e;
    background: #ccfbf1;
}

.category-strip {
    background: #eef2ff;
}

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

.category-panel,
.overview-card,
.detail-card,
.toolbar,
.player-card,
.article-block {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.category-panel {
    padding: 24px;
}

.category-panel h2 {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

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

.mini-card {
    display: grid;
    gap: 8px;
}

.mini-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

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

.mini-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.86rem;
}

.cta-band {
    padding: 52px;
    border-radius: 32px;
    color: #ffffff;
    text-align: center;
    background:
        radial-gradient(circle at 18% 12%, rgba(255,255,255,0.22), transparent 34%),
        linear-gradient(135deg, var(--teal), var(--blue));
}

.cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.cta-band p {
    margin: 0 auto 24px;
    max-width: 720px;
    color: #dbeafe;
}

.cta-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.cta-links a {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--teal);
    background: #ffffff;
    font-weight: 900;
}

.page-hero {
    padding: 58px 0 36px;
}

.page-hero-box {
    overflow: hidden;
    border-radius: 32px;
    padding: 42px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.18), transparent 30%),
        linear-gradient(135deg, var(--teal), var(--blue) 58%, var(--indigo));
    box-shadow: var(--shadow);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding-bottom: 64px;
}

.overview-card {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.overview-card h2 {
    margin: 0;
    font-size: 1.45rem;
}

.overview-card p {
    margin: 0;
    color: var(--muted);
}

.overview-card .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 12px;
}

.toolbar input,
.toolbar select {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #f8fafc;
}

.toolbar button {
    min-height: 42px;
    padding: 0 14px;
    color: var(--teal);
    background: #ccfbf1;
}

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

.movie-grid.list-mode .movie-card {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.movie-grid.list-mode .poster-link {
    aspect-ratio: 3 / 4;
}

.ranking-list {
    display: grid;
    gap: 18px;
    padding-bottom: 64px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 90px 110px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ranking-number {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.ranking-item img {
    width: 110px;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    object-fit: cover;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.ranking-copy h2 {
    margin: 0 0 6px;
    font-size: 1.25rem;
}

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

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

.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--teal);
}

.player-card {
    overflow: hidden;
    margin-bottom: 28px;
}

.player-shell {
    position: relative;
    background: #020617;
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.64));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-start {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal-bright), var(--blue));
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.32);
}

.player-start span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--teal);
    background: #ffffff;
}

.detail-title {
    padding: 26px;
}

.detail-title h1 {
    margin-top: 0;
}

.detail-meta {
    margin: 14px 0 18px;
}

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

.article-block {
    margin-bottom: 22px;
    padding: 28px;
}

.article-block h2,
.sidebar h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.article-block p {
    margin: 0;
    color: #334155;
    font-size: 1.02rem;
}

.sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
    align-self: start;
}

.detail-card {
    padding: 20px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 76px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f766e, #2563eb);
}

.side-link strong {
    display: block;
    line-height: 1.25;
}

.side-link span {
    color: var(--muted);
    font-size: 0.88rem;
}

.search-results-shell {
    padding-bottom: 64px;
}

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

.site-footer {
    color: #e2e8f0;
    background: linear-gradient(135deg, #1e293b, #0f172a 58%, #0f766e);
}

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

.footer-brand {
    color: #ffffff;
    font-size: 1.2rem;
}

.site-footer p {
    max-width: 420px;
    color: #cbd5e1;
}

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

.footer-links {
    display: grid;
    gap: 9px;
}

.footer-links.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a:hover {
    color: #5eead4;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(226, 232, 240, 0.16);
    color: #cbd5e1;
}

@keyframes fadeLift {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1060px) {
    .hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-carousel {
        max-width: 540px;
    }

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

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

    .sidebar {
        position: static;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-inner {
        min-height: auto;
        padding: 48px 0;
    }

    .hero-carousel,
    .hero-slide,
    .hero-slide img {
        min-height: auto;
    }

    .hero-slide img {
        height: 460px;
    }

    .movie-grid,
    .categories-grid,
    .category-panels,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

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

    .ranking-item .primary-btn {
        grid-column: 2 / 4;
        width: fit-content;
    }
}

@media (max-width: 560px) {
    .nav-shell {
        height: 62px;
    }

    .brand-text {
        font-size: 1.08rem;
    }

    .hero h1 {
        font-size: 3.1rem;
    }

    .search-panel {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .hero-slide img {
        height: 410px;
    }

    .hero-slide-content {
        padding: 24px;
    }

    .hero-slide-content h2 {
        font-size: 1.55rem;
    }

    .movie-grid.list-mode .movie-card {
        grid-template-columns: 120px 1fr;
    }

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

    .page-hero-box,
    .cta-band {
        padding: 28px;
    }
}
