* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 119, 255, 0.5) rgba(10, 13, 36, 0.5);
}

body {
    margin: 0;
    min-height: 100vh;
    color: #f3f4f6;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(to bottom, #0a0d24, #1a1a3e, #0a0d24);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 13, 36, 0.78);
    backdrop-filter: blur(14px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

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

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #9d8df9, #7d9aff);
    box-shadow: 0 0 28px rgba(93, 119, 255, 0.42);
}

.brand-text,
.footer-brand span:last-child {
    font-size: 22px;
    background: linear-gradient(to right, #9d8df9, #7d9aff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 10px rgba(93, 119, 255, 0.42);
}

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

.nav-link {
    color: #d1d5db;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #9d8df9;
    text-shadow: 0 0 10px rgba(93, 119, 255, 0.8);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

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

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px 0 14px;
}

.mobile-nav-link {
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.glass-card,
.glass-effect {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.22);
}

.card-hover {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    border-color: rgba(125, 96, 245, 0.52);
    box-shadow: 0 24px 80px rgba(93, 119, 255, 0.22);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.82fr);
    gap: 24px;
    min-height: calc(100vh - 68px);
    padding: 28px max(16px, calc((100vw - 1180px) / 2)) 42px;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border-radius: 28px;
    background: #050816;
    box-shadow: 0 30px 120px rgba(0, 0, 0, 0.45);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 25% 20%, rgba(157, 141, 249, 0.38), transparent 34%),
        linear-gradient(90deg, rgba(10, 13, 36, 0.98), rgba(10, 13, 36, 0.42), rgba(10, 13, 36, 0.84)),
        linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, 92%);
    padding: 60px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #9d8df9;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hero-content h1,
.page-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 70px);
    line-height: 1.08;
    font-weight: 900;
    background: linear-gradient(to right, #ffffff, #bfb6ff, #7d9aff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p,
.page-hero p {
    max-width: 760px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #7d60f5, #5d77ff);
    box-shadow: 0 16px 36px rgba(93, 119, 255, 0.34);
}

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

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(109, 62, 237, 0.32);
}

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

.hero-controls button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-dot.active {
    width: 26px;
    opacity: 1;
    background: #9d8df9;
}

.hero-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 34px;
    border-radius: 28px;
}

.floating-mark {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 24px;
    color: #9d8df9;
    font-size: 32px;
    background: rgba(157, 141, 249, 0.12);
    animation: float 6s ease-in-out infinite;
}

.hero-side h2 {
    margin: 0 0 16px;
    font-size: 34px;
    line-height: 1.18;
}

.hero-side p {
    color: #d1d5db;
    line-height: 1.8;
}

.hero-search {
    display: flex;
    gap: 10px;
    margin: 26px 0;
}

.hero-search input,
.filter-panel input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    outline: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-search input:focus,
.filter-panel input:focus {
    border-color: #9d8df9;
    box-shadow: 0 0 0 4px rgba(157, 141, 249, 0.13);
}

.hero-search a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 14px;
    background: #7d60f5;
}

.hero-category-pills,
.filter-links,
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-category-pills a,
.filter-link,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #d1d5db;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.25s ease, color 0.25s ease;
}

.hero-category-pills a:hover,
.filter-link:hover,
.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    background: rgba(109, 62, 237, 0.48);
}

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

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.section-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #9d8df9;
    background: rgba(157, 141, 249, 0.12);
}

.section-more {
    color: #9d8df9;
}

.feature-grid,
.poster-grid,
.category-grid {
    display: grid;
    gap: 20px;
}

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

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

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

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

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

.movie-card,
.category-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap,
.category-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(93, 119, 255, 0.2), rgba(125, 96, 245, 0.14));
}

.poster-wrap img,
.category-cover img,
.rank-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-wrap img,
.category-card:hover .category-cover img {
    transform: scale(1.1);
}

.poster-wrap::after,
.category-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), transparent 62%);
}

.card-badge,
.category-cover span {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    background: rgba(109, 62, 237, 0.86);
}

.play-hover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.play-hover::before {
    position: absolute;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    content: "";
    background: rgba(125, 96, 245, 0.9);
    z-index: -1;
}

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

.card-body,
.category-content {
    padding: 16px;
}

.card-body h2,
.category-content h2,
.rank-item h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p,
.category-content p,
.rank-item p {
    margin: 0 0 12px;
    color: #9ca3af;
    line-height: 1.7;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #d1d5db;
    font-size: 13px;
}

.tag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #9ca3af;
    font-size: 13px;
}

.tag-row strong {
    color: #facc15;
}

.movie-card.small .card-body h2 {
    font-size: 15px;
}

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

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

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    gap: 24px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 18px;
    border-radius: 22px;
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rank-panel-head h2 {
    margin: 0;
}

.rank-panel-head a {
    color: #9d8df9;
}

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

.rank-item {
    border-radius: 18px;
}

.rank-item a {
    display: grid;
    grid-template-columns: 44px 108px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.compact-list .rank-item a {
    grid-template-columns: 34px 86px minmax(0, 1fr);
    gap: 10px;
}

.rank-item img {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
}

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

.compact-list .rank-item h2 {
    font-size: 15px;
}

.compact-list .rank-item p {
    display: none;
}

.category-card > a {
    display: block;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 16px;
}

.category-links a {
    color: #9d8df9;
    font-size: 14px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 56px;
}

.page-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 20% 10%, rgba(157, 141, 249, 0.26), transparent 28%),
        radial-gradient(circle at 80% 0%, rgba(93, 119, 255, 0.22), transparent 30%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
}

.page-hero.compact h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: #9ca3af;
}

.breadcrumb a {
    color: #9d8df9;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 22px;
}

.large-search {
    position: sticky;
    top: 82px;
    z-index: 9;
}

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

.full-rank .rank-item a {
    grid-template-columns: 54px 160px minmax(0, 1fr);
}

.detail-hero {
    padding: 34px 0 30px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.74fr);
    gap: 24px;
    align-items: stretch;
}

.player-card,
.detail-info,
.text-block {
    border-radius: 24px;
}

.player-card {
    overflow: hidden;
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    color: #ffffff;
    background: #000000;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 70%);
}

.big-play {
    position: relative;
    z-index: 2;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    font-size: 34px;
    background: rgba(125, 96, 245, 0.92);
    box-shadow: 0 0 48px rgba(93, 119, 255, 0.56);
}

.player-cover.is-hidden {
    display: none;
}

.detail-info {
    display: flex;
    flex-direction: column;
    padding: 28px;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.14;
}

.detail-info p {
    color: #d1d5db;
    line-height: 1.8;
}

.detail-meta {
    margin: 10px 0 20px;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 24px;
}

.primary-btn.wide {
    margin-top: auto;
}

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

.text-block {
    padding: 24px;
}

.text-block h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-block p {
    margin: 0;
    color: #d1d5db;
    font-size: 16px;
    line-height: 1.9;
}

.is-filter-hidden,
.is-missing-image {
    display: none !important;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@media (max-width: 1080px) {
    .home-hero,
    .detail-layout,
    .split-section {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        min-height: 560px;
    }

    .hero-side,
    .rank-panel {
        position: relative;
        top: auto;
    }

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

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

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

    .nav-toggle {
        display: block;
    }

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

    .home-hero {
        min-height: auto;
        padding-top: 18px;
    }

    .hero-slider {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        width: 100%;
        padding: 34px 24px 82px;
    }

    .hero-controls {
        left: 24px;
        right: auto;
    }

    .hero-side {
        padding: 24px;
    }

    .feature-grid,
    .category-grid,
    .category-grid.wide,
    .detail-text {
        grid-template-columns: 1fr;
    }

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

    .rank-item a,
    .full-rank .rank-item a {
        grid-template-columns: 40px 96px minmax(0, 1fr);
    }

    .rank-item p {
        display: none;
    }
}

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

    .nav-shell {
        height: 62px;
    }

    .brand-text {
        font-size: 19px;
    }

    .home-hero {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-slider {
        min-height: 480px;
    }

    .hero-search,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .poster-grid,
    .category-movie-grid,
    .small-grid {
        grid-template-columns: 1fr;
    }

    .card-body h2,
    .category-content h2,
    .rank-item h2 {
        font-size: 17px;
    }

    .player-card,
    .detail-info,
    .text-block {
        border-radius: 18px;
    }

    .detail-info {
        padding: 20px;
    }
}
