* {
    box-sizing: border-box;
}

:root {
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --blue-soft: #dbeafe;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

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

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.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-size: 15px;
    font-weight: 650;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--blue);
}

.menu-toggle {
    display: none;
    border: 0;
    background: #eff6ff;
    color: var(--blue);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    font-size: 22px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 48%, #0f172a 100%);
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
    background-size: 34px 34px;
}

.hero-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    filter: blur(30px);
    opacity: 0.32;
}

.hero-glow-left {
    left: -120px;
    top: 40px;
    background: #60a5fa;
}

.hero-glow-right {
    right: -120px;
    bottom: -80px;
    background: #38bdf8;
}

.hero-track {
    position: relative;
    max-width: 1180px;
    min-height: 620px;
    margin: 0 auto;
    padding: 86px 24px 92px;
}

.hero-slide {
    position: absolute;
    inset: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 56px;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-eyebrow,
.section-heading span,
.rank-entry span,
.inner-hero span {
    display: inline-flex;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-eyebrow {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 20px;
}

.hero-feature {
    max-width: 720px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.22);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(12px);
}

.hero-feature strong,
.hero-feature span {
    display: block;
}

.hero-feature strong {
    margin-bottom: 6px;
    font-size: 20px;
}

.hero-feature span {
    color: #dbeafe;
}

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

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

.primary-btn {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover,
.rank-mini-row:hover {
    transform: translateY(-3px);
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.11);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.38);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.45));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #1e3a8a);
}

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

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

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

.section-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 24px;
}

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

.left-heading {
    margin-left: 0;
    text-align: left;
}

.section-heading span,
.inner-hero span,
.rank-entry span {
    color: var(--blue);
    background: var(--blue-soft);
}

.section-heading h2,
.rank-entry h2,
.inner-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 12px 0 10px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading h2,
.rank-entry h2,
.inner-hero h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.section-heading p,
.rank-entry p,
.inner-hero p,
.detail-info p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

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

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

.category-tile {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    box-shadow: var(--shadow);
}

.category-cover {
    height: 128px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff, #bfdbfe);
}

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

.category-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.category-info strong {
    font-size: 18px;
}

.category-info span {
    color: var(--muted);
    font-size: 14px;
}

.rank-entry-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: 26px;
    align-items: stretch;
}

.rank-entry,
.rank-mini-list,
.filter-panel,
.detail-content article {
    border: 1px solid var(--border);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.rank-entry {
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
}

.rank-entry .primary-btn {
    color: #ffffff;
    background: var(--blue);
}

.rank-mini-list {
    padding: 14px;
}

.rank-mini-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-mini-row:hover {
    background: #eff6ff;
}

.rank-mini-row span {
    font-weight: 900;
    color: var(--blue);
}

.rank-mini-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

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

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

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 16px;
}

.card-body strong {
    font-size: 17px;
    line-height: 1.35;
}

.card-desc {
    color: var(--muted);
    font-size: 14px;
}

.card-meta,
.detail-meta,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta em,
.detail-meta span,
.tag-cloud span {
    font-style: normal;
    padding: 5px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 700;
}

.inner-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 58%, #0f172a 100%);
}

.inner-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(rgba(255, 255, 255, 0.34) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px);
    background-size: 34px 34px;
}

.inner-hero > div {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 76px 24px 84px;
}

.inner-hero h1,
.inner-hero p {
    max-width: 760px;
    color: #ffffff;
}

.inner-hero p {
    color: #dbeafe;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 18px;
    padding: 18px;
    margin-bottom: 28px;
}

.search-field,
.select-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 800;
}

.search-field input,
.select-field select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 14px;
    font: inherit;
    color: var(--text);
    background: #ffffff;
    outline: none;
}

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

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 70px 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
    font-size: 28px;
    font-weight: 900;
    color: var(--blue);
    text-align: center;
}

.rank-thumb {
    overflow: hidden;
    width: 72px;
    height: 96px;
    border-radius: 16px;
    background: #dbeafe;
}

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

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

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

.rank-info strong {
    margin-bottom: 6px;
    font-size: 18px;
}

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

.detail-head {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 24px 34px;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(135deg, #dbeafe, #1e40af);
    box-shadow: var(--shadow);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 58px);
}

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

.player-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 24px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

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

.play-icon {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    background: #ffffff;
    font-size: 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-content article {
    padding: 28px;
}

.detail-content p {
    margin: 0;
    color: #374151;
}

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

.compact-card .card-desc {
    display: none;
}

.compact-card .card-body strong {
    font-size: 15px;
}

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

.footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 24px 30px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

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

.footer-links {
    display: grid;
    gap: 9px;
}

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

.copyright {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px 30px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 14px;
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr 320px;
    }

    .rank-entry-section,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-wrap {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0 0 16px;
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-links a {
        padding: 10px 12px;
        border-radius: 12px;
        background: #f8fafc;
    }

    .hero-track {
        min-height: 760px;
        padding: 58px 24px 90px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 28px;
    }

    .hero-poster {
        max-width: 280px;
        margin: 0 auto;
    }

    .category-grid,
    .movie-grid,
    .footer-grid,
    .filter-panel,
    .detail-head,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-row {
        align-items: start;
    }

    .rank-tags {
        justify-self: start;
    }

    .detail-head {
        padding-top: 34px;
    }

    .detail-poster {
        max-width: 260px;
    }
}

@media (max-width: 520px) {
    .nav-wrap,
    .section-wrap,
    .inner-hero > div,
    .detail-head,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-track {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-slide {
        left: 16px;
        right: 16px;
    }

    .rank-entry {
        flex-direction: column;
        align-items: flex-start;
    }
}
