* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #0f1117;
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    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 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #7f1d1d;
    background: linear-gradient(135deg, #fde047, #ef4444);
    box-shadow: 0 12px 28px rgba(254, 202, 202, 0.24);
}

.brand-text {
    display: grid;
    gap: 0;
}

.brand-text strong {
    font-size: 20px;
    line-height: 1.1;
    background: linear-gradient(90deg, #fef3c7, #ffffff);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    color: #fecaca;
    font-size: 12px;
    font-style: normal;
}

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

.desktop-nav a,
.mobile-nav a {
    color: #fee2e2;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: #fde68a;
}

.mobile-menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 42px;
    height: 42px;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid rgba(254, 202, 202, 0.18);
    background: rgba(69, 10, 10, 0.94);
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: #facc15;
    color: #450a0a;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 760px;
    padding: 70px 0 80px;
    background:
        radial-gradient(circle at 15% 18%, rgba(239, 68, 68, 0.28), transparent 34%),
        radial-gradient(circle at 84% 18%, rgba(250, 204, 21, 0.16), transparent 28%),
        linear-gradient(135deg, #1f0808 0%, #111827 48%, #1f0707 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, #0f1117);
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.55;
    pointer-events: none;
}

.hero-glow-one {
    width: 380px;
    height: 380px;
    left: -130px;
    top: 80px;
    background: rgba(220, 38, 38, 0.34);
}

.hero-glow-two {
    width: 280px;
    height: 280px;
    right: -70px;
    bottom: 150px;
    background: rgba(250, 204, 21, 0.18);
}

.hero-shell {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    align-items: stretch;
}

.hero-main,
.hero-side,
.content-section,
.page-hero,
.detail-wrap,
.site-footer {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.hero-main {
    width: auto;
}

.hero-heading {
    max-width: 740px;
    margin-bottom: 28px;
}

.eyebrow,
.hero-kicker,
.section-head span,
.panel-title,
.rank-head span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #facc15;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-heading h1 {
    margin: 10px 0 14px;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-heading p,
.page-hero p,
.section-head p,
.movie-card p,
.text-card p,
.category-overview-card p,
.category-card strong,
.detail-info .lead {
    color: #cbd5e1;
}

.hero-heading p {
    max-width: 680px;
    font-size: 18px;
}

.hero-slider {
    position: relative;
    min-height: 430px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 34px;
    overflow: hidden;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 44% 1fr;
    gap: 28px;
    padding: 34px;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

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

.hero-image,
.poster,
.detail-poster,
.player-box,
.mini-link-card img {
    background:
        radial-gradient(circle at 30% 20%, rgba(250, 204, 21, 0.16), transparent 32%),
        linear-gradient(135deg, #3f0d12, #111827 64%, #581c1c);
}

.hero-image {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    min-height: 360px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}

.hero-image img,
.poster img,
.detail-bg img,
.detail-poster img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-copy {
    align-self: center;
    padding-right: 12px;
}

.hero-copy h2 {
    margin: 12px 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
}

.hero-copy p {
    color: #e5e7eb;
    font-size: 16px;
    margin: 0 0 18px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(254, 202, 202, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fee2e2;
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.btn-primary {
    background: linear-gradient(135deg, #facc15, #ef4444);
    color: #450a0a;
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.28);
}

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

.hero-dots {
    position: absolute;
    left: 34px;
    bottom: 24px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 30px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #facc15;
}

.hero-side {
    width: auto;
    display: grid;
    gap: 16px;
}

.search-panel,
.hot-stack,
.rank-panel,
.side-card,
.text-card,
.filter-bar,
.category-overview-card a,
.category-card,
.movie-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(31, 41, 55, 0.74);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px);
}

.search-panel,
.hot-stack {
    padding: 18px;
    border-radius: 24px;
}

.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 46px;
    margin-top: 10px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 14px;
    outline: 0;
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    padding: 0 14px;
}

.quick-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quick-cats a,
.category-card {
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.88), rgba(31, 41, 55, 0.82));
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: #fee2e2;
    padding: 14px;
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.quick-cats a:hover,
.category-card:hover,
.movie-card:hover,
.category-overview-card a:hover {
    transform: translateY(-4px);
    border-color: rgba(250, 204, 21, 0.5);
}

.mini-link-card {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
    position: relative;
}

.mini-link-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(4px);
}

.mini-link-card img {
    width: 50px;
    height: 66px;
    object-fit: cover;
    border-radius: 12px;
}

.mini-link-card strong,
.mini-link-card em {
    display: block;
}

.mini-link-card strong {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.25;
}

.mini-link-card em {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
    font-style: normal;
}

.mini-rank {
    position: absolute;
    left: 5px;
    top: 5px;
    z-index: 2;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #facc15;
    color: #450a0a;
    font-size: 12px;
    font-weight: 900;
}

.content-section {
    padding: 56px 0;
}

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

.section-head h2,
.rank-head h2,
.page-hero h1,
.text-card h2,
.side-card h2 {
    margin: 6px 0 8px;
    line-height: 1.12;
}

.section-head h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 46px);
}

.section-head p {
    max-width: 760px;
    margin: 0;
}

.section-link,
.rank-head a,
.category-overview-card strong {
    color: #facc15;
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.poster img {
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.movie-card:hover .poster img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(250, 204, 21, 0.92);
    color: #450a0a;
    font-size: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #450a0a;
    background: #facc15;
    font-size: 14px;
    font-weight: 900;
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    color: #fca5a5;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.28;
}

.movie-card p {
    margin: 0 0 12px;
    font-size: 13px;
}

.tag-row span {
    min-height: 24px;
    padding: 2px 8px;
    color: #fecaca;
    font-size: 11px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.rank-panel {
    border-radius: 28px;
    padding: 20px;
}

.rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.rank-head h2 {
    color: #ffffff;
    font-size: 26px;
}

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

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

.category-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card span,
.category-overview-card span {
    color: #facc15;
    font-size: 13px;
    font-weight: 900;
}

.category-card strong {
    display: block;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
}

.page-hero {
    margin-top: 34px;
    padding: 56px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.34), transparent 34%),
        linear-gradient(135deg, rgba(127, 29, 29, 0.72), rgba(17, 24, 39, 0.96));
    border: 1px solid rgba(248, 113, 113, 0.22);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
}

.slim-hero {
    min-height: 260px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    color: #fecaca;
    font-size: 14px;
    font-weight: 700;
    margin-top: 18px;
}

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

.category-overview-card a {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border-radius: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-card h2 {
    margin: 12px 0;
}

.filter-bar {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 24px;
}

.filter-bar label span {
    color: #fecaca;
    font-size: 13px;
    font-weight: 800;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 36px;
    text-align: center;
    color: #cbd5e1;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    border-radius: 24px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.18;
    filter: blur(12px);
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0f1117 18%, rgba(15, 17, 23, 0.62), #0f1117 92%);
}

.detail-wrap {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.44);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.04;
}

.detail-info .lead {
    max-width: 840px;
    font-size: 19px;
}

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

.detail-section {
    padding-top: 36px;
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.watch-main {
    display: grid;
    gap: 20px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(248, 113, 113, 0.22);
}

.player-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    padding: 0;
    cursor: pointer;
    background:
        radial-gradient(circle at 50% 40%, rgba(250, 204, 21, 0.18), transparent 30%),
        rgba(0, 0, 0, 0.58);
}

.player-cover img {
    position: absolute;
    inset: 0;
    opacity: 0.46;
}

.player-cover span {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #facc15, #ef4444);
    color: #450a0a;
    font-size: 34px;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.45);
}

.player-box.is-playing .player-cover {
    display: none;
}

.text-card,
.side-card {
    border-radius: 24px;
    padding: 24px;
}

.text-card h2,
.side-card h2 {
    color: #ffffff;
    font-size: 24px;
}

.text-card p {
    margin: 0;
    font-size: 16px;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.side-card dt {
    color: #fca5a5;
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: #e5e7eb;
}

.sticky-rank {
    position: sticky;
    top: 92px;
    max-height: calc(100vh - 112px);
    overflow: auto;
}

.site-footer {
    margin-top: 40px;
    padding: 36px 0 28px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p,
.site-footer a {
    color: #94a3b8;
}

.site-footer h2 {
    color: #ffffff;
    font-size: 16px;
}

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

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

.copyright {
    margin-top: 28px;
    font-size: 13px;
}

.image-missing {
    opacity: 0;
}

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

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

    .hero-shell,
    .split-section,
    .watch-layout,
    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .hero-side {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero {
        min-height: auto;
        padding: 42px 0 56px;
    }

    .hero-slide {
        position: relative;
        display: none;
        grid-template-columns: 1fr;
        padding: 18px;
        min-height: auto;
    }

    .hero-slide.is-active {
        display: grid;
    }

    .hero-slider {
        min-height: auto;
    }

    .hero-image {
        min-height: 280px;
    }

    .hero-dots {
        position: static;
        padding: 0 18px 18px;
    }

    .hero-side,
    .quick-cats,
    .filter-bar,
    .detail-wrap,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 34px 22px;
    }

    .detail-wrap {
        gap: 22px;
    }

    .detail-poster {
        width: min(260px, 78vw);
    }
}

@media (max-width: 540px) {
    .header-inner,
    .hero-shell,
    .hero-main,
    .hero-side,
    .content-section,
    .page-hero,
    .detail-wrap,
    .site-footer {
        width: min(100% - 24px, 1280px);
    }

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

    .movie-grid,
    .catalog-grid,
    .compact-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: grid;
        gap: 12px;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        min-height: 178px;
    }

    .movie-card .poster {
        height: 100%;
    }

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

    .hero-heading h1,
    .detail-info h1 {
        letter-spacing: -0.03em;
    }
}
