:root {
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --indigo: #4f46e5;
    --slate: #0f172a;
    --slate-soft: #1e293b;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0891b2 0%, #2563eb 55%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.28);
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    transition: background 0.25s ease, transform 0.25s ease;
}

.brand:hover .brand-mark {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

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

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

.nav-link {
    padding: 9px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input {
    width: 260px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    outline: none;
    border-radius: 999px;
    padding: 10px 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    transition: border 0.2s ease, background 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.2);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    color: var(--cyan-dark);
    background: #ffffff;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.mobile-link.is-active,
.mobile-link:hover {
    background: rgba(255, 255, 255, 0.18);
}

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

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

.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--slate);
}

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

.hero-slide {
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.55) 48%, rgba(15, 23, 42, 0.2) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 74px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-content h1 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(32px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(16px, 2.2vw, 21px);
    line-height: 1.7;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.82);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 700;
}

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

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

.primary-btn {
    color: #ffffff;
    background: var(--cyan);
    box-shadow: 0 14px 30px rgba(6, 182, 212, 0.28);
}

.primary-btn:hover {
    background: var(--cyan-dark);
    transform: translateY(-2px);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.page-stack {
    display: grid;
    gap: 52px;
    padding-top: 52px;
    padding-bottom: 64px;
}

.top-space {
    padding-top: 34px;
}

.content-section,
.category-block,
.article-section,
.player-section {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    padding: 28px;
}

.content-section:not(.soft-panel) {
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.soft-panel {
    background: linear-gradient(90deg, #f0fdfa 0%, #ecfeff 100%);
}

.section-heading,
.category-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.heading-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.heading-icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.section-heading h2,
.center-heading h2,
.category-block h2,
.article-section h2,
.player-section h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    color: #1f2937;
}

.section-more,
.category-block-head a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--cyan-dark);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card a {
    display: block;
    height: 100%;
}

.card-cover {
    position: relative;
    height: 258px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.movie-card.rank .card-cover {
    height: 190px;
}

.movie-card.featured .card-cover {
    height: 430px;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
}

.duration,
.card-category,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.duration {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.66);
}

.card-category {
    left: 10px;
    bottom: 10px;
    background: rgba(6, 182, 212, 0.9);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    text-align: center;
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    margin: 0 0 9px;
    color: #1f2937;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--cyan-dark);
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 12px;
    font-weight: 700;
}

.tag-row.large span {
    padding: 6px 12px;
    color: #cffafe;
    background: rgba(255, 255, 255, 0.14);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.category-overview {
    background: #ffffff !important;
    box-shadow: var(--shadow-soft) !important;
    padding: 32px !important;
}

.center-heading {
    max-width: 720px;
    margin: 0 auto 24px;
    text-align: center;
}

.center-heading p,
.page-hero p,
.category-block p {
    color: var(--muted);
    line-height: 1.8;
}

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

.category-tile {
    display: grid;
    gap: 8px;
    min-height: 140px;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 100%);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    background: linear-gradient(135deg, #cffafe 0%, #dbeafe 100%);
}

.category-tile strong {
    color: var(--cyan-dark);
    font-size: 20px;
}

.category-tile span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

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

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

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 48px;
    color: #ffffff;
    background: linear-gradient(120deg, #0891b2 0%, #2563eb 60%, #4f46e5 100%);
    box-shadow: var(--shadow);
}

.page-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -150px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--cyan-dark);
    font-weight: 700;
}

.breadcrumb.light,
.breadcrumb.light a {
    color: rgba(255, 255, 255, 0.9);
}

.filter-bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.filter-bar input {
    min-width: 300px;
    flex: 1;
}

.filter-bar input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.filter-bar option {
    color: #0f172a;
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    color: var(--muted);
}

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

.category-block {
    display: grid;
    gap: 16px;
}

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

.compact-card {
    overflow: hidden;
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-card img {
    width: 100%;
    height: 145px;
    object-fit: cover;
}

.compact-card span {
    display: block;
    padding: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.detail-page {
    background: #f8fafc;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) saturate(1.06);
    transform: scale(1.04);
    opacity: 0.72;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.78) 54%, rgba(15, 23, 42, 0.45) 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 36px;
    padding-bottom: 56px;
}

.detail-main {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: end;
    min-height: 500px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

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

.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1.75;
}

.detail-content {
    margin-top: -42px;
    position: relative;
    z-index: 2;
}

.player-section,
.article-section {
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.18), rgba(2, 6, 23, 0.3));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 5px;
    background: rgba(6, 182, 212, 0.9);
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.35);
    font-size: 36px;
}

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

.article-section {
    line-height: 1.9;
}

.article-section p {
    margin: 12px 0 26px;
    color: #475569;
    font-size: 17px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.detail-meta-grid div {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
}

.detail-meta-grid strong {
    color: var(--muted);
    font-size: 13px;
}

.detail-meta-grid span {
    color: #0f172a;
    font-weight: 800;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 14px;
}

.footer-logo span {
    color: #22d3ee;
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: #67e8f9;
    font-size: 18px;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
    line-height: 1.8;
}

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

.footer-inner a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

.footer-inner a:hover {
    color: #ffffff;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 18px 0 26px;
    color: #94a3b8;
    text-align: center;
}

@media (min-width: 768px) {
    .hero-carousel {
        height: 600px;
    }
}

@media (min-width: 1120px) {
    .hero-carousel {
        height: 700px;
    }
}

@media (max-width: 1040px) {
    .four-col,
    .long-rank,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .detail-main {
        grid-template-columns: 260px 1fr;
    }
}

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

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

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

    .hero-arrow {
        display: none;
    }

    .hero-content {
        bottom: 64px;
    }

    .four-col,
    .rank-list,
    .long-rank,
    .featured-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-main {
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: 28px;
    }

    .detail-cover {
        max-width: 280px;
    }

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

@media (max-width: 620px) {
    .container,
    .header-inner,
    .mobile-panel,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

    .hero-carousel {
        height: 560px;
    }

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

    .content-section,
    .category-overview,
    .category-block,
    .article-section,
    .player-section {
        border-radius: 22px;
        padding: 20px !important;
    }

    .four-col,
    .rank-list,
    .long-rank,
    .featured-grid,
    .category-grid,
    .compact-grid,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.featured .card-cover,
    .card-cover {
        height: 230px;
    }

    .page-hero {
        padding: 32px 22px;
    }

    .filter-bar input,
    .filter-bar select {
        width: 100%;
        min-width: 0;
    }

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

    .player-overlay span {
        width: 68px;
        height: 68px;
        font-size: 30px;
    }
}
