:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #111827;
    --line: rgba(148, 163, 184, 0.2);
    --muted: #94a3b8;
    --text: #f8fafc;
    --red: #ef4444;
    --red-soft: rgba(239, 68, 68, 0.16);
    --orange: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.14), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.lock-scroll {
    overflow: hidden;
}

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

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

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

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
    font-size: 14px;
}

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

.nav-link {
    position: relative;
    color: #d1d5db;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
    transition: right 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #f87171;
}

.nav-link:hover::after,
.nav-link.active::after {
    right: 0;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.95);
}

.mobile-nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: #e5e7eb;
    font-weight: 600;
}

.mobile-nav a:hover {
    background: rgba(148, 163, 184, 0.12);
    color: #f87171;
}

main {
    padding-top: 64px;
}

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

.hero {
    position: relative;
    min-height: 76vh;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    min-height: 76vh;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s ease;
}

.hero-slide.active img {
    transform: scale(1);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.74) 44%, rgba(2, 6, 23, 0.24) 100%),
        linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 76vh;
    display: flex;
    align-items: center;
    padding: 80px 0 86px;
}

.hero-copy {
    width: min(650px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(248, 113, 113, 0.36);
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.hero p {
    width: min(620px, 100%);
    margin: 22px 0 0;
    color: #d1d5db;
    font-size: clamp(16px, 2.5vw, 20px);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(30, 41, 59, 0.88);
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 30px rgba(239, 68, 68, 0.24);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #dc2626, #ea580c);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--red);
}

.hero-arrow {
    position: absolute;
    z-index: 6;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-size: 22px;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-2px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.section {
    padding: 70px 0;
}

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

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

.section-heading h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-more {
    flex: 0 0 auto;
    color: #f87171;
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.35);
    box-shadow: 0 24px 55px rgba(239, 68, 68, 0.14);
}

.movie-poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.3s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 56%);
}

.poster-year,
.poster-play {
    position: absolute;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    background: rgba(239, 68, 68, 0.92);
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fca5a5;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card h3 a:hover {
    color: #f87171;
}

.movie-card p {
    margin: 8px 0 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.65;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1;
}

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

.category-card {
    min-height: 160px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(239, 68, 68, 0.25), transparent 40%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card strong {
    font-size: 22px;
    font-weight: 900;
}

.category-card span {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    margin: 28px 0 30px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.search-input,
.filter-select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    padding: 0 16px;
    outline: none;
}

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

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 28px;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 48px 70px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

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

.rank-no {
    color: #f87171;
    font-size: 22px;
    font-weight: 900;
}

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

.rank-info {
    min-width: 0;
}

.rank-info strong,
.rank-info em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info strong {
    font-size: 16px;
}

.rank-info em {
    margin-top: 6px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    padding: 96px 0 48px;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 28rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fca5a5;
    font-size: 14px;
    font-weight: 700;
}

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

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

.player-card,
.detail-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.48));
    cursor: pointer;
}

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

.play-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 20px 45px rgba(239, 68, 68, 0.3);
}

.play-circle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.detail-card {
    margin-top: 24px;
    padding: 26px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 900;
}

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

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.info-list span {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.44);
    color: #cbd5e1;
}

.info-list strong {
    color: #fff;
}

.side-card {
    padding: 18px;
}

.side-poster {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    margin-bottom: 16px;
}

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

.empty-tip {
    display: none;
    padding: 30px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: 20px;
    color: var(--muted);
}

.empty-tip.active {
    display: block;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.86);
    margin-top: 64px;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 12px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.45);
}

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

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

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

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

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

    .hero,
    .hero-content,
    .hero-slide img {
        min-height: 72vh;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 46px 0;
    }

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

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

    .footer-inner,
    .section-heading {
        display: block;
    }

    .section-more {
        display: inline-block;
        margin-top: 14px;
    }

    .footer-links {
        justify-content: flex-start;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .container,
    .header-inner,
    .footer-inner,
    .mobile-nav {
        width: min(100% - 22px, 1180px);
    }

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

    .movie-poster-link {
        aspect-ratio: 16 / 10;
    }

    .rank-item a {
        grid-template-columns: 38px 58px minmax(0, 1fr);
    }

    .rank-item img {
        width: 58px;
        height: 82px;
    }
}
