:root {
    --accent: #ef4444;
    --accent-deep: #dc2626;
    --accent-warm: #f97316;
    --ink: #0f172a;
    --muted: #64748b;
    --mist: #f1f5f9;
    --soft: #f8fafc;
    --line: #e2e8f0;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(239, 68, 68, 0.12), transparent 26rem),
        radial-gradient(circle at 90% 8%, rgba(249, 115, 22, 0.10), transparent 24rem),
        var(--soft);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 17px;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    box-shadow: 0 14px 26px rgba(239, 68, 68, 0.28);
    transform: translateZ(0);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-2deg);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent-warm));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-deep);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--mist);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #334155;
}

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

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

.mobile-link {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--accent-deep);
    background: #fee2e2;
}

.page-main {
    padding-top: 96px;
}

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

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-media {
    position: absolute;
    inset: 0;
}

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

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.62) 44%, rgba(15, 23, 42, 0.12)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.42), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 650px;
    padding: 72px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.92);
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.22);
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

.hero-tags,
.tag-row,
.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.meta-pills span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(8px);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.30);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.btn-soft {
    color: var(--accent-deep);
    background: #fee2e2;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    font-size: 30px;
    line-height: 1;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.30);
}

.hero-control.prev {
    left: 18px;
}

.hero-control.next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

.section-head h1,
.section-head h2 {
    margin: 8px 0 4px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

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

.movie-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 0 16px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    min-width: 260px;
    scroll-snap-align: start;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.05);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    min-width: 58px;
    height: 34px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.92);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.22);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 40px;
    height: 32px;
    padding: 0 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, var(--accent));
}

.movie-card-body {
    padding: 15px;
}

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

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 7px;
    color: #cbd5e1;
}

.movie-card h2,
.movie-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover {
    color: var(--accent-deep);
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.tag-row span,
.meta-pills span {
    color: #991b1b;
    background: #fee2e2;
}

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

.category-card {
    min-height: 178px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.92)),
        #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.11);
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

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

.filter-panel,
.search-hero {
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 26px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.search-hero {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px;
    gap: 12px;
}

.filter-panel input,
.filter-panel select,
.search-hero input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 14px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-hero input:focus {
    border-color: rgba(239, 68, 68, 0.70);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.search-hero button {
    border: 0;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
}

.detail-main,
.detail-side,
.player-card {
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-main {
    overflow: hidden;
}

.player-card {
    padding: 18px;
    margin-bottom: 22px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.44);
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.big-play {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-warm));
    box-shadow: 0 20px 44px rgba(239, 68, 68, 0.36);
    font-size: 34px;
    padding-left: 5px;
}

.detail-content {
    padding: 26px;
}

.detail-content h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.detail-content .one-line {
    margin: 16px 0 24px;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
}

.text-block {
    margin-top: 26px;
}

.text-block h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.text-block p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.detail-side {
    align-self: start;
    padding: 20px;
    position: sticky;
    top: 92px;
}

.detail-side h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

.mini-list {
    display: grid;
    gap: 12px;
}

.mini-link {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.mini-link:hover {
    background: var(--mist);
}

.mini-link img {
    width: 74px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: #fee2e2;
}

.mini-link b {
    display: block;
    color: #111827;
    line-height: 1.35;
}

.mini-link em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 110px 1fr auto;
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.rank-no {
    display: inline-flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, var(--accent));
    font-weight: 900;
}

.rank-poster {
    width: 100px;
    height: 132px;
    border-radius: 16px;
    object-fit: cover;
    background: #fee2e2;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    margin-top: 72px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0;
}

.footer-logo .brand-text {
    color: #ffffff;
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

.footer-brand p {
    max-width: 460px;
    color: #94a3b8;
}

.footer-group h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-group a:hover {
    color: #fb7185;
}

.empty-state {
    display: none;
    grid-column: 1 / -1;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

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

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

    .detail-side {
        position: static;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .page-main {
        padding-top: 88px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 520px;
    }

    .hero-content {
        padding: 54px 28px;
    }

    .hero-control {
        display: none;
    }

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

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

    .rank-item {
        grid-template-columns: 48px 86px 1fr;
    }

    .rank-item .btn-soft {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .rank-poster {
        width: 82px;
        height: 108px;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .footer-inner,
    .container,
    .section,
    .hero-shell,
    .detail-layout,
    .breadcrumb {
        width: min(100% - 22px, 1180px);
    }

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

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

    .hero-carousel,
    .hero-content {
        min-height: 500px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 34px;
    }

    .section-head {
        display: block;
    }

    .detail-content {
        padding: 20px;
    }

    .big-play {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}
