:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #06b6d4;
    --accent-soft: #e0f7ff;
    --orange: #f97316;
    --red: #ef4444;
    --gold: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.22);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #0891b2;
    background: #fff;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.18);
}

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

.main-nav a,
.mobile-nav a {
    font-weight: 700;
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #cffafe;
    opacity: 1;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input {
    width: 230px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    outline: none;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #0369a1;
    font-weight: 800;
    background: #fff;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 14px;
    flex-direction: column;
}

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

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: #0f172a;
}

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

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(15, 23, 42, 0.62) 42%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: max(6vw, calc((100vw - 1240px) / 2));
    top: 50%;
    width: min(680px, 88vw);
    transform: translateY(-50%);
    color: #fff;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 7px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 12px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content .hero-movie-title {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.02em;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: #075985;
    font-size: 12px;
    font-weight: 800;
    background: #e0f2fe;
}

.hero-tags span {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.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;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    box-shadow: 0 16px 30px rgba(6, 182, 212, 0.28);
}

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.hero-dots {
    position: absolute;
    right: max(32px, calc((100vw - 1240px) / 2));
    bottom: 44px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

.hero-dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.quick-categories {
    margin-top: -34px;
    position: relative;
    z-index: 10;
}

.quick-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.quick-wrap a,
.category-card,
.movie-card,
.detail-card,
.side-box,
.filter-panel {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.quick-wrap a {
    display: block;
    border-radius: 18px;
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-wrap a:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.quick-wrap strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.quick-wrap span {
    color: var(--muted);
    font-size: 13px;
}

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

.tinted-section {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: max(16px, calc((100vw - 1240px) / 2));
    padding-right: max(16px, calc((100vw - 1240px) / 2));
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-heading h2 {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
}

.section-heading a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--primary);
    font-weight: 900;
    background: #dbeafe;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.25);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-line span {
    border-radius: 999px;
    padding: 4px 8px;
    background: #f1f5f9;
}

.movie-card h2,
.movie-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    line-height: 1.25;
}

.movie-card h2 a,
.movie-card h3 a {
    transition: color 0.2s ease;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover {
    color: var(--accent);
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card-compact .movie-card-body {
    padding: 14px;
}

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

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

.mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 18px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.mini-card img {
    width: 74px;
    height: 58px;
    flex: 0 0 74px;
    border-radius: 14px;
    object-fit: cover;
    background: #0f172a;
}

.mini-card span {
    min-width: 0;
}

.mini-card strong {
    display: block;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.mini-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-right: 6px;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: var(--gold);
}

.category-home-list {
    padding-top: 40px;
}

.category-preview {
    margin-bottom: 54px;
}

.category-preview:last-child {
    margin-bottom: 0;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #155e75 55%, #2563eb);
}

.page-hero {
    padding: 92px max(16px, calc((100vw - 1240px) / 2));
}

.page-hero div {
    max-width: 760px;
}

.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.04;
}

.page-hero p {
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

.ranking-hero {
    background: linear-gradient(135deg, #111827, #7c2d12 55%, #2563eb);
}

.search-hero {
    background: linear-gradient(135deg, #0f172a, #0e7490 55%, #1d4ed8);
}

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

.category-card {
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.category-card-head span {
    font-size: 26px;
    font-weight: 900;
}

.category-card-head strong {
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--primary);
    font-size: 13px;
    background: #dbeafe;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

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

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 28px;
}

.filter-search-wrap {
    position: relative;
    flex: 1;
}

.filter-search-wrap input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 13px 46px 13px 16px;
    outline: none;
    background: #f8fafc;
}

.filter-search-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-search-wrap span {
    position: absolute;
    right: 17px;
    top: 50%;
    color: var(--muted);
    transform: translateY(-50%);
}

.filter-selects {
    display: flex;
    gap: 10px;
}

.filter-selects select {
    min-width: 136px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 14px;
    color: #374151;
    outline: none;
    background: #fff;
}

.movie-card.is-hidden {
    display: none;
}

.detail-hero {
    min-height: 470px;
}

.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
    filter: saturate(1.05);
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.65), rgba(2, 6, 23, 0.28));
}

.detail-hero-content {
    position: relative;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
    color: #e5e7eb;
    font-size: 14px;
}

.breadcrumb a {
    color: #cffafe;
}

.detail-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
}

.detail-title-row h1 {
    max-width: 860px;
    margin: 18px 0 14px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
}

.detail-title-row p {
    max-width: 800px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
}

.score-card {
    min-width: 140px;
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.score-card strong {
    display: block;
    font-size: 42px;
    line-height: 1;
}

.score-card span {
    color: #dbeafe;
    font-weight: 800;
}

.detail-meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.detail-meta-list span {
    border-radius: 999px;
    padding: 8px 13px;
    color: #fff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
}

.detail-layout {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.detail-main,
.detail-side {
    min-width: 0;
}

.player-panel,
.detail-card,
.side-box {
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.player-panel h2,
.detail-card h2,
.side-box h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.movie-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-play-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary);
    font-size: 28px;
    background: #fff;
    box-shadow: 0 20px 42px rgba(2, 6, 23, 0.28);
}

.detail-card p {
    margin: 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.detail-tags span {
    font-size: 13px;
}

.side-box {
    position: sticky;
    top: 96px;
}

.side-box + .side-box {
    position: static;
}

.side-box dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 14px;
    margin: 0;
}

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

.side-box dd {
    margin: 0;
    font-weight: 800;
}

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

.related-section {
    padding-top: 22px;
}

.site-footer {
    margin-top: 50px;
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

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

.footer-logo {
    color: #fff;
}

.footer-grid p {
    max-width: 520px;
    margin: 18px 0 0;
    color: #cbd5e1;
}

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

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .side-box {
        position: static;
    }
}

@media (max-width: 820px) {
    .header-inner {
        height: 66px;
    }

    .main-nav,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .mobile-search input {
        width: 100%;
        flex: 1;
    }

    .hero-slider {
        height: 76vh;
        min-height: 560px;
    }

    .hero-content {
        left: 16px;
        width: calc(100% - 32px);
    }

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

    .hero-dots {
        right: 16px;
        bottom: 22px;
    }

    .quick-categories {
        margin-top: 18px;
    }

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

    .ranking-strip,
    .category-samples {
        grid-template-columns: 1fr;
    }

    .filter-panel,
    .section-heading,
    .detail-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-selects {
        flex-direction: column;
    }

    .filter-selects select {
        width: 100%;
    }

    .score-card {
        width: 160px;
    }

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

@media (max-width: 560px) {
    .site-logo,
    .footer-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .quick-wrap,
    .movie-grid,
    .large-grid,
    .small-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-card p {
        min-height: auto;
    }

    .detail-hero-content {
        padding: 58px 0;
    }

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

    .player-panel,
    .detail-card,
    .side-box {
        padding: 18px;
    }
}
