:root {
    --bg: #0b1020;
    --bg-soft: #111827;
    --bg-page: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --white: #ffffff;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --yellow: #facc15;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg-page);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #111827 0%, #1f2937 45%, #111827 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(16px);
}

.site-nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

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

.nav-link {
    color: #d1d5db;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link-sub {
    font-size: 13px;
    color: #9ca3af;
}

.menu-button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    cursor: pointer;
}

.menu-button span {
    display: block;
    height: 2px;
    border-radius: 4px;
    background: var(--white);
}

.hero {
    position: relative;
    min-height: 620px;
    color: var(--white);
    overflow: hidden;
    background: var(--bg);
}

.hero-slider,
.hero-slide,
.hero-bg,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-bg {
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: saturate(1.08);
}

.hero-shade,
.detail-shade {
    background:
        radial-gradient(circle at 78% 28%, rgba(249, 115, 22, 0.34), transparent 26%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 54px;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    animation: fadeInUp 0.6s ease both;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fb923c;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc,
.detail-one-line,
.page-hero p {
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    max-width: 740px;
}

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

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid rgba(251, 146, 60, 0.4);
    font-size: 12px;
    font-weight: 700;
}

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

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

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 28px rgba(249, 115, 22, 0.28);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.btn-small {
    min-height: 40px;
    padding: 0 18px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster {
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: rotate(1.5deg);
    transition: transform 0.3s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.02);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #1f2937, #0f172a);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

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

.home-search {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.home-search-inner {
    display: grid;
    grid-template-columns: 0.7fr 1fr;
    gap: 30px;
    align-items: center;
    padding: 28px;
    border-radius: 26px;
    color: var(--white);
    background: linear-gradient(135deg, #111827, #1f2937);
    box-shadow: var(--shadow);
}

.home-search h2,
.home-search p {
    margin: 0;
}

.home-search p {
    color: #cbd5e1;
}

.section-block {
    padding: 72px 0;
}

.section-muted {
    background: #f1f5f9;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-more {
    color: var(--orange-dark);
    font-weight: 900;
}

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

.category-card,
.category-panel {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border-radius: var(--radius);
    color: var(--white);
    box-shadow: var(--shadow);
}

.category-card::after,
.category-panel::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -36px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

.category-card span,
.category-panel h2 {
    display: block;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 900;
}

.category-card strong,
.category-panel p {
    display: block;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
    font-weight: 600;
}

.category-card em {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    font-style: normal;
    font-size: 13px;
}

.category-card em a {
    color: rgba(255, 255, 255, 0.9);
}

.tone-orange { background: linear-gradient(135deg, #f97316, #ef4444); }
.tone-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.tone-purple { background: linear-gradient(135deg, #7c3aed, #db2777); }
.tone-rose { background: linear-gradient(135deg, #e11d48, #fb7185); }
.tone-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.tone-amber { background: linear-gradient(135deg, #d97706, #f59e0b); }
.tone-cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.tone-indigo { background: linear-gradient(135deg, #4f46e5, #8b5cf6); }
.tone-pink { background: linear-gradient(135deg, #db2777, #f472b6); }
.tone-green { background: linear-gradient(135deg, #16a34a, #65a30d); }

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937, #0f172a);
}

.card-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.06);
    opacity: 0.82;
}

.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    opacity: 0;
    background: rgba(249, 115, 22, 0.42);
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-overlay {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 8px;
    color: var(--white);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.card-body {
    padding: 15px;
}

.card-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #111827;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: var(--orange-dark);
}

.card-desc {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    margin: 9px 0 12px;
    color: var(--muted);
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
}

.card-meta a {
    color: var(--orange-dark);
    font-weight: 800;
}

.card-tags .tag-pill {
    min-height: 24px;
    color: #9a3412;
    background: #ffedd5;
    border-color: #fed7aa;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 82px 1fr 96px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-num {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 12px;
}

.rank-thumb img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-title {
    font-size: 18px;
    font-weight: 900;
}

.rank-content p {
    margin: 6px 0;
    color: var(--muted);
    font-size: 14px;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: #64748b;
    font-size: 12px;
}

.rank-meta a {
    color: var(--orange-dark);
    font-weight: 800;
}

.rank-score {
    text-align: right;
}

.rank-score strong {
    display: block;
    color: var(--orange-dark);
    font-size: 26px;
    line-height: 1;
}

.rank-score span {
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    position: relative;
    color: var(--white);
    background:
        radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.45), transparent 24%),
        linear-gradient(135deg, #111827, #0f172a 70%);
}

.page-hero-compact {
    padding: 86px 0 78px;
}

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

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

.category-panel {
    min-height: auto;
}

.category-panel ul {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 20px 0;
    list-style: none;
}

.category-panel li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.category-panel li span {
    color: rgba(255, 255, 255, 0.65);
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
}

.search-box input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.search-box button {
    min-width: 104px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
    cursor: pointer;
}

.quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-filters button {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #9a3412;
    background: #fff7ed;
    font-weight: 800;
    cursor: pointer;
}

.detail-hero {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    color: var(--white);
    background: var(--bg);
}

.detail-bg,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-bg {
    background-size: cover;
    background-position: center;
    filter: blur(2px) saturate(1.08);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    min-height: 580px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #1f2937, #0f172a);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #cbd5e1;
    font-size: 13px;
}

.breadcrumb a {
    color: #fed7aa;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
    align-content: start;
}

.player-card,
.content-card,
.side-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.player-card {
    padding: 12px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #020617;
}

.main-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: rgba(2, 6, 23, 0.38);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding-left: 5px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.35);
    font-size: 30px;
}

.play-overlay strong {
    font-size: 18px;
}

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

.content-card,
.side-card {
    padding: 26px;
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 12px;
    color: #334155;
}

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

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

.side-card dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
}

.side-card a {
    color: var(--orange-dark);
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    padding: 44px 0;
}

.footer-inner {
    display: grid;
    gap: 22px;
}

.footer-inner p {
    margin: 8px 0 0;
}

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

.footer-links a {
    color: #e5e7eb;
    font-size: 14px;
}

.footer-copy {
    color: #94a3b8;
    font-size: 13px;
}

.is-filter-hidden {
    display: none !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .nav-link-sub {
        display: none;
    }
}

@media (max-width: 900px) {
    .menu-button {
        display: flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        border-radius: 18px;
        background: #111827;
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

    .nav-link-sub {
        display: inline-flex;
    }

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

    .hero-content {
        padding: 64px 0 92px;
    }

    .hero-poster {
        justify-self: start;
        width: min(260px, 72vw);
    }

    .detail-cover {
        width: min(260px, 76vw);
    }

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

    .rank-row {
        grid-template-columns: 44px 70px 1fr;
    }

    .rank-score {
        grid-column: 3;
        text-align: left;
    }
}

@media (max-width: 560px) {
    .container-custom {
        width: min(100% - 22px, 1180px);
    }

    .hero,
    .hero-content,
    .detail-hero,
    .detail-hero-inner {
        min-height: auto;
    }

    .hero h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 36px;
    }

    .hero-desc,
    .detail-one-line,
    .page-hero p {
        font-size: 16px;
    }

    .section-block {
        padding: 46px 0;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        min-height: 46px;
    }

    .rank-row {
        grid-template-columns: 42px 64px 1fr;
        gap: 10px;
    }

    .rank-title {
        font-size: 16px;
    }
}
