:root {
    color-scheme: dark;
    --page-bg: #030712;
    --panel-bg: rgba(17, 24, 39, 0.72);
    --panel-bg-strong: rgba(31, 41, 55, 0.86);
    --line: rgba(148, 163, 184, 0.18);
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --red: #dc2626;
    --red-dark: #7f1d1d;
    --yellow: #facc15;
    --blue: #38bdf8;
    --green: #22c55e;
    --shadow-red: 0 26px 70px rgba(127, 29, 29, 0.24);
    --shadow-card: 0 18px 42px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(250, 204, 21, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #030712 100%);
    color: var(--text-soft);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(127, 29, 29, 0.98), rgba(185, 28, 28, 0.96), rgba(127, 29, 29, 0.98));
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #facc15, #dc2626);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fef3c7, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-subtitle {
    font-size: 12px;
    color: rgba(254, 226, 226, 0.82);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
    font-weight: 700;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--yellow);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.44);
    color: #ffffff;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(254, 202, 202, 0.2);
    background: rgba(127, 29, 29, 0.98);
}

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

.mobile-nav a {
    display: block;
    padding: 14px 16px;
    color: #ffffff;
    font-weight: 700;
    border-bottom: 1px solid rgba(254, 202, 202, 0.12);
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #080b14;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(7, 12, 24, 0.78) 38%, rgba(127, 29, 29, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 34%);
    z-index: 2;
}

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

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

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

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.22);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 22px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-description {
    margin: 0 0 24px;
    max-width: 680px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 18px 30px rgba(220, 38, 38, 0.32);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(31, 41, 55, 0.82);
    border-color: rgba(148, 163, 184, 0.22);
}

.hero-panel {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(248, 113, 113, 0.24);
    box-shadow: var(--shadow-red);
    backdrop-filter: blur(20px);
}

.hero-poster {
    position: relative;
    aspect-ratio: 16 / 22;
    background-size: cover;
    background-position: center;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 44%);
}

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

.hero-panel-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.hero-panel-text {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.active {
    width: 52px;
    background: var(--yellow);
}

.section {
    padding: 58px 0;
}

.section.tight {
    padding-top: 34px;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: #fca5a5;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 900;
}

.section-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--text-muted);
    max-width: 760px;
    line-height: 1.75;
}

.more-link {
    color: #fca5a5;
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(31, 41, 55, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(31, 41, 55, 0.88);
    box-shadow: 0 24px 62px rgba(127, 29, 29, 0.28);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 22;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.88);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.48s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 46%);
    opacity: 0.8;
}

.play-chip {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
}

.year-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
    min-height: 168px;
    display: flex;
    flex-direction: column;
}

.card-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.38;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    margin: 0 0 12px;
    color: #b6c2d2;
    font-size: 13px;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 12px;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.46), rgba(31, 41, 55, 0.7)),
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 18rem);
    border: 1px solid rgba(248, 113, 113, 0.22);
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 204, 21, 0.5);
}

.category-card h3 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.72;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 108px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(31, 41, 55, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.14);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
    border-color: rgba(248, 113, 113, 0.42);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #ef4444);
    font-weight: 950;
}

.rank-cover {
    width: 108px;
    aspect-ratio: 16 / 22;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.88);
}

.rank-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.rank-desc {
    margin: 0;
    color: #aeb9ca;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 52px;
    background:
        linear-gradient(90deg, rgba(127, 29, 29, 0.48), rgba(15, 23, 42, 0.66)),
        radial-gradient(circle at 10% 0%, rgba(250, 204, 21, 0.12), transparent 24rem);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero h1 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.05em;
    font-weight: 950;
}

.page-hero p {
    margin: 0;
    max-width: 820px;
    color: #d1d5db;
    font-size: 17px;
    line-height: 1.78;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(31, 41, 55, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.62);
    color: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(248, 113, 113, 0.66);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    border-radius: 24px;
    background: rgba(31, 41, 55, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #d1d5db;
}

.empty-state.show {
    display: block;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 30px 0 24px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #fca5a5;
    font-weight: 800;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-info,
.side-panel {
    border-radius: 24px;
    background: rgba(31, 41, 55, 0.66);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 3;
}

.play-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(220, 38, 38, 0.28), rgba(2, 6, 23, 0.74)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.16));
}

.play-overlay.hidden {
    display: none;
}

.play-button {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 22px 44px rgba(220, 38, 38, 0.4);
    cursor: pointer;
}

.play-button::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.player-caption {
    padding: 18px 20px;
}

.player-caption h1 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.player-caption p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.78;
}

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

.detail-info h2,
.side-panel h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 950;
}

.detail-info p {
    margin: 0 0 16px;
    color: #d1d5db;
    line-height: 1.9;
}

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

.side-panel {
    padding: 18px;
    position: sticky;
    top: 92px;
}

.side-movie {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.side-movie:last-child {
    border-bottom: 0;
}

.side-movie img {
    width: 100px;
    aspect-ratio: 16 / 22;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.88);
}

.side-movie h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
}

.side-movie p {
    margin: 0;
    color: #9ca3af;
    font-size: 12px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
}

.pagination-links a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(31, 41, 55, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    font-weight: 800;
}

.pagination-links a:hover {
    border-color: rgba(248, 113, 113, 0.46);
}

.site-footer {
    margin-top: 64px;
    padding: 42px 0 28px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), #020617);
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.footer-title {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 950;
}

.footer-text,
.footer-links a {
    color: #9ca3af;
    line-height: 1.8;
    font-size: 14px;
}

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

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: #6b7280;
    font-size: 13px;
}

.scroll-top {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 0;
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.scroll-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

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

    .mobile-toggle {
        display: inline-block;
    }

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

    .hero-content {
        display: block;
        padding: 56px 0 84px;
    }

    .hero-panel {
        display: none;
    }

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

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

    .side-panel {
        position: static;
    }

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

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

    .logo-title {
        font-size: 17px;
    }

    .logo-subtitle {
        display: none;
    }

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

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

    .section-head {
        display: block;
    }

    .more-link {
        display: inline-flex;
        margin-top: 14px;
    }

    .rank-item {
        grid-template-columns: 46px 82px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .rank-cover {
        width: 82px;
    }

    .side-movie {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .side-movie img {
        width: 84px;
    }

    .play-button {
        width: 72px;
        height: 72px;
    }
}
