:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(34, 211, 238, 0.42);
    --text: #f8fafc;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --shadow: 0 24px 80px rgba(8, 145, 178, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
}

.site-nav {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid rgba(51, 65, 85, 0.55);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(20px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, 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;
    background: linear-gradient(135deg, #67e8f9, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.16);
    border: 1px solid rgba(34, 211, 238, 0.36);
    color: #67e8f9;
    font-size: 13px;
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.22);
}

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

.nav-link,
.mobile-nav-link,
.footer-links a {
    color: #cbd5e1;
    transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active,
.footer-links a:hover {
    color: var(--cyan);
}

.mobile-menu-button {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border: 0;
    background: transparent;
}

.mobile-menu-button span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #e2e8f0;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.hero-carousel {
    position: relative;
    height: 76vh;
    min-height: 600px;
    overflow: hidden;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 90px;
    max-width: 760px;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 15px;
    font-weight: 700;
}

.hero-content h1,
.hero-content h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 680px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.card-tags span,
.detail-tags span,
.meta-pill,
.type-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(34, 211, 238, 0.42);
    background: rgba(34, 211, 238, 0.13);
    color: #a5f3fc;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    padding: 8px 14px;
    border-radius: 12px;
}

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

.btn-primary,
.btn-secondary,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.38);
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn-primary,
.filter-button {
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    color: #ffffff;
    box-shadow: 0 14px 40px rgba(8, 145, 178, 0.28);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
}

.btn-primary:hover,
.btn-secondary:hover,
.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(34, 211, 238, 0.26);
    border-color: rgba(34, 211, 238, 0.8);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.55);
    color: #ffffff;
    font-size: 28px;
    transform: translateY(-50%);
}

.hero-control:hover {
    border-color: rgba(34, 211, 238, 0.65);
    background: rgba(15, 23, 42, 0.86);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: #475569;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 36px;
    background: var(--cyan);
}

.section,
.page-main {
    padding: 72px 0;
}

.section-alt {
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(10px);
}

.section-inner,
.page-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.section-heading h2,
.detail-section h2,
.sidebar-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

.section-heading p,
.page-hero p,
.category-tile p,
.sidebar-card p,
.detail-section p,
.search-note {
    color: #a8b3c7;
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    min-width: 0;
}

.movie-card-link {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.32);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: var(--shadow);
    transform: translateY(-6px);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.82);
}

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

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

.poster-wrap::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.18) 60%, transparent 100%);
}

.type-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 10px;
    border: 0;
    background: rgba(6, 182, 212, 0.92);
    color: #ffffff;
}

.rank-mark {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 10px 32px rgba(8, 145, 178, 0.36);
}

.poster-copy {
    position: absolute;
    z-index: 3;
    right: 14px;
    bottom: 14px;
    left: 14px;
}

.poster-copy h3 {
    display: -webkit-box;
    margin: 0 0 6px;
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.poster-copy p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 13px;
}

.card-tags span {
    padding: 5px 8px;
}

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

.category-tile,
.sidebar-card,
.detail-panel,
.filter-panel,
.rank-row {
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 60px rgba(2, 6, 23, 0.26);
}

.category-tile {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
    border-color: rgba(34, 211, 238, 0.68);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 23px;
    font-weight: 900;
}

.category-preview {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.category-preview span {
    overflow: hidden;
    color: #cbd5e1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    padding: 132px 0 58px;
    background: radial-gradient(circle at 22% 22%, rgba(34, 211, 238, 0.18), transparent 28rem);
}

.page-hero .page-inner {
    display: grid;
    gap: 22px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: var(--cyan);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 170px 170px auto;
    gap: 12px;
    padding: 16px;
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(71, 85, 105, 0.88);
    border-radius: 14px;
    outline: 0;
    background: rgba(2, 6, 23, 0.62);
    color: #f8fafc;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.hidden-by-filter {
    display: none;
}

.ranking-list {
    display: grid;
    gap: 16px;
    margin-bottom: 34px;
}

.rank-row {
    display: grid;
    grid-template-columns: 64px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.28), rgba(37, 99, 235, 0.34));
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.rank-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.rank-info p {
    margin: 0;
    color: #a8b3c7;
    line-height: 1.65;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
    aspect-ratio: 16 / 9;
}

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

.play-panel {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-badge {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 1px solid rgba(34, 211, 238, 0.48);
    border-radius: 999px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 20px 52px rgba(34, 211, 238, 0.32);
}

.player-message {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: none;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.38);
    border-radius: 14px;
    background: rgba(127, 29, 29, 0.66);
    color: #fecaca;
}

.player-message.show {
    display: block;
}

.detail-panel {
    padding: 26px;
}

.detail-panel h1 {
    margin: 12px 0 14px;
    color: #ffffff;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.meta-pill {
    padding: 7px 11px;
}

.detail-section {
    display: grid;
    gap: 14px;
    border-top: 1px solid rgba(71, 85, 105, 0.55);
    padding-top: 22px;
    margin-top: 22px;
}

.sidebar {
    display: grid;
    align-content: start;
    gap: 20px;
}

.sidebar-card {
    padding: 18px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 3 / 4;
    background: rgba(2, 6, 23, 0.76);
}

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

.related-list {
    display: grid;
    gap: 12px;
}

.related-link {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.18s ease;
}

.related-link:hover {
    background: rgba(34, 211, 238, 0.1);
}

.related-link img {
    width: 56px;
    height: 74px;
    border-radius: 10px;
    object-fit: cover;
}

.related-link strong {
    display: block;
    color: #ffffff;
    line-height: 1.35;
}

.related-link span {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 4px;
}

.site-footer {
    padding: 42px 0;
    border-top: 1px solid rgba(51, 65, 85, 0.64);
    background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
    display: grid;
    gap: 14px;
}

.footer-inner p {
    max-width: 780px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-menu-button {
        display: flex;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        bottom: 84px;
    }

    .hero-control {
        display: none;
    }

    .section,
    .page-main {
        padding: 50px 0;
    }

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

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

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

    .rank-row {
        grid-template-columns: 44px 72px 1fr;
    }

    .rank-row .btn-secondary {
        grid-column: 1 / -1;
    }

    .page-hero {
        padding-top: 112px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-actions,
    .section-actions {
        display: grid;
    }
}
