:root {
    --color-primary: 14, 165, 233;
    --color-primary-dark: 3, 105, 161;
    --color-secondary: 34, 197, 94;
    --color-accent: 251, 146, 60;
    --color-background: 15, 23, 42;
    --color-surface: 30, 41, 59;
    --color-surface-light: 51, 65, 85;
    --color-text: 248, 250, 252;
    --color-muted: 148, 163, 184;
    --shadow-card: 0 24px 55px rgba(0, 0, 0, 0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: rgb(var(--color-background));
    color: rgb(var(--color-text));
    line-height: 1.6;
}

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;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    backdrop-filter: blur(14px);
}

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

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

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, rgb(251, 191, 36), rgb(249, 115, 22));
    box-shadow: 0 0 28px rgba(251, 146, 60, 0.35);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, rgb(251, 191, 36), rgb(249, 115, 22));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: rgb(203, 213, 225);
    font-weight: 600;
    transition: color 0.25s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.95);
    color: #fff;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 99px;
}

.mobile-menu {
    display: none;
    padding: 8px 20px 18px;
    border-top: 1px solid rgba(51, 65, 85, 0.7);
}

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 8px;
    color: rgb(203, 213, 225);
    border-radius: 10px;
}

.mobile-link:hover {
    background: rgba(51, 65, 85, 0.72);
    color: #fff;
}

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(14, 165, 233, 0.32), transparent 34%),
        linear-gradient(to top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.12));
}

.hero-content {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 72vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 90px 0 84px;
}

.hero-kicker,
.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-kicker span,
.detail-meta span,
.card-meta span,
.rank-meta span {
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.82);
    color: rgb(226, 232, 240);
    padding: 5px 12px;
    font-size: 13px;
}

.hero-kicker span:first-child {
    background: rgb(var(--color-primary));
    color: #fff;
}

.hero h1 {
    max-width: 780px;
    margin: 18px 0 14px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    font-weight: 900;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.hero p {
    max-width: 720px;
    margin: 0 0 32px;
    color: rgb(226, 232, 240);
    font-size: 18px;
}

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

.primary-btn,
.ghost-btn,
.text-btn,
.search-form button,
.toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-btn,
.search-form button {
    padding: 13px 26px;
    color: #fff;
    background: rgb(var(--color-primary));
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.24);
}

.primary-btn:hover,
.search-form button:hover {
    background: rgb(var(--color-primary-dark));
    transform: translateY(-2px);
}

.ghost-btn {
    padding: 12px 22px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 44px;
    display: flex;
    gap: 10px;
    z-index: 3;
}

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

.hero-dot.active {
    width: 34px;
    background: rgb(var(--color-primary));
}

.quick-search,
.content-section,
.page-title,
.detail-layout,
.watch-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    align-items: center;
    gap: 22px;
    margin-top: -46px;
    position: relative;
    z-index: 5;
    padding: 28px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: var(--radius-xl);
    background: rgba(30, 41, 59, 0.92);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(16px);
}

.quick-search h2,
.section-head h2,
.page-title h1,
.detail-content h2,
.detail-side h2 {
    margin: 0;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.quick-search h2,
.section-head h2 {
    font-size: clamp(26px, 3vw, 38px);
}

.quick-search p,
.page-title p,
.category-panel p,
.footer-brand p {
    color: rgb(var(--color-muted));
}

.search-form,
.toolbar {
    display: flex;
    gap: 12px;
}

.search-form input,
.toolbar input {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(71, 85, 105, 0.95);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    color: #fff;
    background: rgba(15, 23, 42, 0.86);
}

.search-form input:focus,
.toolbar input:focus {
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.content-section {
    padding: 74px 0 0;
}

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

.section-eyebrow {
    margin: 0 0 8px;
    color: rgb(251, 191, 36);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-link,
.text-btn {
    color: rgb(125, 211, 252);
    font-weight: 800;
}

.section-link:hover,
.text-btn:hover {
    color: rgb(251, 191, 36);
}

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

.category-tile,
.category-panel,
.movie-card,
.rank-row,
.detail-content,
.detail-side {
    border: 1px solid rgba(51, 65, 85, 0.86);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: var(--radius-lg);
    isolation: isolate;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.2));
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-tile:hover img,
.movie-card:hover img,
.rank-row:hover img,
.category-panel:hover img {
    transform: scale(1.06);
}

.category-tile span {
    font-size: 21px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: rgb(203, 213, 225);
    font-size: 14px;
}

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

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

.large-grid {
    padding-bottom: 32px;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: var(--shadow-card);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgb(2, 6, 23);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.74), transparent 55%);
}

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

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgb(var(--color-primary));
    color: #fff;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.28);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.3;
}

.card-body h3 a:hover,
.rank-info h3 a:hover,
.category-panel h2 a:hover {
    color: rgb(251, 191, 36);
}

.card-body p,
.rank-info p {
    margin: 0;
    color: rgb(var(--color-muted));
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    border-radius: 999px;
    padding: 4px 9px;
    color: rgb(203, 213, 225);
    background: rgba(51, 65, 85, 0.75);
    font-size: 12px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 132px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: transform 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    background: rgba(51, 65, 85, 0.75);
}

.rank-num {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, rgb(251, 191, 36), rgb(14, 165, 233));
    font-weight: 900;
}

.rank-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
}

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

.rank-info h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.rank-meta {
    margin-top: 8px;
}

.page-title {
    padding: 68px 0 28px;
}

.page-title h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.page-title p {
    max-width: 820px;
    margin: 14px 0 0;
    font-size: 17px;
}

.category-panels {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 42px;
    display: grid;
    gap: 22px;
}

.category-panel {
    display: grid;
    grid-template-columns: 320px 1fr;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.category-panel-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

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

.category-panel-body {
    padding: 26px;
}

.category-panel h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.category-samples a {
    color: rgb(203, 213, 225);
    border: 1px solid rgba(71, 85, 105, 0.88);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
}

.category-samples a:hover {
    color: #fff;
    border-color: rgba(14, 165, 233, 0.8);
}

.channel-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: end;
}

.channel-links,
.side-links {
    display: grid;
    gap: 10px;
}

.channel-links a,
.side-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgb(203, 213, 225);
    background: rgba(30, 41, 59, 0.72);
}

.channel-links a:hover,
.side-links a:hover {
    color: #fff;
    background: rgba(51, 65, 85, 0.86);
}

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

.toolbar input {
    flex: 1 1 320px;
}

.toolbar button {
    min-height: 48px;
    padding: 0 18px;
    color: rgb(203, 213, 225);
    background: rgba(30, 41, 59, 0.88);
}

.toolbar button.active,
.toolbar button:hover {
    color: #fff;
    background: rgb(var(--color-primary));
}

.search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 40px;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 170px 1fr;
}

.movie-card-wide .poster-link {
    aspect-ratio: auto;
    min-height: 150px;
}

.detail-hero {
    position: relative;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(240px, 330px) minmax(0, 760px);
    align-items: end;
    gap: 36px;
    padding: 120px max(16px, calc((100vw - 1180px) / 2)) 56px;
    overflow: hidden;
    background: #020617;
    isolation: isolate;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 24% 28%, rgba(14, 165, 233, 0.28), transparent 32%),
        linear-gradient(to top, rgb(15, 23, 42), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.28));
}

.detail-bg {
    z-index: -2;
    opacity: 0.5;
    filter: blur(2px);
}

.detail-cover {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 16px;
    color: rgb(203, 213, 225);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: rgb(251, 191, 36);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1;
    font-weight: 900;
}

.detail-one-line {
    max-width: 760px;
    margin: 18px 0 20px;
    color: rgb(226, 232, 240);
    font-size: 18px;
}

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

.watch-section {
    padding: 44px 0 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: var(--radius-xl);
    background: #000;
    box-shadow: var(--shadow-card);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.22), rgba(0, 0, 0, 0.42));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-overlay span {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 6px;
    background: rgb(var(--color-primary));
    box-shadow: 0 20px 48px rgba(14, 165, 233, 0.42);
    font-size: 34px;
}

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

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

.detail-content,
.detail-side {
    border-radius: var(--radius-xl);
    padding: 28px;
}

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

.detail-content p {
    margin: 0 0 26px;
    color: rgb(203, 213, 225);
    font-size: 17px;
}

.side-links a em {
    color: rgb(148, 163, 184);
    font-style: normal;
}

.site-footer {
    margin-top: 90px;
    border-top: 1px solid rgba(51, 65, 85, 0.74);
    background: rgba(2, 6, 23, 0.36);
}

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

.footer-logo {
    margin-bottom: 14px;
    font-size: 19px;
}

.footer-block h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

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

.footer-links a {
    color: rgb(148, 163, 184);
}

.footer-links a:hover {
    color: rgb(251, 191, 36);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(51, 65, 85, 0.62);
    color: rgb(100, 116, 139);
    text-align: center;
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

    .nav-toggle {
        display: block;
    }

    .quick-search,
    .channel-title,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .detail-hero {
        grid-template-columns: 180px 1fr;
        gap: 20px;
        padding-top: 88px;
    }
}

@media (max-width: 640px) {
    .hero,
    .hero-content {
        min-height: 660px;
    }

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

    .hero-dots {
        left: 16px;
        right: auto;
    }

    .quick-search {
        margin-top: -28px;
        padding: 22px;
    }

    .search-form,
    .toolbar {
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .compact-grid,
    .search-grid,
    .home-ranks {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        grid-template-columns: 1fr;
    }

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

    .rank-info p {
        display: none;
    }

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

    .detail-cover {
        width: min(240px, 78vw);
    }

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

    .play-overlay span {
        width: 72px;
        height: 72px;
        font-size: 26px;
    }
}
