:root {
    --brand: #ea580c;
    --brand-strong: #dc2626;
    --brand-soft: #fff7ed;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --bg: #f8fafc;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f9fafb 0%, #eef2f7 100%);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, #ea580c 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28);
}

.nav-container {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 176px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    font-weight: 900;
}

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

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-copy small {
    opacity: 0.9;
    font-size: 12px;
    margin-top: 3px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
}

.nav-links > a,
.nav-dropdown > button {
    color: #fff;
    border: 0;
    cursor: pointer;
    background: transparent;
    font-weight: 700;
    padding: 8px 0;
    transition: opacity 0.2s ease;
}

.nav-links > a:hover,
.nav-links > a.active,
.nav-dropdown > button:hover {
    opacity: 0.78;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 230px;
    padding: 10px;
    display: grid;
    gap: 4px;
    background: #fff;
    color: #374151;
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown-menu a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.nav-dropdown-menu a:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.nav-search {
    width: 300px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    overflow: hidden;
}

.nav-search input {
    flex: 1;
    width: 100%;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 9px 12px;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.nav-search button {
    border: 0;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    cursor: pointer;
    padding: 9px 16px;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-panel a,
.mobile-panel form {
    display: block;
    margin-top: 8px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-panel form {
    display: flex;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
}

.mobile-panel input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 12px;
    color: #fff;
    background: transparent;
}

.mobile-panel input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.mobile-panel button {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
}

.topbar.menu-open .mobile-panel {
    display: block;
}

.hero {
    position: relative;
    height: 520px;
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(90deg, #111827 0%, #1f2937 100%);
}

.hero h1 {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

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

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.52) 45%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: none;
}

.hero-content > * {
    max-width: 650px;
}

.hero-kicker {
    display: inline-flex;
    width: auto;
    color: #fff;
    background: var(--brand);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
}

.hero-content h2 {
    margin: 0 0 16px;
    color: #fff;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: 18px;
    max-width: 620px;
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
    box-shadow: 0 16px 30px rgba(234, 88, 12, 0.35);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.text-btn {
    color: var(--brand);
    background: var(--brand-soft);
}

.hero-quick {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(16px);
}

.hero-quick a {
    color: #fff;
    font-size: 14px;
    padding: 9px 14px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.hero-quick a:hover {
    background: rgba(255, 255, 255, 0.16);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    transition: 0.25s ease;
}

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

.main-content,
.page-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

section + section {
    margin-top: 56px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

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

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand);
    font-weight: 800;
}

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

.category-tile {
    min-height: 128px;
    padding: 22px;
    border-radius: 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-tile span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
}

.theme-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.theme-rose {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
}

.theme-slate {
    background: linear-gradient(135deg, #475569 0%, #0f172a 100%);
}

.theme-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

.theme-green {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

.theme-orange {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
}

.theme-red {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
}

.theme-purple {
    background: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%);
}

.theme-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%);
}

.theme-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
}

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

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

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #111827;
}

.movie-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-link:hover img {
    transform: scale(1.08);
    opacity: 0.92;
}

.movie-badge,
.movie-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    color: #fff;
    border-radius: 999px;
    font-weight: 800;
    font-size: 12px;
}

.movie-badge {
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

.movie-year {
    right: 12px;
    bottom: 12px;
    padding: 4px 9px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.movie-body {
    display: block;
    padding: 16px;
}

.movie-body strong {
    display: -webkit-box;
    min-height: 48px;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.35;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-link:hover .movie-body strong {
    color: var(--brand);
}

.movie-body span {
    display: -webkit-box;
    margin-top: 9px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-body em {
    display: block;
    margin-top: 12px;
    color: #9ca3af;
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight-panel {
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff7ed 0%, #fee2e2 100%);
}

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

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

.compact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.compact-link img {
    width: 128px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
    flex-shrink: 0;
}

.compact-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.compact-body strong {
    color: var(--ink);
    line-height: 1.4;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact-body small {
    margin-top: 6px;
    color: var(--muted);
}

.ranking-strip {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 96px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
}

.rank-index {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
}

.rank-row img {
    width: 96px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.rank-row strong {
    display: block;
    color: var(--ink);
}

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

.rank-row em {
    color: var(--brand);
    font-style: normal;
    font-weight: 800;
}

.page-hero {
    padding: 46px;
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    box-shadow: var(--shadow);
    margin-bottom: 34px;
    position: relative;
    overflow: hidden;
}

.page-hero h1,
.page-hero p {
    color: #fff;
    position: relative;
    z-index: 1;
}

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

.page-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.55) 0%, rgba(234, 88, 12, 0) 70%);
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.filter-panel input {
    min-width: min(100%, 360px);
    flex: 1;
    border: 1px solid var(--line);
    outline: 0;
    border-radius: 999px;
    padding: 12px 16px;
}

.filter-panel input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
}

.detail-main,
.side-card {
    min-width: 0;
}

.player-box,
.detail-info,
.side-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.video-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    transition: opacity 0.25s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.play-action {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
    font-size: 30px;
    text-indent: 4px;
}

.player-box.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.detail-info {
    margin-top: 22px;
    padding: 26px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin: 12px 0 20px;
}

.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #f3f4f6;
    padding: 6px 12px;
    font-size: 14px;
}

.detail-text h2,
.side-card h2 {
    margin: 22px 0 10px;
    color: var(--ink);
    font-size: 20px;
}

.detail-text p {
    margin: 0 0 12px;
    color: #374151;
}

.review-box {
    margin-top: 14px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #fee2e2 100%);
}

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

.tag-list span:nth-child(1) {
    color: #c2410c;
    background: #ffedd5;
}

.tag-list span:nth-child(2) {
    color: #1d4ed8;
    background: #dbeafe;
}

.tag-list span:nth-child(3) {
    color: #047857;
    background: #d1fae5;
}

.side-card {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.hidden {
    display: none !important;
}

.site-footer {
    margin-top: 28px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
}

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

.footer-brand p {
    max-width: 420px;
    color: #9ca3af;
}

.site-footer h2 {
    color: #fff;
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 1024px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .nav-container {
        height: 64px;
    }

    .brand-copy strong {
        font-size: 18px;
    }

    .hero {
        height: 560px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 118px;
    }

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

    .hero-quick {
        width: calc(100% - 32px);
        justify-content: center;
        bottom: 22px;
        border-radius: 22px;
        flex-wrap: wrap;
    }

    .hero-dots {
        bottom: 104px;
    }

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

    .category-grid,
    .movie-grid,
    .compact-list,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-row {
        grid-template-columns: 36px 76px 1fr;
    }

    .rank-row em {
        grid-column: 3;
        justify-self: start;
    }

    .page-hero {
        padding: 30px 24px;
    }

    .detail-info {
        padding: 20px;
    }
}
