
:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --sky: #38bdf8;
    --radius: 24px;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: #eff6ff;
}

.header-search {
    display: flex;
    align-items: center;
    width: 280px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.header-search button,
.hero-search button,
.filter-panel button {
    border: 0;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
    font-weight: 800;
}

.header-search button {
    align-self: stretch;
    padding: 0 16px;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #eff6ff;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-link {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.hero-slider {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #ffffff;
    background: #07132c;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 136px 0 180px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #bfdbfe;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.rank-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-tags span {
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 14px 24px;
    color: var(--blue-dark);
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.ghost-btn {
    padding: 13px 22px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-panel {
    position: absolute;
    left: 50%;
    bottom: 30px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px) auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: rgba(7, 19, 44, 0.62);
    backdrop-filter: blur(20px);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-stats span {
    padding: 10px 14px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.1);
}

.hero-search {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
}

.hero-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 13px 18px;
}

.hero-search button {
    padding: 0 20px;
    white-space: nowrap;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

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

.content-section,
.page-hero,
.rank-hero,
.detail-main,
.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

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

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

.section-head h2,
.ranking-head h2,
.detail-article h2,
.detail-side h2,
.site-footer h2 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -0.03em;
}

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

.section-head a,
.ranking-head a,
.text-link {
    color: var(--blue);
    font-weight: 900;
}

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

.category-tile a {
    position: relative;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, #1e3a8a, #2563eb 55%, #38bdf8);
    box-shadow: var(--shadow);
}

.tile-glow {
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
}

.category-tile h2,
.category-card-large h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.category-tile p,
.category-card-large p {
    margin: 0;
    line-height: 1.7;
}

.tile-links,
.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tile-links a,
.inline-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transition: 0.22s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #dbeafe;
}

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

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: 0.22s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: #ef4444;
    font-weight: 900;
}

.card-content {
    padding: 18px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.card-content h2 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.32;
}

.card-content h2 a:hover {
    color: var(--blue);
}

.card-content p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span,
.detail-tags span {
    padding: 6px 9px;
    color: var(--blue-dark);
    background: #eff6ff;
    font-size: 12px;
}

.two-column-section {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.ranking-card,
.detail-side,
.detail-article,
.filter-panel,
.category-card-large,
.rank-list-page {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.ranking-card {
    position: sticky;
    top: 96px;
    padding: 22px;
}

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

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

.ranking-list a {
    display: grid;
    grid-template-columns: 42px 58px 1fr;
    gap: 12px;
    align-items: center;
}

.ranking-list img {
    width: 58px;
    height: 78px;
    border-radius: 14px;
}

.rank-number {
    color: var(--blue);
    font-weight: 900;
}

.rank-title {
    font-weight: 900;
}

.rank-type {
    grid-column: 3;
    color: var(--muted);
    font-size: 12px;
}

.page-main {
    min-height: 60vh;
}

.page-hero,
.rank-hero,
.detail-hero {
    overflow: hidden;
    margin-top: 34px;
    border-radius: 34px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f1e43, #2563eb);
    box-shadow: var(--shadow);
}

.page-hero {
    padding: 78px 60px;
}

.page-hero p,
.rank-hero p,
.detail-copy p {
    max-width: 800px;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(130px, 1fr)) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 26px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 0 13px;
    outline: 0;
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-panel button {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 15px;
}

.empty-state {
    padding: 26px;
    margin-bottom: 22px;
    border-radius: var(--radius);
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    font-weight: 800;
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    padding: 22px;
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-poster-stack img {
    width: 100%;
    height: 130px;
    border-radius: 16px;
}

.category-card-large .inline-links a {
    color: var(--blue-dark);
    background: #eff6ff;
}

.rank-hero {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    min-height: 520px;
    padding: 74px 60px;
    background-size: cover;
    background-position: center;
}

.rank-hero-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    align-content: end;
}

.rank-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 22px;
}

.rank-hero-card img {
    width: 100%;
    height: 100%;
}

.rank-hero-card span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    font-weight: 900;
}

.rank-list-page {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.rank-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
}

.rank-row:hover {
    background: #f8fafc;
}

.rank-row-main {
    display: grid;
    grid-template-columns: 58px 72px 1fr;
    gap: 16px;
    align-items: center;
}

.rank-row-main img {
    width: 72px;
    height: 96px;
    border-radius: 16px;
}

.rank-number.big {
    font-size: 22px;
}

.rank-row-main strong,
.rank-row-main em {
    display: block;
}

.rank-row-main em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
}

.rank-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: end;
}

.rank-row-meta span {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--blue-dark);
    background: #eff6ff;
    font-size: 13px;
    font-weight: 900;
}

.detail-main {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
}

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

.detail-hero {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 34px;
    align-items: center;
    padding: 54px;
    margin-top: 22px;
}

.detail-cover {
    width: 280px;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.player-section {
    margin-top: 28px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.45), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--blue-dark);
    background: #ffffff;
    font-size: 32px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.play-overlay span:last-child {
    font-size: 20px;
    font-weight: 900;
}

.player-wrap.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    margin-top: 28px;
}

.detail-article,
.detail-side {
    padding: 28px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.info-grid div {
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
}

.info-grid span,
.info-grid strong {
    display: block;
}

.info-grid span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

.info-grid strong {
    margin-top: 6px;
}

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

.detail-tags {
    margin-top: 22px;
}

.side-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.side-list a {
    display: grid;
    grid-template-columns: 66px 1fr;
    gap: 12px;
    align-items: center;
    font-weight: 900;
}

.side-list img {
    width: 66px;
    height: 88px;
    border-radius: 14px;
}

.site-footer {
    margin-top: 86px;
    padding: 46px 0 26px;
    color: #cbd5e1;
    background: #0f172a;
    border-radius: 34px 34px 0 0;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 440px;
    line-height: 1.8;
}

.site-footer h2 {
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

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

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

.back-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    display: none;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 14px 36px rgba(37, 99, 235, 0.32);
    cursor: pointer;
}

.back-top.show {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

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

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

    .ranking-card {
        position: static;
    }

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

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

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

    .hero-slider {
        min-height: 760px;
    }

    .hero-content {
        padding: 92px 0 260px;
    }

    .hero-panel,
    .filter-panel,
    .footer-grid,
    .category-card-large,
    .detail-hero,
    .info-grid,
    .rank-row,
    .rank-row-main {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        bottom: 18px;
    }

    .hero-search {
        order: -1;
    }

    .content-section {
        padding-top: 54px;
    }

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

    .category-grid,
    .movie-grid,
    .compact-grid,
    .listing-grid,
    .category-list-large,
    .rank-hero-side {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .rank-hero,
    .detail-hero {
        padding: 38px 24px;
        border-radius: 26px;
    }

    .detail-cover {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
    }

    .rank-row-meta {
        justify-content: start;
    }
}
