* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #020617;
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.24), transparent 34rem),
        radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.14), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #22d3ee);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
}

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

.desktop-nav a,
.mobile-panel a {
    padding: 9px 13px;
    border-radius: 999px;
    color: #cbd5e1;
    transition: 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.18);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 360px;
    width: 100%;
}

.header-search input,
.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    outline: none;
    transition: 0.25s ease;
}

.header-search input {
    padding: 9px 12px;
}

.header-search input:focus,
.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.header-search button,
.quick-search button,
.small-button,
.primary-button,
.secondary-button,
.ghost-button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    font-weight: 700;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}

.header-search button:hover,
.quick-search button:hover,
.small-button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, 0.32);
}

.secondary-button {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.ghost-button {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.34);
    box-shadow: none;
}

.menu-button {
    display: none;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #f8fafc;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    padding: 9px 12px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding: 14px 24px 20px;
    background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav,
.mobile-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mobile-categories {
    margin-top: 12px;
}

.hero {
    position: relative;
    min-height: 70vh;
    height: min(85vh, 780px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 38%, rgba(15, 23, 42, 0.28) 70%, rgba(2, 6, 23, 0.84) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 44%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 10%;
    width: min(1280px, calc(100% - 48px));
    transform: translateX(-50%);
    max-width: 1280px;
}

.hero-content > * {
    max-width: 760px;
}

.hero-kickers,
.hero-meta,
.detail-meta,
.movie-meta-line,
.tag-row,
.breadcrumb,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-kickers span,
.detail-meta span,
.tag-row span,
.type-badge,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #cbd5e1;
    line-height: 1;
}

.hero-kickers span:first-child {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #ffffff;
    border-color: transparent;
}

.hero-kickers span {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 18px 0 16px;
    color: #ffffff;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.05em;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    max-width: 720px;
}

.hero-meta {
    margin-bottom: 26px;
    color: #e2e8f0;
}

.hero-meta span {
    padding: 4px 0;
}

.hero-actions {
    gap: 12px;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
}

.hero-nav:hover {
    background: rgba(15, 23, 42, 0.95);
    transform: translateY(-50%) scale(1.08);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

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

.quick-search-section {
    margin-top: -34px;
    position: relative;
    z-index: 3;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

.quick-search input {
    padding: 14px 16px;
}

.section-stack {
    padding: 64px 0 90px;
    display: grid;
    gap: 70px;
}

.content-section {
    min-width: 0;
}

.section-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.section-title-row h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
}

.section-title-row a {
    margin-left: auto;
    color: #7dd3fc;
    font-weight: 700;
}

.title-bar {
    width: 5px;
    height: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #60a5fa, #22d3ee);
}

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

.catalog-grid {
    align-items: stretch;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 220px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
    scroll-snap-align: start;
}

.movie-card,
.rank-card,
.category-card,
.category-overview-card {
    overflow: hidden;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.55);
    box-shadow: 0 26px 58px rgba(37, 99, 235, 0.18);
}

.movie-thumb {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.movie-thumb-wide {
    aspect-ratio: 16 / 10;
}

.movie-thumb img,
.rank-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.thumb-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 60%);
}

.type-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 7px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

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

.movie-card-body h3,
.rank-content h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-card:hover h3,
.rank-card:hover h3 {
    color: #60a5fa;
}

.movie-card-body p,
.rank-content p,
.category-card p,
.category-overview-head p,
.footer-inner p {
    color: #94a3b8;
    margin: 0;
}

.movie-card-body p,
.rank-content p {
    font-size: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.movie-meta-line {
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.movie-meta-line span,
.tag-row span {
    padding: 5px 8px;
    font-size: 12px;
}

.tag-row {
    margin-top: 10px;
    gap: 6px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 120px;
}

.movie-card-horizontal .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

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

.category-card {
    padding: 20px;
    min-height: 190px;
}

.category-card > span {
    display: inline-flex;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 800;
}

.category-card div {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.category-card div a {
    color: #cbd5e1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 64px 92px 1fr;
    align-items: stretch;
    min-height: 138px;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7dd3fc;
    font-size: 20px;
    font-weight: 900;
    background: rgba(37, 99, 235, 0.12);
}

.rank-cover {
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.rank-cover img {
    aspect-ratio: 2 / 3;
}

.rank-content {
    padding: 14px;
    min-width: 0;
}

.plain-page {
    padding-bottom: 90px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.22), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.small-hero {
    padding: 76px 0 54px;
}

.small-hero > div {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.2);
    font-weight: 800;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb {
    margin-top: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #7dd3fc;
}

.category-overview-stack {
    padding-top: 50px;
    display: grid;
    gap: 24px;
}

.category-overview-card {
    padding: 22px;
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.category-preview-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.filter-panel {
    margin: 34px 0 24px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(150px, auto));
    gap: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 11px 12px;
}

.detail-page {
    padding-bottom: 90px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.08);
    opacity: 0.48;
}

.detail-bg-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.92)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 100%);
}

.detail-layout {
    position: relative;
    z-index: 2;
    padding: 72px 0 54px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 38px;
    align-items: end;
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.6);
    background: rgba(15, 23, 42, 0.78);
}

.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 850px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 19px;
}

.detail-meta {
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 8px 12px;
}

.detail-tags {
    margin-bottom: 28px;
}

.player-section {
    padding-top: 34px;
}

.player-section h2,
.detail-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(24px, 3vw, 34px);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #000000;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.5);
    aspect-ratio: 16 / 9;
}

.main-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(15, 23, 42, 0.34));
}

.player-cover span:last-child {
    font-size: 18px;
    font-weight: 800;
}

.play-icon {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 20px 54px rgba(37, 99, 235, 0.44);
    font-size: 28px;
    padding-left: 4px;
}

.player-shell.player-started .player-cover {
    display: none;
}

.detail-copy {
    padding: 42px 0 34px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.detail-copy article {
    border-radius: 22px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-copy p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.86);
}

.footer-inner {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1.1fr auto 1fr;
    gap: 26px;
    align-items: start;
}

.footer-inner p {
    margin-top: 12px;
    max-width: 620px;
}

.footer-links,
.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a,
.footer-tags a {
    color: #cbd5e1;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.7);
}

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

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

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

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

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

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

    .menu-button {
        display: inline-flex;
        margin-left: auto;
    }

    .header-inner {
        padding: 0 18px;
    }

    .hero {
        min-height: 640px;
        height: 78vh;
    }

    .hero-content {
        bottom: 12%;
        width: calc(100% - 36px);
    }

    .hero-content h1 {
        font-size: clamp(34px, 10vw, 54px);
    }

    .hero-nav {
        display: none;
    }

    .section-wrap,
    .small-hero > div,
    .footer-inner {
        width: calc(100% - 36px);
    }

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

    .category-grid,
    .category-preview-list,
    .rank-grid,
    .compact-ranks,
    .horizontal-list,
    .detail-copy,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .logo,
    .footer-logo {
        font-size: 17px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .hero {
        min-height: 610px;
    }

    .hero-actions,
    .quick-search,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .hero-actions a,
    .quick-search button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .section-stack {
        padding-top: 48px;
        gap: 52px;
    }

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

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

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

    .movie-card-horizontal {
        grid-template-columns: 118px 1fr;
    }

    .rank-card {
        grid-template-columns: 52px 78px 1fr;
    }

    .rank-number {
        font-size: 16px;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-layout {
        padding: 48px 0 38px;
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: 190px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .category-overview-head {
        display: block;
    }

    .category-overview-head .small-button {
        margin-top: 16px;
        display: inline-flex;
    }
}
