:root {
    --bg: #050816;
    --panel: rgba(17, 24, 39, 0.82);
    --panel-solid: #111827;
    --panel-soft: rgba(31, 41, 55, 0.72);
    --text: #f9fafb;
    --muted: #a6adbb;
    --line: rgba(148, 163, 184, 0.16);
    --blue: #3b82f6;
    --blue-soft: rgba(59, 130, 246, 0.22);
    --cyan: #22d3ee;
    --violet: #8b5cf6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 8%, rgba(59, 130, 246, 0.28), transparent 32rem),
        radial-gradient(circle at 90% 12%, rgba(139, 92, 246, 0.22), transparent 30rem),
        linear-gradient(180deg, #050816 0%, #0b1020 42%, #050816 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(5, 8, 22, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    border-color: var(--line);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    box-shadow: 0 14px 32px rgba(59, 130, 246, 0.34);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: 0.03em;
}

.brand-text em {
    margin-top: 5px;
    font-size: 12px;
    font-style: normal;
    color: var(--muted);
}

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

.nav-link,
.nav-menu-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #d7dce7;
    transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-menu-link:hover,
.nav-link.active {
    color: white;
    background: rgba(59, 130, 246, 0.18);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-button {
    border: 0;
    cursor: pointer;
}

.nav-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(10, 15, 31, 0.94);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.72);
    color: white;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(5, 8, 22, 0.94);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: #d7dce7;
    background: rgba(31, 41, 55, 0.58);
}

.main-offset {
    padding-top: 104px;
}

.hero {
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 100vh;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.85s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 76% 34%, rgba(59, 130, 246, 0.26), transparent 26rem),
        linear-gradient(90deg, rgba(5, 8, 22, 0.98) 0%, rgba(5, 8, 22, 0.72) 42%, rgba(5, 8, 22, 0.24) 100%),
        linear-gradient(0deg, #050816 0%, transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    padding-top: 124px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    backdrop-filter: blur(16px);
}

.hero h1 {
    max-width: 780px;
    margin: 22px 0 16px;
    font-size: clamp(42px, 8vw, 88px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

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

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

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

.hero-tags span,
.card-tags span,
.detail-tags span {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.62);
}

.hero-tags span,
.detail-tags span {
    padding: 8px 12px;
}

.card-tags span {
    padding: 5px 9px;
    font-size: 12px;
}

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

.primary-button,
.ghost-button,
.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--blue), var(--violet));
    color: white;
    box-shadow: 0 18px 42px rgba(59, 130, 246, 0.32);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    background: rgba(15, 23, 42, 0.56);
    backdrop-filter: blur(16px);
}

.small-button {
    min-height: 38px;
    padding: 0 14px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.15);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: white;
    background: rgba(0, 0, 0, 0.38);
    cursor: pointer;
    font-size: 40px;
    line-height: 1;
    transition: background 0.22s ease, transform 0.22s ease;
}

.hero-arrow:hover {
    background: rgba(59, 130, 246, 0.58);
    transform: translateY(-2px);
}

.hero-arrow.prev {
    left: 32px;
}

.hero-arrow.next {
    right: 32px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.22s ease, background 0.22s ease;
}

.hero-dot.active {
    width: 34px;
    background: white;
}

.content-section,
.detail-wrap,
.page-hero,
.category-wrap {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 76px 0 10px;
}

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

.section-heading h2,
.page-heading h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p,
.detail-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.82), rgba(15, 23, 42, 0.66));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, 0.46);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.76) 100%);
}

.play-mark {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: rgba(59, 130, 246, 0.86);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.score-mark {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: 800;
    color: #fef3c7;
    background: rgba(0, 0, 0, 0.62);
}

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

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

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

.movie-card p {
    min-height: 48px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: #93c5fd;
    font-size: 13px;
}

.scroll-band {
    width: 100%;
    margin-top: 74px;
    padding: 56px max(16px, calc((100% - 1200px) / 2));
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.95), rgba(30, 41, 59, 0.78), rgba(17, 24, 39, 0.95));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 300px;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x proximity;
}

.compact-card {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.68);
    scroll-snap-align: start;
}

.compact-card img {
    width: 84px;
    height: 112px;
    object-fit: cover;
    border-radius: 12px;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    line-height: 1.35;
}

.compact-card em {
    margin-top: 8px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.category-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.2), transparent 52%),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.46);
}

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

.category-card span {
    color: var(--muted);
    line-height: 1.65;
}

.page-hero {
    padding-top: 130px;
    padding-bottom: 28px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
    margin: 28px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.7);
}

.filter-panel label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 13px;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    outline: none;
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(59, 130, 246, 0.62);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 96px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-index {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-weight: 900;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--violet));
}

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

.rank-item h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.detail-wrap {
    padding-top: 120px;
}

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

.breadcrumb a:hover {
    color: #93c5fd;
}

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

.player-card,
.detail-side,
.text-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 45%, rgba(59, 130, 246, 0.16), rgba(0, 0, 0, 0.66));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 146px;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--blue), var(--violet));
    box-shadow: 0 18px 50px rgba(59, 130, 246, 0.38);
    cursor: pointer;
    font-weight: 800;
}

.player-info {
    padding: 20px;
}

.player-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

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

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.detail-meta span {
    padding: 12px;
    border-radius: 14px;
    color: var(--muted);
    background: rgba(31, 41, 55, 0.58);
}

.detail-meta strong {
    display: block;
    color: white;
    margin-bottom: 4px;
}

.detail-title {
    margin: 30px 0 26px;
}

.text-panel {
    padding: 28px;
    margin-top: 20px;
}

.text-panel h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

.text-panel p {
    margin: 0;
    color: #d9dfeb;
    line-height: 1.95;
}

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

.site-footer {
    margin-top: 88px;
    border-top: 1px solid var(--line);
    background: rgba(5, 8, 22, 0.86);
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-grid p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 16px;
}

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

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

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

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: #7b8496;
    text-align: center;
}

.hidden-card {
    display: none !important;
}

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

    .mobile-toggle {
        display: block;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 18px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 68px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text em {
        display: none;
    }

    .hero-content {
        padding-top: 98px;
        padding-bottom: 90px;
    }

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

    .hero p {
        font-size: 15px;
    }

    .content-section {
        padding-top: 54px;
    }

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

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

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

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

    .rank-item .small-button {
        grid-column: 2 / -1;
    }

    .rank-index {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

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

    .detail-side {
        display: block;
    }

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

@media (max-width: 520px) {
    .movie-grid,
    .related-grid,
    .category-cards {
        grid-template-columns: 1fr;
    }

    .horizontal-row {
        grid-auto-columns: 86%;
    }

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