:root {
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.86);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --teal: #14b8a6;
    --teal-light: #2dd4bf;
    --cyan: #22d3ee;
    --orange: #f97316;
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 36rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.14), transparent 32rem),
        var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(20, 184, 166, 0.32);
}

.brand-name {
    font-size: 1.18rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ffffff;
    background: rgba(20, 184, 166, 0.16);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(320px, 28vw);
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.5);
}

.header-search input,
.mobile-search input,
.big-search input,
.search-line input,
.search-line select {
    width: 100%;
    min-height: 42px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.header-search input,
.mobile-search input {
    padding: 0 12px;
}

.header-search button,
.mobile-search button,
.big-search button,
.search-line button {
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    min-height: 38px;
    color: #ffffff;
    background: var(--teal);
    white-space: nowrap;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid var(--line);
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.62);
}

.hero-slider {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #020617;
}

.hero-slides {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-content {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 128px;
}

.hero-copy {
    width: min(680px, 100%);
    animation: fade-in 0.6s ease both;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--teal-light);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    color: #ffffff;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h1,
.hero-copy h2 {
    font-size: clamp(2.6rem, 6vw, 5.5rem);
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.62);
}

.hero-line,
.page-hero p,
.detail-line {
    margin-top: 20px;
    color: var(--soft);
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(45, 212, 191, 0.22);
    border-radius: 999px;
    color: #dffefa;
    background: rgba(20, 184, 166, 0.1);
    font-size: 0.78rem;
}

.hero-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 18px 45px rgba(20, 184, 166, 0.28);
}

.btn.secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.btn.ghost {
    color: var(--teal-light);
    border: 1px solid rgba(45, 212, 191, 0.32);
    background: rgba(20, 184, 166, 0.08);
}

.btn.full {
    width: 100%;
    margin-top: 20px;
}

.hero-thumbs {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.hero-dot {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-dot.active,
.hero-dot:hover {
    border-color: rgba(45, 212, 191, 0.65);
    background: rgba(20, 184, 166, 0.16);
}

.hero-dot img {
    width: 58px;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-dot span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.quick-search-panel,
.search-board,
.content-card,
.rank-panel,
.category-card,
.movie-card,
.player-frame,
.detail-poster {
    border: 1px solid var(--line);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
    margin-top: 34px;
    padding: 28px;
    border-radius: var(--radius-xl);
}

.quick-search-panel h2,
.section-title h2,
.rank-panel h2,
.content-card h2 {
    color: #ffffff;
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.quick-search-panel p {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.8;
}

.big-search {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.64);
}

.big-search input {
    padding: 0 16px;
}

.big-search button {
    min-width: 120px;
}

.section-block {
    margin-top: 64px;
}

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

.section-title a {
    color: var(--teal-light);
    font-weight: 800;
}

.compact-title {
    margin-bottom: 18px;
}

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

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

.category-card {
    position: relative;
    min-height: 190px;
    padding: 22px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -50px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.18);
    filter: blur(4px);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(45, 212, 191, 0.55);
    background: rgba(15, 23, 42, 0.96);
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--teal-light);
    background: rgba(20, 184, 166, 0.12);
}

.category-card strong {
    display: block;
    margin-top: 16px;
    color: #ffffff;
    font-size: 1.2rem;
}

.category-card p {
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.7;
}

.category-arrow {
    display: inline-flex;
    margin-top: 18px;
    color: var(--teal-light);
    font-weight: 800;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.category-samples span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

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

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

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

.score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.94);
    font-size: 0.78rem;
    font-weight: 900;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.88);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.movie-card-meta span {
    min-height: 24px;
    padding: 0 8px;
    color: var(--muted);
    border-color: rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.05);
}

.movie-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--teal-light);
}

.movie-card p {
    display: -webkit-box;
    min-height: 46px;
    margin-top: 10px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    min-height: 24px;
    color: var(--soft);
    font-size: 0.72rem;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--radius-xl);
}

.rank-list,
.rank-wide-list {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 54px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(45, 212, 191, 0.44);
    background: rgba(20, 184, 166, 0.08);
}

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

.rank-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: #ffffff;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-score {
    color: var(--orange);
    font-weight: 900;
}

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

.page-shell {
    padding-top: 48px;
    padding-bottom: 72px;
}

.page-hero {
    position: relative;
    margin-bottom: 34px;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.78)),
        rgba(15, 23, 42, 0.85);
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.13);
    filter: blur(10px);
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
}

.compact-page-hero {
    margin-bottom: 24px;
}

.search-board {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: var(--radius-lg);
}

.search-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
}

.search-line input,
.search-line select {
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.54);
}

.search-line select option {
    color: #0f172a;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.filter-chips button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(255, 255, 255, 0.05);
}

.filter-chips button.active,
.filter-chips button:hover {
    color: #ffffff;
    border-color: rgba(45, 212, 191, 0.55);
    background: rgba(20, 184, 166, 0.18);
}

.empty-state {
    display: none;
    margin: 34px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--muted);
    text-align: center;
    background: var(--panel-bg);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.detail-layout {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
    min-height: 520px;
    padding-top: 64px;
    padding-bottom: 58px;
}

.detail-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.detail-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(20, 184, 166, 0.9);
    transform: translate(-50%, -50%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--teal-light);
}

.detail-copy h1 {
    margin-top: 16px;
    font-size: clamp(2.1rem, 5vw, 4.8rem);
}

.detail-line {
    max-width: 820px;
}

.detail-meta {
    margin-top: 22px;
}

.detail-tags {
    margin-top: 16px;
}

.player-section {
    margin-top: -24px;
    position: relative;
    z-index: 2;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl);
    background: #000000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 32px;
    color: #ffffff;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.82)),
        rgba(2, 6, 23, 0.25);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin-bottom: 8px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    box-shadow: 0 18px 50px rgba(20, 184, 166, 0.35);
    font-size: 1.8rem;
}

.player-cover strong {
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    font-weight: 900;
}

.player-cover em {
    max-width: 720px;
    color: var(--soft);
    font-style: normal;
    line-height: 1.7;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 34px;
}

.content-card {
    padding: 26px;
    border-radius: var(--radius-lg);
}

.content-card p {
    margin-top: 16px;
    color: var(--soft);
    line-height: 2;
}

.site-footer {
    margin-top: 80px;
    padding: 42px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 30px;
}

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

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

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

.footer-links a:hover {
    color: var(--teal-light);
}

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

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

    .two-column-zone {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: relative;
        top: 0;
    }
}

@media (max-width: 860px) {
    .nav-menu,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    body.nav-open .mobile-panel {
        display: block;
    }

    .hero-slider,
    .hero-slides,
    .hero-content {
        min-height: 640px;
    }

    .hero-content {
        padding-bottom: 184px;
    }

    .hero-thumbs {
        grid-template-columns: 1fr;
        bottom: 18px;
    }

    .hero-dot:nth-child(n + 4) {
        display: none;
    }

    .quick-search-panel,
    .detail-content,
    .footer-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        align-items: start;
        padding-top: 34px;
    }

    .detail-poster {
        width: min(280px, 70vw);
    }

    .search-line,
    .rank-wide-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1280px);
    }

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

    .quick-search-panel,
    .page-hero,
    .search-board,
    .content-card,
    .rank-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .big-search {
        flex-direction: column;
        border-radius: 20px;
    }

    .big-search button {
        width: 100%;
    }

    .hero-actions,
    .page-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .movie-card p,
    .tag-row {
        display: none;
    }

    .player-cover {
        padding: 18px;
    }

    .player-play-icon {
        width: 58px;
        height: 58px;
    }
}
