:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --soft: #e2e8f0;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --blue-soft: #dbeafe;
    --night: #0f172a;
    --radius: 22px;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 52%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    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: 100;
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-copy strong,
.footer-brand {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--blue), #334155);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy em {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    padding: 9px 12px;
    color: #475569;
    border-radius: 12px;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: var(--blue-soft);
    transform: translateY(-1px);
}

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

.header-search input,
.mobile-nav input,
.big-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--soft);
    color: var(--text);
    background: rgba(255, 255, 255, 0.94);
    outline: none;
}

.header-search input {
    width: 210px;
    padding: 10px 14px;
    border-radius: 999px;
}

.header-search input:focus,
.big-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.header-search button,
.big-search button,
.mobile-nav button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--blue-soft);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--blue);
    border-radius: 2px;
}

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

.mobile-nav a,
.mobile-nav form {
    display: block;
    padding: 10px 12px;
    color: #475569;
    border-radius: 12px;
}

.mobile-nav input {
    width: calc(100% - 88px);
    padding: 10px 12px;
    border-radius: 999px;
}

.mobile-nav button {
    padding: 10px 14px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: var(--night);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) brightness(0.72);
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 34%, rgba(96, 165, 250, 0.34), transparent 30%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.18));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 64px 0;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--blue-light);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    border: 1px solid rgba(147, 197, 253, 0.35);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.34);
}

.hero-actions,
.detail-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.ghost-btn.light {
    color: var(--blue);
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(255, 255, 255, 0.8);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.small-btn {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 14px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 9px 14px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    border-radius: 999px;
    font-weight: 800;
}

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

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

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

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

.quick-search {
    padding-bottom: 8px;
}

.big-search {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 999px;
    box-shadow: var(--shadow);
}

.big-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border-radius: 999px;
}

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

.section-head h2,
.page-hero h1,
.detail-article h1,
.detail-article h2,
.side-panel h2 {
    margin: 0;
    color: var(--text);
    line-height: 1.2;
}

.section-head h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 44px);
}

.section-more {
    color: var(--blue);
    background: #ffffff;
    border: 1px solid var(--soft);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(191, 219, 254, 0.85);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -30px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.2);
}

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

.category-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--blue);
    font-size: 20px;
    font-weight: 800;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

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

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

.poster-card {
    position: relative;
    display: block;
    overflow: hidden;
    background: #dbeafe;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.year-badge,
.watch-badge,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.9);
}

.watch-badge {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--blue);
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    height: 42px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-meta span {
    padding: 4px 8px;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.compact-card .card-body {
    padding: 10px;
}

.compact-card .card-title {
    min-height: auto;
    font-size: 14px;
}

.compact-card .card-body p {
    display: none;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.side-column,
.side-panel,
.detail-article,
.player-card,
.detail-poster,
.category-overview-block {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.side-column,
.side-panel {
    padding: 22px;
}

.sticky-side {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 112px);
    overflow: auto;
}

.ranking-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    border-radius: 16px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.rank-link {
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue-light), var(--blue));
    border-radius: 10px;
    font-weight: 800;
}

.rank-link img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

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

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

.rank-info strong {
    font-size: 14px;
}

.rank-info em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.heat {
    color: #f97316;
    font-weight: 800;
}

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

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

.ranking-hero {
    background:
        radial-gradient(circle at 75% 20%, rgba(249, 115, 22, 0.28), transparent 26%),
        linear-gradient(135deg, #0f172a, #1d4ed8);
}

.page-hero h1 {
    color: #ffffff;
}

.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #dbeafe;
    font-size: 17px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
}

.filter-empty {
    display: none;
    margin: 24px 0 0;
    padding: 18px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--soft);
    border-radius: 18px;
}

.filter-empty.visible {
    display: block;
}

.stacked-overview {
    display: grid;
    gap: 26px;
}

.category-overview-block {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    padding: 24px;
}

.category-overview-copy p {
    color: var(--muted);
}

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

.single-column {
    grid-template-columns: 1fr;
}

.breadcrumb {
    width: min(1280px, calc(100% - 32px));
    margin: 26px auto 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: #020617;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
    cursor: pointer;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    display: grid;
    place-items: center;
    background: #020617;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
    filter: brightness(0.72);
}

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

.play-circle {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.detail-article {
    padding: 28px;
}

.detail-article h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.detail-article h2 {
    margin-top: 28px;
    margin-bottom: 10px;
    font-size: 22px;
}

.detail-article p {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.85;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 7px 12px;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 999px;
    font-weight: 700;
}

.detail-tags span {
    color: #2563eb;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.detail-side {
    display: grid;
    gap: 20px;
}

.detail-poster {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

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

.site-footer {
    margin-top: 32px;
    color: #cbd5e1;
    background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
}

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

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
}

.site-footer p {
    max-width: 420px;
    margin: 0;
    color: #94a3b8;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a:hover {
    color: #93c5fd;
}

.footer-bottom {
    padding: 16px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

    .menu-toggle {
        display: block;
    }

    .mobile-nav.open {
        display: block;
    }

    .header-search {
        margin-left: auto;
    }

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

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

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-side {
        position: static;
        max-height: none;
    }
}

@media (max-width: 820px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

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

    .hero,
    .hero-inner {
        min-height: 720px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 44px 0 72px;
    }

    .hero-poster {
        width: min(260px, 72vw);
        transform: none;
    }

    .hero h1 {
        font-size: clamp(34px, 12vw, 54px);
    }

    .page-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 34px 24px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .category-overview-block,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .big-search {
        flex-direction: column;
        border-radius: 24px;
    }
}

@media (max-width: 520px) {
    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy em {
        display: none;
    }

    .category-grid,
    .movie-grid,
    .wide-grid,
    .mini-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-link {
        grid-template-columns: 30px 48px minmax(0, 1fr);
    }

    .heat {
        display: none;
    }

    .detail-article {
        padding: 22px;
    }
}
