:root {
    color-scheme: dark;
    --bg: #050607;
    --panel: #0d0f12;
    --panel-soft: #1a1d23;
    --panel-line: #212529;
    --text: #ffffff;
    --muted: #adb5bd;
    --muted-dark: #6c757d;
    --brand: #e63946;
    --brand-2: #ff4d4d;
    --gold: #f4c430;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --glow: 0 0 28px rgba(230, 57, 70, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 18% 6%, rgba(230, 57, 70, 0.12), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(255, 77, 77, 0.08), transparent 28%),
        linear-gradient(180deg, #050607 0%, #0d0f12 40%, #050607 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 15, 18, 0.92);
    backdrop-filter: blur(16px);
}

.nav-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e63946, #8b111a);
    box-shadow: var(--glow);
}

.logo-mark svg {
    width: 22px;
    height: 22px;
}

.logo-text {
    font-size: 20px;
    white-space: nowrap;
}

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

.nav-links a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #c9d0d8;
    font-weight: 600;
    transition: all 0.24s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.nav-links a.active,
.mobile-panel a.active {
    color: #fff;
    background: rgba(230, 57, 70, 0.22);
    box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.24);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: #1a1d23;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.container-custom {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.hero {
    position: relative;
    height: min(760px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #050607;
}

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

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

.hero-media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(5, 6, 7, 0.95), rgba(5, 6, 7, 0.48) 48%, rgba(5, 6, 7, 0.86)),
        radial-gradient(circle at 75% 35%, rgba(230, 57, 70, 0.28), transparent 32%);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    filter: saturate(1.08) contrast(1.08);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: inherit;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0 0 74px;
}

.hero-copy {
    max-width: 760px;
    animation: slideUp 0.72s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(230, 57, 70, 0.36);
    border-radius: 999px;
    background: rgba(230, 57, 70, 0.18);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 42px rgba(0, 0, 0, 0.6);
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #e9ecef;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.btn-primary,
.btn-ghost,
.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 800;
}

.btn-primary {
    min-height: 48px;
    padding: 13px 22px;
    border-radius: 13px;
    background: linear-gradient(135deg, #e63946, #a4161f);
    color: #fff;
    box-shadow: var(--glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(230, 57, 70, 0.42);
}

.btn-ghost {
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
}

.btn-small {
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(230, 57, 70, 0.18);
    color: #fff;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.24s ease;
}

.hero-control:hover {
    background: rgba(230, 57, 70, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: all 0.24s ease;
}

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

.quick-search {
    margin-top: -34px;
    position: relative;
    z-index: 10;
}

.search-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(230, 57, 70, 0.18);
    border-radius: 22px;
    background: rgba(13, 15, 18, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-shell input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(5, 6, 7, 0.75);
    color: #fff;
    outline: none;
    padding: 0 14px;
    font-size: 15px;
}

.search-shell input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(230, 57, 70, 0.72);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.16);
}

.section {
    padding: 58px 0;
}

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

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted-dark);
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(26, 29, 35, 0.96), rgba(13, 15, 18, 0.96)),
        radial-gradient(circle at 70% 10%, rgba(230, 57, 70, 0.12), transparent 34%);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(230, 57, 70, 0.38);
    box-shadow: var(--shadow), var(--glow);
}

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

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.22), rgba(5, 6, 7, 0.8)),
        radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.12), transparent 30%);
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

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

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

.badge-row {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.badge,
.rating-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(5, 6, 7, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.rating-badge {
    color: var(--gold);
}

.movie-body {
    padding: 16px;
}

.movie-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    color: var(--muted-dark);
    font-size: 13px;
}

.movie-desc {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #d7dde4;
    font-size: 12px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.horizontal-card .poster {
    aspect-ratio: 16 / 10;
    min-height: 100%;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    min-height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 24px;
    background:
        radial-gradient(circle at 80% 0%, rgba(230, 57, 70, 0.22), transparent 30%),
        linear-gradient(145deg, #1a1d23, #0d0f12);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
    transition: all 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(230, 57, 70, 0.38);
    box-shadow: var(--shadow), var(--glow);
}

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

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.8;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 52px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    background:
        radial-gradient(circle at 20% 0%, rgba(230, 57, 70, 0.2), transparent 30%),
        linear-gradient(180deg, rgba(26, 29, 35, 0.72), rgba(5, 6, 7, 0));
}

.page-hero h1 {
    max-width: 900px;
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 17px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(120px, 180px));
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 22px;
    background: rgba(13, 15, 18, 0.8);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 120px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    background: rgba(26, 29, 35, 0.72);
    transition: all 0.24s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(230, 57, 70, 0.38);
}

.rank-num {
    font-size: 30px;
    font-weight: 950;
    color: rgba(230, 57, 70, 0.9);
    text-align: center;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(230, 57, 70, 0.16);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

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

.breadcrumb {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    color: var(--muted-dark);
    font-size: 14px;
}

.breadcrumb a {
    color: #d7dde4;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.2)),
        radial-gradient(circle, rgba(230, 57, 70, 0.22), transparent 40%);
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.player-shell.playing .player-overlay {
    opacity: 0;
}

.play-trigger {
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e63946, #9d1720);
    color: #fff;
    box-shadow: 0 0 38px rgba(230, 57, 70, 0.5);
    cursor: pointer;
    pointer-events: auto;
}

.play-trigger svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.detail-panel {
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 24px;
    background: rgba(13, 15, 18, 0.78);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.detail-poster {
    aspect-ratio: 16 / 10;
    background: rgba(230, 57, 70, 0.14);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-meta {
    padding: 20px;
}

.meta-table {
    display: grid;
    gap: 11px;
    margin-top: 14px;
}

.meta-row {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.meta-row strong {
    color: #fff;
}

.article-card {
    margin-top: 28px;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 24px;
    background: rgba(13, 15, 18, 0.78);
}

.article-card h2 {
    margin: 0 0 14px;
    font-size: 25px;
    font-weight: 900;
}

.article-card p {
    margin: 0 0 16px;
    color: #d7dde4;
    line-height: 1.9;
}

.site-footer {
    margin-top: 72px;
    padding: 34px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    color: var(--muted-dark);
    background: rgba(5, 6, 7, 0.72);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .hero {
        height: auto;
        min-height: 590px;
    }

    .hero-content {
        align-items: flex-end;
        padding: 120px 0 78px;
    }

    .hero-control {
        display: none;
    }

    .search-shell {
        grid-template-columns: 1fr;
    }

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

    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 54px 92px 1fr;
    }

    .rank-item .btn-small {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .nav-inner,
    .container-custom,
    .mobile-panel {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero h1,
    .page-hero h1 {
        letter-spacing: -0.02em;
    }

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

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

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

    .rank-thumb {
        display: none;
    }

    .rank-item .btn-small {
        grid-column: 2;
    }

    .footer-inner {
        display: grid;
    }
}
