:root {
    --color-primary: 30 30 35;
    --color-secondary: 45 45 50;
    --color-accent: 70 130 180;
    --color-success: 46 125 50;
    --color-warning: 255 152 0;
    --color-error: 211 47 47;
    --color-text-primary: 240 240 245;
    --color-text-secondary: 180 180 190;
    --color-text-muted: 120 120 130;
    --color-bg-primary: 18 18 22;
    --color-bg-secondary: 25 25 30;
    --color-bg-tertiary: 35 35 40;
    --color-border: 50 50 60;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(70, 130, 180, 0.16), transparent 32rem),
        rgb(var(--color-bg-primary));
    color: rgb(var(--color-text-primary));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgb(var(--color-border));
    background: rgba(25, 25, 30, 0.94);
    backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgb(var(--color-accent)), rgba(255, 255, 255, 0.75));
    box-shadow: 0 16px 34px rgba(70, 130, 180, 0.28);
}

.brand-mark::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 9px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid rgb(18, 18, 22);
}

.brand-text,
.footer-brand {
    font-size: 20px;
    background: linear-gradient(90deg, rgb(var(--color-text-primary)), rgb(var(--color-accent)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    position: relative;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    border-radius: 2px;
    background: rgb(var(--color-accent));
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: rgb(var(--color-text-primary));
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgb(var(--color-bg-tertiary));
    color: rgb(var(--color-text-primary));
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: currentColor;
}

.hero-section {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 16px;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: rgb(var(--color-bg-secondary));
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.06)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(720px, 100%);
    padding: 0 56px 76px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    color: rgb(var(--color-accent));
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.04em;
    text-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgb(226, 232, 240);
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.8;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgb(235, 239, 245);
    font-size: 13px;
    backdrop-filter: blur(8px);
}

.hero-actions,
.section-heading,
.footer-inner,
.detail-meta {
    display: flex;
    align-items: center;
}

.hero-actions {
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn.primary {
    background: rgb(var(--color-accent));
    color: #fff;
    box-shadow: 0 16px 34px rgba(70, 130, 180, 0.32);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    backdrop-filter: blur(8px);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.46);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(6px);
}

.hero-carousel:hover .hero-arrow {
    opacity: 1;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

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

.section-heading {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.section-heading.compact {
    align-items: flex-end;
}

.section-heading h2,
.page-hero h1,
.detail-intro h1,
.detail-main h2,
.detail-side h2 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-link {
    color: rgb(var(--color-accent));
    font-weight: 800;
}

.search-band {
    padding-top: 24px;
    padding-bottom: 16px;
}

.search-box {
    position: relative;
    width: min(520px, 100%);
}

.search-input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgb(var(--color-border));
    border-radius: 16px;
    outline: 0;
    background: rgb(var(--color-bg-secondary));
    color: rgb(var(--color-text-primary));
}

.search-input:focus {
    border-color: rgb(var(--color-accent));
    box-shadow: 0 0 0 4px rgba(70, 130, 180, 0.12);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 430px;
    overflow: auto;
    border: 1px solid rgb(var(--color-border));
    border-radius: 18px;
    background: rgba(25, 25, 30, 0.98);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
}

.search-result {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-result:hover {
    background: rgb(var(--color-bg-tertiary));
}

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

.search-result strong,
.search-result em {
    display: block;
}

.search-result strong {
    margin-bottom: 6px;
}

.search-result em,
.search-empty {
    color: rgb(var(--color-text-secondary));
    font-size: 13px;
    font-style: normal;
}

.search-empty {
    padding: 18px;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgb(var(--color-bg-secondary));
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    background: rgb(var(--color-bg-tertiary));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.movie-link {
    display: block;
    height: 100%;
}

.movie-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    margin: 0;
    overflow: hidden;
    background: rgb(var(--color-bg-tertiary));
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 46%);
}

.type-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.type-chip {
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.56);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: rgb(var(--color-accent));
}

.movie-info {
    padding: 14px;
}

.movie-info h3 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 8px;
    overflow: hidden;
    color: rgb(var(--color-text-primary));
    font-size: 16px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-line,
.movie-tags {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: rgb(var(--color-text-muted));
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-tags {
    min-height: 20px;
    margin-top: 8px;
    color: rgb(var(--color-text-secondary));
    -webkit-line-clamp: 1;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    color: rgb(var(--color-text-secondary));
    font-size: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 26px;
}

.feature-panel,
.page-hero,
.detail-main,
.detail-side {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(70, 130, 180, 0.12), transparent),
        rgb(var(--color-bg-secondary));
}

.feature-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px;
    padding: 34px;
}

.feature-panel h2 {
    margin: 0 0 18px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
}

.feature-panel p,
.page-hero p,
.detail-line,
.detail-main p {
    color: rgb(var(--color-text-secondary));
    line-height: 1.78;
}

.feature-panel .btn {
    width: fit-content;
    margin-top: 22px;
}

.compact-grid,
.ranking-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.compact-card {
    position: relative;
    min-height: 168px;
    overflow: hidden;
    border-radius: 18px;
    background: rgb(var(--color-bg-secondary));
}

.compact-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.compact-card:hover img {
    transform: scale(1.08);
}

.compact-cover {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.compact-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgb(var(--color-accent));
    color: #fff;
    font-weight: 900;
}

.compact-body {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    z-index: 2;
}

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

.compact-body strong {
    margin-bottom: 4px;
    font-size: 16px;
}

.compact-body em {
    color: rgb(209, 213, 219);
    font-size: 13px;
    font-style: normal;
}

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

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

.category-card {
    display: grid;
    gap: 12px;
    min-height: 150px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(70, 130, 180, 0.14), transparent 62%),
        rgb(var(--color-bg-secondary));
    transition: transform 0.25s ease, background 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    background:
        linear-gradient(135deg, rgba(70, 130, 180, 0.22), transparent 62%),
        rgb(var(--color-bg-tertiary));
}

.category-card span {
    color: rgb(var(--color-text-primary));
    font-size: 22px;
    font-weight: 900;
}

.category-card strong {
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
    font-weight: 500;
    line-height: 1.72;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    gap: 24px;
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 42px;
}

.page-hero.small {
    align-items: end;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    width: min(1280px, calc(100% - 32px));
    margin: 36px auto 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: rgb(var(--color-bg-secondary));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.breadcrumb a:hover {
    color: rgb(var(--color-accent));
}

.detail-intro h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.detail-line {
    max-width: 840px;
    margin: 20px 0;
    font-size: 18px;
}

.detail-meta {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 10px;
    background: rgb(var(--color-bg-secondary));
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
}

.player-section {
    padding-top: 42px;
    padding-bottom: 18px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: #050505;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    width: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.24);
    transition: opacity 0.2s ease;
}

.movie-player.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.play-icon::after {
    content: "";
    position: absolute;
    left: 34px;
    top: 26px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 22px solid rgb(var(--color-bg-primary));
}

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

.detail-main,
.detail-side {
    padding: 28px;
}

.detail-main h2,
.detail-side h2 {
    margin-bottom: 16px;
    font-size: 26px;
}

.detail-main p + h2 {
    margin-top: 30px;
}

.detail-side dl,
.detail-side dt,
.detail-side dd {
    margin: 0;
}

.detail-side dl {
    display: grid;
    gap: 14px;
}

.detail-side dl div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-side dt {
    color: rgb(var(--color-text-muted));
}

.detail-side dd {
    color: rgb(var(--color-text-primary));
    text-align: right;
}

.site-footer {
    margin-top: 50px;
    border-top: 1px solid rgb(var(--color-border));
    background: rgb(var(--color-bg-secondary));
}

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

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
    color: rgb(var(--color-text-secondary));
}

.footer-links {
    display: flex;
    gap: 22px;
    color: rgb(var(--color-text-secondary));
    font-size: 14px;
}

.footer-links a:hover {
    color: rgb(var(--color-accent));
}

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

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

@media (max-width: 960px) {
    .hero-carousel {
        height: 520px;
    }

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

    .split-section,
    .page-hero,
    .detail-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(320px, 100%);
    }

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

@media (max-width: 760px) {
    .site-nav {
        width: min(100% - 24px, 1280px);
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        border: 1px solid rgb(var(--color-border));
        border-radius: 18px;
        background: rgba(25, 25, 30, 0.98);
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    }

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

    .nav-link {
        padding: 10px 12px;
        border-radius: 12px;
    }

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

    .nav-link.active,
    .nav-link:hover {
        background: rgb(var(--color-bg-tertiary));
    }

    .hero-section,
    .section-container,
    .page-hero,
    .detail-hero,
    .footer-inner {
        width: min(100% - 24px, 1280px);
    }

    .hero-carousel {
        height: 500px;
        border-radius: 20px;
    }

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

    .hero-actions,
    .section-heading,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

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

    .compact-grid,
    .ranking-list,
    .category-grid,
    .category-grid.large {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 26px;
    }

    .detail-intro h1 {
        font-size: 36px;
    }

    .detail-main,
    .detail-side {
        padding: 22px;
    }
}

@media (max-width: 460px) {
    .brand-text {
        font-size: 17px;
    }

    .hero-carousel {
        height: 470px;
    }

    .hero-content h1 {
        font-size: 34px;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 14px;
    }
}
