:root {
    --site-bg: #f8fafc;
    --site-surface: #ffffff;
    --site-ink: #111827;
    --site-muted: #6b7280;
    --site-border: #e5e7eb;
    --site-primary: #0891b2;
    --site-primary-dark: #0e7490;
    --site-secondary: #2563eb;
    --site-soft: #ecfeff;
    --site-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--site-ink);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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(14px);
    border-bottom: 1px solid var(--site-border);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--site-ink);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-secondary));
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.25);
}

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

.nav-link,
.mobile-link {
    padding: 9px 14px;
    border-radius: 12px;
    color: #374151;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    color: var(--site-primary);
    background: var(--site-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.header-search input,
.mobile-search input,
.intro-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    padding: 11px 16px;
    min-width: 240px;
    outline: none;
    color: var(--site-ink);
}

.header-search input:focus,
.mobile-search input:focus,
.intro-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--site-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.16);
}

.header-search button,
.mobile-search button,
.intro-search button,
.primary-btn,
.ghost-btn,
.section-more {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.mobile-search button,
.intro-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-secondary));
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.22);
}

.primary-btn.small {
    padding: 9px 14px;
    font-size: 14px;
}

.ghost-btn,
.section-more {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.section-more {
    color: var(--site-primary);
    background: var(--site-soft);
    border: 1px solid #bae6fd;
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.header-search button:hover,
.mobile-search button:hover,
.intro-search button:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    padding: 10px;
}

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

.mobile-panel {
    display: none;
    border-top: 1px solid var(--site-border);
    padding: 16px 24px 20px;
    background: #fff;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 80px;
    max-width: 720px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: var(--site-primary);
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-content p,
.page-hero p,
.detail-one-line {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.hero-tags,
.hero-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags {
    margin-bottom: 26px;
}

.hero-tags span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 38px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

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

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

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

.home-intro {
    max-width: 1280px;
    margin: -42px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 3;
}

.intro-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 26px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(8, 145, 178, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--site-shadow);
    backdrop-filter: blur(18px);
}

.intro-card h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
}

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

.page-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.top-page {
    padding-top: 32px;
}

.content-section {
    margin-top: 72px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
}

.section-head p {
    margin: 8px 0 0;
    color: var(--site-muted);
}

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

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

.category-movie-grid {
    margin-top: 30px;
}

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

.movie-card {
    min-width: 0;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #e5e7eb;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

.movie-card.compact .card-cover {
    border-radius: 16px;
}

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0.75);
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--site-primary);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.card-badge,
.card-duration {
    position: absolute;
    z-index: 3;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(10px);
}

.card-badge {
    left: 12px;
}

.card-duration {
    right: 12px;
}

.card-body {
    padding: 14px 2px 0;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.4;
}

.movie-card:hover h3 a {
    color: var(--site-primary);
}

.card-body p {
    margin: 0 0 10px;
    min-height: 44px;
    color: var(--site-muted);
    font-size: 14px;
    line-height: 1.6;
}

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

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

.gradient-panel,
.dark-panel {
    padding: 38px;
    border-radius: 30px;
}

.gradient-panel {
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.dark-panel {
    color: #fff;
    background: #111827;
}

.dark-panel .section-head p,
.dark-panel .card-body p,
.dark-panel .card-meta {
    color: #cbd5e1;
}

.dark-panel .card-body h3,
.dark-panel .section-head h2 {
    color: #fff;
}

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

.category-tile {
    display: grid;
    gap: 12px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.category-tile strong {
    font-size: 20px;
}

.category-tile span {
    color: #dbeafe;
    line-height: 1.65;
}

.category-tile em {
    display: grid;
    gap: 6px;
    font-style: normal;
    color: #a5f3fc;
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 24px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--site-primary);
    font-weight: 700;
}

.breadcrumb span::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
    content: "/";
    margin-right: 9px;
    color: #cbd5e1;
}

.page-hero {
    border-radius: 30px;
    padding: clamp(32px, 6vw, 68px);
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.34), transparent 30%), linear-gradient(135deg, #0f172a, #164e63 58%, #2563eb);
    box-shadow: var(--site-shadow);
}

.small-hero,
.category-hero,
.ranking-hero {
    min-height: 260px;
}

.page-hero h1 {
    margin-bottom: 12px;
}

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

.category-overview-list {
    display: grid;
    gap: 26px;
    margin-top: 34px;
}

.category-overview-card {
    padding: 28px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--site-border);
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: start;
    margin-bottom: 22px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-overview-head p {
    margin: 0;
    color: var(--site-muted);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--site-border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.filter-bar input {
    flex: 1 1 320px;
}

.filter-bar select {
    min-width: 150px;
}

.is-hidden-card {
    display: none !important;
}

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 48px 96px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(8, 145, 178, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.12);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--site-primary), var(--site-secondary));
}

.ranking-item img {
    width: 96px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    margin-top: 4px;
    color: var(--site-muted);
    font-style: normal;
    font-size: 13px;
}

.rank-score {
    color: #b45309;
    font-weight: 800;
}

.detail-page {
    padding-top: 32px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
    gap: 32px;
    align-items: stretch;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 0;
    border: 0;
    background: #020617;
    cursor: pointer;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.12), rgba(0, 0, 0, 0.62));
}

.player-cover.is-hidden {
    display: none;
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--site-primary);
    font-size: 34px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.detail-info {
    padding: 32px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(145deg, #0f172a, #164e63);
    box-shadow: var(--site-shadow);
}

.detail-info h1 {
    font-size: clamp(30px, 3vw, 46px);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #cffafe;
    background: rgba(255, 255, 255, 0.12);
}

.detail-meta {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 22px 0 0;
    list-style: none;
}

.detail-meta li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-meta strong {
    color: #bae6fd;
}

.detail-text {
    max-width: 920px;
}

.detail-text h2 {
    margin: 26px 0 12px;
    font-size: 26px;
}

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

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

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 12px;
}

.footer-inner p {
    margin: 0;
    max-width: 560px;
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    max-width: 520px;
}

.footer-links a {
    padding: 7px 11px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.08);
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-carousel {
        height: 68vh;
        min-height: 480px;
    }

    .hero-content {
        left: 22px;
        bottom: 72px;
        max-width: calc(100% - 44px);
    }

    .hero-arrow {
        display: none;
    }

    .intro-card,
    .footer-inner,
    .category-overview-head {
        grid-template-columns: 1fr;
        display: grid;
    }

    .intro-search,
    .mobile-search {
        width: 100%;
    }

    .intro-search input,
    .mobile-search input {
        min-width: 0;
        flex: 1;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .mini-grid,
    .ranking-grid,
    .long-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ranking-item {
        grid-template-columns: 40px 78px 1fr;
    }

    .rank-score {
        display: none;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .page-wrap,
    .home-intro {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-logo {
        font-size: 17px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

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

    .hero-content h1 {
        font-size: 34px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .movie-grid,
    .featured-grid,
    .category-grid,
    .mini-grid,
    .ranking-grid,
    .long-ranking {
        grid-template-columns: 1fr;
    }

    .gradient-panel,
    .dark-panel,
    .category-overview-card,
    .detail-info {
        padding: 22px;
        border-radius: 22px;
    }

    .player-shell {
        border-radius: 20px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}
