:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-strong: #273449;
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --red: #dc2626;
    --red-dark: #991b1b;
    --orange: #f97316;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(220, 38, 38, 0.16), transparent 34rem),
        radial-gradient(circle at 92% 10%, rgba(249, 115, 22, 0.16), transparent 32rem),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #020617 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(16px);
}

.navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: white;
    font-size: 16px;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 24px;
    letter-spacing: -0.04em;
}

.brand-text small {
    color: var(--muted-strong);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    color: #e2e8f0;
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: white;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(249, 115, 22, 0.88));
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.14);
    padding: 10px;
    cursor: pointer;
}

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

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

.mobile-menu.is-open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 14px;
    background: rgba(148, 163, 184, 0.08);
}

.mobile-category-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 8px;
}

.mobile-category-strip a {
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: linear-gradient(110deg, #7f1d1d 0%, #9a3412 50%, #111827 100%);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    filter: saturate(1.2) contrast(1.06);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.70) 45%, rgba(15, 23, 42, 0.20) 100%),
        linear-gradient(0deg, #0f172a 0%, transparent 44%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 56px;
    padding: 72px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #fecaca;
    font-weight: 800;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.hero p {
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.75;
    max-width: 720px;
}

.hero-meta,
.detail-meta,
.movie-meta,
.tag-row,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.tag-row span,
.filter-row a,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: white;
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.34);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.18);
}

.hero-panel {
    background: rgba(15, 23, 42, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

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

.hero-panel-body {
    padding: 22px;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.30);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--red), var(--orange));
}

.section {
    padding: 66px 0;
}

.section-tight {
    padding: 42px 0;
}

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

.section-title {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.05em;
}

.section-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    border: 1px solid var(--line);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.42);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.poster-link {
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #7f1d1d, #1e293b);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.play-badge {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    color: var(--red);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.40);
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    background: var(--red);
    color: white;
    font-size: 12px;
    font-weight: 900;
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
}

.movie-info p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta span {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 12px;
    color: #cbd5e1;
}

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

.tag-row span {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 11px;
    color: #fed7aa;
    border-color: rgba(249, 115, 22, 0.16);
}

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

.category-card {
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.26), transparent 12rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(248, 113, 113, 0.46);
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 21px;
}

.category-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.65;
}

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

.rank-panel,
.info-panel,
.player-shell,
.detail-card,
.search-panel {
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.rank-panel {
    padding: 22px;
}

.rank-panel h3 {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 44px 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.58);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
    background: rgba(220, 38, 38, 0.18);
    transform: translateX(4px);
}

.rank-number {
    font-weight: 900;
    color: #fecaca;
    font-size: 20px;
}

.rank-item img {
    width: 58px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    background: #111827;
}

.rank-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

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

.rank-copy small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    padding: 76px 0 46px;
    background:
        radial-gradient(circle at 18% 18%, rgba(220, 38, 38, 0.20), transparent 30rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0));
}

.page-hero p {
    max-width: 760px;
    color: var(--muted-strong);
    line-height: 1.8;
    font-size: 18px;
}

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

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

.detail-hero {
    padding: 42px 0 30px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #7f1d1d, #1e293b);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: -0.06em;
}

.detail-copy .lead {
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.8;
}

.player-section {
    padding: 32px 0 62px;
}

.player-shell {
    overflow: hidden;
}

.player-frame {
    position: relative;
    background: black;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background:
        radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.30), transparent 14rem),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 60px rgba(220, 38, 38, 0.45);
    font-size: 30px;
}

.player-caption {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted-strong);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
}

.detail-card {
    padding: 28px;
}

.detail-card h2,
.info-panel h2,
.search-panel h2 {
    margin-top: 0;
    font-size: 26px;
}

.detail-card p,
.info-panel p {
    color: var(--muted-strong);
    line-height: 1.9;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
}

.search-panel {
    padding: 24px;
    margin-bottom: 28px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px auto;
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.82);
    color: white;
    padding: 0 16px;
    outline: none;
}

.search-form input:focus,
.search-form select:focus {
    border-color: rgba(248, 113, 113, 0.70);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    color: var(--muted-strong);
    padding: 0 12px;
}

.pagination .current,
.pagination a:hover {
    color: white;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.empty-state {
    display: none;
    text-align: center;
    padding: 40px;
    color: var(--muted);
}

.static-page {
    max-width: 860px;
}

.static-page h2 {
    font-size: 30px;
    margin-top: 0;
}

.static-page p {
    color: var(--muted-strong);
    line-height: 1.9;
}

.site-footer {
    margin-top: 72px;
    padding: 58px 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), #020617 60%);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .brand-text strong {
        font-size: 20px;
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 52px 0 42px;
    }

    .hero-panel {
        max-width: 340px;
    }

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

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

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

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

    .search-form {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

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

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

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

    .movie-info {
        padding: 12px;
    }

    .movie-info p,
    .tag-row {
        display: none;
    }

    .player-caption {
        align-items: flex-start;
        flex-direction: column;
    }
}
