
:root {
    --page-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f97316;
    --border: #e5e7eb;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius-xl: 26px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text-main);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #f8fafc 100%);
    font-family: Inter, 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%;
}

.image-missing {
    opacity: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

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

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

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

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

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

.mobile-nav {
    display: none;
    padding: 10px 24px 20px;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, #334155 0%, #0f172a 42%, #020617 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.08));
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(circle at 18% 36%, rgba(37, 99, 235, 0.32), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    height: 70vh;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(660px, 100%);
    padding-top: 54px;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 620px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-meta,
.card-meta-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.hero-tags span,
.detail-meta span,
.card-meta-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
}

.card-meta-row span {
    color: #2563eb;
    background: #eff6ff;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.small-button,
.hero-search button,
.global-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-search button,
.global-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover,
.hero-search button:hover,
.global-search button:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

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

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

.hero-search-panel {
    position: absolute;
    left: 50%;
    bottom: 32px;
    z-index: 6;
    width: min(560px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-search,
.global-search,
.inline-filter {
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.hero-search input,
.global-search input,
.inline-filter input,
.inline-filter select,
.global-search select {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    color: #111827;
    border: 1px solid transparent;
    border-radius: 999px;
    outline: none;
    background: #f9fafb;
}

.category-strip,
.content-section,
.search-panel,
.ranking-list,
.detail-body {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.category-strip {
    margin-top: -24px;
    position: relative;
    z-index: 10;
}

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

.strip-card,
.category-tile,
.side-card,
.player-card,
.text-block,
.movie-card,
.rank-row {
    background: var(--card-bg);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.strip-card {
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.strip-card span,
.category-tile em,
.movie-card p,
.rank-info p,
.text-block p,
.footer-inner p,
.page-hero p,
.detail-one-line {
    color: var(--text-muted);
    line-height: 1.75;
}

.strip-card strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.strip-card.highlight {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}

.strip-card.highlight span {
    color: rgba(255, 255, 255, 0.8);
}

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

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.text-block h2,
.side-card h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-more {
    color: var(--primary);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.play-hover,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.play-hover {
    inset: auto 14px 14px auto;
    min-height: 34px;
    padding: 0 14px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.94);
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.22s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-card h3 {
    min-height: 52px;
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.45;
}

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

.movie-card p {
    min-height: 72px;
    margin: 0 0 12px;
    font-size: 14px;
}

.genre-line {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.page-main {
    padding-bottom: 70px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    color: #ffffff;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 25% 20%, rgba(96, 165, 250, 0.35), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e3a8a 55%, #111827);
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 720px;
    color: #d1d5db;
}

.compact-hero {
    min-height: 250px;
}

.inline-filter {
    min-width: min(460px, 100%);
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

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

.category-tile {
    position: relative;
    min-height: 240px;
    padding: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background: #0f172a;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.86));
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.64;
}

.category-tile span,
.category-tile strong,
.category-tile em {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin: 8px 0;
}

.category-tile em {
    font-style: normal;
    color: #e5e7eb;
}

.ranking-list {
    padding: 36px 0 80px;
    display: grid;
    gap: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 86px 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 14px 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-cover {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #f5d0fe);
}

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

.rank-number {
    color: #94a3b8;
    font-size: 30px;
    font-weight: 900;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 10px;
}

.small-button {
    min-height: 38px;
    color: #ffffff;
    background: var(--primary);
}

.search-panel {
    padding: 36px 0 80px;
}

.global-search {
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.search-count {
    margin: 12px 0 24px;
    color: var(--text-muted);
    font-weight: 700;
}

.detail-main {
    background: #ffffff;
}

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

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.36;
    filter: blur(1px);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.28), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.2));
}

.detail-content-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 42px;
    color: #d1d5db;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 40px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

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

.detail-info h1 {
    max-width: 820px;
    margin-bottom: 18px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 68px);
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 18px;
}

.tag-cloud span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
}

.detail-info .primary-button {
    margin-top: 26px;
}

.detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    padding: 42px 0 90px;
}

.detail-article {
    min-width: 0;
}

.player-card,
.text-block,
.side-card {
    padding: 22px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #020617;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 112px;
    height: 112px;
    color: #ffffff;
    border: 0;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-weight: 900;
}

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

.text-block {
    margin-top: 22px;
}

.text-block h2 {
    margin-bottom: 14px;
    font-size: 26px;
}

.text-block p {
    margin: 0;
    font-size: 16px;
}

.detail-related {
    width: 100%;
    padding-top: 36px;
}

.detail-sidebar {
    position: sticky;
    top: 94px;
    align-self: start;
}

.side-card h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.side-rank-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.side-rank-item span {
    color: #94a3b8;
    font-weight: 900;
}

.side-rank-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-footer {
    color: #d1d5db;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    color: #ffffff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.footer-links a {
    color: #d1d5db;
    font-weight: 700;
}

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

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

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

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

    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .hero,
    .hero-content {
        min-height: 78vh;
        height: 78vh;
    }

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

    .hero-search-panel {
        bottom: 18px;
    }

    .hero-search,
    .global-search,
    .inline-filter {
        border-radius: 24px;
        flex-direction: column;
    }

    .hero-dots {
        display: none;
    }

    .page-hero {
        padding: 30px 22px;
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .movie-card h3 {
        min-height: auto;
        font-size: 16px;
    }

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

    .rank-row {
        grid-template-columns: 66px minmax(0, 1fr);
    }

    .rank-number,
    .rank-row .small-button {
        display: none;
    }

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

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

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

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .all-grid,
    .compact-grid,
    .category-grid,
    .strip-inner {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding-top: 30px;
    }

    .hero-desc {
        font-size: 15px;
    }
}
