:root {
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(30, 41, 59, 0.92);
    --border-soft: rgba(148, 163, 184, 0.18);
    --text-main: #ffffff;
    --text-soft: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --accent-warm: #f97316;
    --radius-large: 28px;
    --radius-medium: 20px;
    --radius-small: 12px;
    --shadow-deep: 0 24px 80px rgba(0, 0, 0, 0.35);
}

body {
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 36rem),
        var(--page-bg);
    color: var(--text-main);
}

img {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.65));
}

.site-header {
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(16px);
}

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

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

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #06111f;
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.32);
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--text-soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.13);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(320px, 28vw);
    padding: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.header-search input,
.large-search input,
.filter-bar input,
.search-page-panel input {
    width: 100%;
    background: transparent;
    outline: none;
    color: #ffffff;
}

.header-search button,
.large-search button {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    color: #06111f;
    font-weight: 700;
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--border-soft);
}

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

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

.home-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.hero-stage,
.hero-slide {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    display: none;
}

.hero-slide.is-active {
    display: block;
}

.hero-image,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08);
}

.hero-shade,
.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.32)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 44px;
    align-items: center;
    padding-top: 70px;
    padding-bottom: 76px;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.page-hero p,
.section-heading p,
.detail-kicker {
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 14px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    font-size: clamp(2.5rem, 7vw, 5.2rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.05em;
    margin-bottom: 24px;
}

.hero-description,
.page-hero span,
.detail-copy p {
    display: block;
    color: var(--text-soft);
    font-size: 1.08rem;
    line-height: 1.8;
    max-width: 720px;
}

.hero-tags,
.detail-tags,
.tag-row,
.rank-meta,
.quick-links,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.rank-meta span,
.quick-links a,
.filter-chips button {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #cffafe;
    background: rgba(8, 145, 178, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.18);
}

.hero-meta-line {
    color: var(--text-muted);
    margin-top: 18px;
}

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

.primary-button,
.secondary-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #06111f;
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.28);
}

.secondary-button,
.section-more {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border-soft);
}

.primary-button:hover,
.secondary-button:hover,
.section-more:hover,
.movie-card:hover,
.category-tile:hover,
.related-card:hover {
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-deep);
    aspect-ratio: 2 / 3;
}

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

.hero-card span,
.play-badge,
.related-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    color: #06111f;
    background: rgba(34, 211, 238, 0.94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border-soft);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    font-size: 1.6rem;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.search-panel,
.search-page-panel,
.filter-bar {
    margin-top: 28px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.large-search,
.search-page-panel label,
.filter-bar label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--panel-bg);
    box-shadow: var(--shadow-deep);
}

.filter-bar label,
.search-page-panel label {
    border-radius: var(--radius-medium);
}

.large-search input,
.filter-bar input,
.search-page-panel input {
    padding: 10px 12px;
    font-size: 1rem;
}

.filter-bar span,
.search-page-panel span {
    color: var(--text-muted);
    white-space: nowrap;
}

.quick-links {
    margin-top: 14px;
}

.content-section,
.detail-content {
    padding-top: 56px;
    padding-bottom: 32px;
}

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

.section-heading h2 {
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 8px;
}

.section-heading span {
    color: var(--text-muted);
}

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

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

.movie-card,
.category-tile,
.text-panel,
.related-card,
.ranking-row {
    border: 1px solid var(--border-soft);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.88));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card:hover,
.category-tile:hover,
.related-card:hover,
.ranking-row:hover {
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 70px rgba(8, 145, 178, 0.16);
}

.card-poster,
.related-poster,
.rank-poster {
    position: relative;
    display: block;
    overflow: hidden;
}

.card-poster {
    aspect-ratio: 2 / 3;
}

.card-poster img,
.related-poster img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .card-poster img,
.related-card:hover .related-poster img,
.ranking-row:hover .rank-poster img {
    transform: scale(1.06);
}

.play-badge {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
}

.year-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 10px;
}

.card-body h2 {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
}

.card-body p {
    color: var(--text-soft);
    font-size: 0.94rem;
    line-height: 1.65;
    min-height: 3.05rem;
}

.tag-row {
    margin-top: 14px;
    font-size: 0.8rem;
}

.compact-card .card-body p {
    min-height: 2.8rem;
}

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

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

.category-tile {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-medium);
}

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

.category-posters img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.category-tile strong {
    font-size: 1.2rem;
}

.category-tile span {
    color: var(--text-soft);
    line-height: 1.65;
}

.page-hero {
    padding-top: 86px;
    padding-bottom: 18px;
}

.page-hero h1 {
    margin-bottom: 16px;
}

.filter-chips {
    margin-top: 16px;
}

.filter-chips button {
    cursor: pointer;
}

.filter-chips button.is-active {
    color: #06111f;
    background: var(--accent);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-medium);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #06111f;
    font-weight: 900;
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
}

.rank-poster {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.rank-content h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.rank-content p {
    color: var(--text-soft);
    line-height: 1.65;
    margin-bottom: 10px;
}

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

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding-top: 92px;
    padding-bottom: 70px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-large);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow-deep);
}

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

.detail-copy .primary-button {
    margin-top: 28px;
}

.player-section {
    margin-top: -70px;
    position: relative;
    z-index: 4;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-large);
    border: 1px solid rgba(103, 232, 249, 0.22);
    background: #000000;
    box-shadow: var(--shadow-deep);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(0, 0, 0, 0.42));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #06111f;
    font-size: 2rem;
    background: linear-gradient(135deg, #22d3ee, #60a5fa);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

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

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

.text-panel {
    border-radius: var(--radius-medium);
    padding: 26px;
}

.text-panel h2 {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 14px;
}

.text-panel p {
    color: var(--text-soft);
    line-height: 1.9;
}

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

.related-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-medium);
}

.related-poster {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.related-card strong {
    display: block;
    line-height: 1.35;
    margin-bottom: 8px;
}

.related-card p {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 8px;
}

.related-card em {
    color: var(--accent);
    font-style: normal;
    font-size: 0.82rem;
}

.search-summary {
    margin-top: 16px;
    color: var(--text-muted);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

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

.footer-grid h2 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-grid a:not(.footer-logo) {
    display: block;
    color: var(--text-soft);
    margin-top: 8px;
}

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

[data-hidden="true"] {
    display: none !important;
}

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

    .header-search {
        display: none;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

    .hero-content {
        min-height: 680px;
        padding-top: 46px;
    }

    .hero-card {
        max-width: 260px;
    }

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

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

    .ranking-row {
        grid-template-columns: 46px 74px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }
}

@media (max-width: 560px) {
    .home-hero,
    .hero-stage,
    .hero-slide {
        min-height: 720px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 2.35rem;
    }

    .movie-grid,
    .compact-grid,
    .category-grid,
    .large-category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .large-search,
    .search-page-panel label,
    .filter-bar label {
        align-items: stretch;
        flex-direction: column;
        border-radius: var(--radius-medium);
    }

    .related-card {
        grid-template-columns: 82px minmax(0, 1fr);
    }

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