:root {
    color-scheme: dark;
    --bg: #090b10;
    --bg-soft: #111827;
    --panel: rgba(17, 24, 39, 0.82);
    --panel-strong: rgba(31, 41, 55, 0.94);
    --line: rgba(255, 255, 255, 0.08);
    --text: #f9fafb;
    --muted: #9ca3af;
    --soft: #d1d5db;
    --brand: #f59e0b;
    --brand-2: #ea580c;
    --brand-3: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(234, 88, 12, 0.14), transparent 30rem),
        linear-gradient(180deg, #06070b 0%, #0b1018 48%, #090b10 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 11, 16, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #111827;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.25);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-link,
.mobile-link {
    color: var(--soft);
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link {
    padding: 10px 14px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand-3);
    background: rgba(245, 158, 11, 0.1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--brand-3);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.08);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 34px;
}

.hero-frame {
    position: relative;
    min-height: 620px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95), rgba(8, 13, 23, 0.95));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
    gap: 34px;
    align-items: center;
    padding: clamp(28px, 5vw, 70px);
    opacity: 0;
    transform: scale(1.015);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
    opacity: 0.38;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 7, 11, 0.95), rgba(6, 7, 11, 0.64) 45%, rgba(6, 7, 11, 0.22)),
        linear-gradient(180deg, rgba(6, 7, 11, 0.16), rgba(6, 7, 11, 0.92));
}

.hero-content,
.hero-poster-panel {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    color: var(--brand-3);
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.09);
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    max-width: 800px;
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    font-weight: 950;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.8;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
    font-weight: 900;
    box-shadow: 0 18px 34px rgba(234, 88, 12, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease;
}

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

.btn.ghost {
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
}

.hero-poster-panel {
    justify-self: center;
    width: min(100%, 320px);
}

.hero-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.hero-stats span {
    padding: 12px;
    border-radius: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    color: var(--soft);
    font-size: 12px;
}

.hero-stats strong {
    display: block;
    color: var(--brand-3);
    font-size: 16px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: clamp(28px, 5vw, 70px);
    bottom: 28px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 28px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 54px;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
}

.page-hero {
    padding: 56px 0 26px;
}

.page-hero-card {
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background:
        radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(31, 41, 55, 0.92), rgba(12, 17, 27, 0.96));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.05em;
    font-weight: 950;
}

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

main section {
    margin: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    color: var(--brand-3);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(31, 41, 55, 0.9);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    margin: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

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

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

.movie-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 40px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #111827;
    text-align: center;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card h3 {
    min-height: 42px;
    margin: 0 0 8px;
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 850;
}

.movie-meta {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 12px;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 4px 8px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 999px;
    color: var(--brand-3);
    background: rgba(245, 158, 11, 0.08);
    font-size: 11px;
    font-weight: 800;
}

.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.66);
}

.search-box {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 240px;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.25);
}

.search-box span {
    color: var(--brand-3);
    font-weight: 900;
}

.search-box input {
    width: 100%;
    height: 48px;
    outline: none;
    color: var(--text);
    background: transparent;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-buttons button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    font-weight: 800;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    color: #111827;
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
}

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

.category-card {
    display: block;
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 26px;
    background:
        radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.2), transparent 15rem),
        rgba(17, 24, 39, 0.74);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.42);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: var(--soft);
    line-height: 1.7;
}

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

.rank-list {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.78);
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.18s ease;
}

.rank-item:hover {
    background: rgba(245, 158, 11, 0.1);
}

.rank-num {
    color: var(--brand-3);
    font-weight: 950;
}

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

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

.rank-text strong {
    color: var(--text);
    font-size: 14px;
}

.rank-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

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

.breadcrumb a {
    color: var(--brand-3);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    background:
        linear-gradient(120deg, rgba(9, 11, 16, 0.9), rgba(17, 24, 39, 0.86)),
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.2), transparent 24rem);
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 950;
}

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

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    font-weight: 800;
}

.detail-info p {
    margin: 0 0 20px;
    color: var(--soft);
    line-height: 1.85;
    font-size: 16px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    color: #111827;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover::before {
    content: "▶";
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-3), var(--brand-2));
    box-shadow: 0 18px 45px rgba(234, 88, 12, 0.45);
    font-size: 34px;
    text-indent: 5px;
}

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

.content-panel {
    padding: clamp(22px, 4vw, 36px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    background: rgba(17, 24, 39, 0.76);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 28px;
    font-weight: 950;
}

.content-panel p {
    margin: 0 0 18px;
    color: var(--soft);
    line-height: 1.9;
}

.content-panel p:last-child {
    margin-bottom: 0;
}

.no-results {
    display: none;
    padding: 28px;
    border: 1px dashed rgba(245, 158, 11, 0.35);
    border-radius: 22px;
    color: var(--brand-3);
    text-align: center;
    background: rgba(245, 158, 11, 0.07);
    font-weight: 900;
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    margin-top: 80px;
    padding: 42px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.site-footer strong {
    color: var(--brand-3);
    font-size: 22px;
}

.site-footer p {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.06);
}

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

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

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

    .rank-list {
        position: static;
    }
}

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

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

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

    .hero-frame {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-poster-panel {
        width: min(70vw, 260px);
    }

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

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

    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

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

    .header-inner {
        min-height: 66px;
    }

    .brand {
        font-size: 19px;
    }

    .hero {
        padding-top: 22px;
    }

    .hero-frame {
        min-height: 710px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-dots {
        left: 24px;
        bottom: 20px;
    }

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

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

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

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

    .player-cover::before {
        width: 66px;
        height: 66px;
        font-size: 26px;
    }
}
