:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.82);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --amber: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% -10%, rgba(245, 158, 11, 0.20), transparent 34%),
        radial-gradient(circle at 85% 0%, rgba(239, 68, 68, 0.15), transparent 30%),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.brand-text,
.footer-brand {
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.10);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.80);
    border-radius: 14px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 12px 16px;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    min-height: 680px;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    transform: scale(1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(0deg, #020617 0%, transparent 40%, rgba(2, 6, 23, 0.76) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    gap: 56px;
    align-items: center;
    padding: 96px 0 110px;
}

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

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy h1 {
    max-width: 860px;
    font-size: clamp(44px, 7vw, 92px);
}

.hero-copy p {
    max-width: 700px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-tags {
    margin-top: 22px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    color: #ffffff;
    font-weight: 900;
    border: 1px solid transparent;
    border-radius: 999px;
    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, var(--amber), var(--orange));
    box-shadow: 0 18px 45px rgba(249, 115, 22, 0.32);
}

.btn.ghost {
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.66);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::after,
.poster-frame::after,
.ranking-hero-card::after,
.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.78) 100%);
    pointer-events: none;
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.64);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 46px;
    height: 46px;
    font-size: 30px;
    border-radius: 50%;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 999px;
}

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

.section-block,
.page-main {
    padding: 58px 0;
}

.page-main {
    min-height: 72vh;
}

.section-heading,
.category-section-head,
.rank-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading h2,
.search-panel h2,
.rank-panel h2,
.category-section-head h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p,
.category-section-head p,
.page-hero p,
.search-panel p,
.footer-grid p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    flex: none;
    color: #fbbf24;
    font-weight: 900;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 188px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.category-tile::before,
.ranking-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.30), rgba(245, 158, 11, 0.15));
}

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 2;
}

.category-tile span {
    color: #fbbf24;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 8px;
    font-size: 18px;
    line-height: 1.45;
}

.search-panel {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
}

.search-controls {
    display: grid;
    gap: 14px;
}

.search-input {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
    border-radius: 16px;
    outline: none;
}

.search-input:focus {
    border-color: rgba(251, 191, 36, 0.72);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 36px;
    padding: 0 14px;
    color: #cbd5e1;
    font-weight: 800;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.38);
    border-radius: 999px;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    border-color: rgba(245, 158, 11, 0.54);
    background: rgba(245, 158, 11, 0.20);
}

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

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

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

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

.movie-card[hidden] {
    display: none;
}

.movie-card-link {
    display: grid;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.38);
}

.poster-frame {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: #0f172a;
}

.poster-frame img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 999px;
}

.movie-card-body {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 16px;
}

.movie-card-body h3 {
    margin: 0;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.4;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-meta,
.movie-line,
.detail-line {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.movie-meta {
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.movie-line {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    color: #fde68a;
    font-size: 12px;
    font-weight: 800;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
}

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

.rank-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.sticky-rank {
    position: sticky;
    top: 96px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 40px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 16px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.20);
}

.rank-num {
    color: #fbbf24;
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-title {
    overflow: hidden;
    font-weight: 900;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-meta {
    grid-column: 3;
    margin-top: -22px;
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    margin-bottom: 34px;
    padding: 46px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(15, 23, 42, 0.86)),
        radial-gradient(circle at right top, rgba(249, 115, 22, 0.22), transparent 34%);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    font-size: clamp(38px, 5vw, 70px);
}

.category-overview {
    display: grid;
    gap: 26px;
}

.category-section-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
}

.ranking-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.ranking-hero-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.ranking-hero-card:first-child {
    min-height: 420px;
}

.ranking-hero-card span,
.ranking-hero-card h2,
.ranking-hero-card p {
    position: relative;
    z-index: 2;
}

.ranking-hero-card span {
    color: #fbbf24;
    font-weight: 900;
}

.ranking-hero-card h2 {
    margin: 12px 0 8px;
    font-size: 30px;
}

.ranking-hero-card p {
    margin: 0;
    color: #e2e8f0;
    line-height: 1.7;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 34px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.66));
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.detail-line {
    margin-top: 18px;
    font-size: 18px;
}

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

.detail-meta span {
    padding: 8px 12px;
    color: #e2e8f0;
    font-weight: 800;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.player-section {
    margin-bottom: 34px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.20);
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.45);
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    padding-left: 4px;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 50%;
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.45);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.content-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.70);
}

.content-card p {
    margin: 16px 0 0;
    color: #cbd5e1;
    line-height: 2;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.footer-links a {
    color: var(--muted);
}

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

.footer-bottom {
    padding: 18px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid var(--line);
}

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

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

    .hero-content,
    .split-layout,
    .detail-hero,
    .search-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-panel,
    .sticky-rank {
        position: static;
    }
}

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-carousel,
    .hero-slide {
        min-height: 720px;
    }

    .hero-content {
        padding: 70px 0 120px;
    }

    .hero-poster {
        display: none;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .section-heading,
    .category-section-head,
    .rank-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .compact-grid,
    .mini-grid,
    .ranking-hero-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ranking-hero-card:first-child,
    .ranking-hero-card {
        min-height: 260px;
    }

    .page-hero,
    .detail-hero,
    .search-panel {
        padding: 24px;
    }

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

@media (max-width: 520px) {
    .site-shell {
        width: min(100% - 22px, 1240px);
    }

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

    .category-grid,
    .movie-grid,
    .compact-grid,
    .mini-grid,
    .ranking-hero-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .page-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .detail-meta span {
        font-size: 13px;
    }
}
