* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: #e2e8f0;
    background:
        radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.16), transparent 30rem),
        radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.16), transparent 28rem),
        #020617;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(51, 65, 85, 0.8);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.36);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.24);
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(51, 65, 85, 0.8);
    padding: 10px 16px 16px;
}

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1.1s ease;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.36) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.3) 0%, rgba(2, 6, 23, 0.94) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.78fr;
    gap: 56px;
    align-items: center;
    padding-top: 34px;
}

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

.eyebrow,
.page-hero span,
.section-title span {
    display: inline-flex;
    align-items: center;
    color: #67e8f9;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero h1 {
    margin: 18px 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

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

.hero-actions,
.tag-row,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 46px rgba(37, 99, 235, 0.36);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

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

.hero-controls {
    position: absolute;
    right: 32px;
    bottom: 40px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.hero-controls button,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    transition: 0.2s ease;
}

.hero-controls button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 32px;
    line-height: 1;
}

.hero-controls button:hover,
.hero-dot.active,
.hero-dot:hover {
    background: rgba(34, 211, 238, 0.8);
}

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

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

.hero-dot.active {
    width: 28px;
}

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

.page-main {
    min-height: 70vh;
}

.search-hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 28px;
    align-items: center;
    margin-top: -34px;
    position: relative;
    z-index: 8;
    padding: 26px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

.search-hero h2,
.section-title h2,
.page-hero h1,
.player-section h2,
.detail-text h2 {
    margin: 0;
    color: #ffffff;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.search-hero h2,
.section-title h2 {
    font-size: clamp(26px, 4vw, 40px);
}

.search-hero p,
.page-hero p,
.category-card p,
.site-footer p,
.movie-line,
.lead-text,
.detail-text p {
    color: #94a3b8;
    line-height: 1.75;
}

.quick-search,
.search-panel {
    display: flex;
    gap: 12px;
}

.quick-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.82);
    border: 1px solid rgba(71, 85, 105, 0.9);
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
}

.quick-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.section-title a {
    color: #67e8f9;
    font-weight: 800;
}

.section-title.tight {
    align-items: center;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
    transition: 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 24px 70px rgba(6, 182, 212, 0.12);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(6, 182, 212, 0.86);
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 16px;
}

.movie-title {
    display: block;
    color: #ffffff;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-title:hover {
    color: #67e8f9;
}

.movie-meta {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-line {
    min-height: 48px;
    margin: 12px 0;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-pill,
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #a5f3fc;
    font-size: 12px;
    font-weight: 700;
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.18);
}

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

.category-card {
    min-height: 210px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.58));
    transition: 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.44);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    height: 90px;
    overflow: hidden;
    margin-bottom: 16px;
}

.category-covers img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.category-card strong {
    display: block;
    color: #ffffff;
    font-size: 19px;
    margin-bottom: 8px;
}

.category-card p {
    margin: 0;
    font-size: 14px;
}

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

.rank-panel,
.search-panel,
.player-section,
.detail-text {
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 20px 54px rgba(2, 6, 23, 0.2);
}

.rank-panel {
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.rank-list,
.rank-page-list {
    display: grid;
    gap: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 62px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.44);
    border: 1px solid rgba(51, 65, 85, 0.55);
    transition: 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(34, 211, 238, 0.42);
    background: rgba(14, 116, 144, 0.15);
}

.rank-num {
    color: #22d3ee;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-cover img {
    width: 62px;
    height: 82px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-body strong,
.rank-body em {
    display: block;
}

.rank-body strong {
    color: #ffffff;
    line-height: 1.35;
}

.rank-body em {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 13px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 26px 0 34px;
    padding: 42px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(8, 145, 178, 0.18), transparent 42%),
        rgba(15, 23, 42, 0.72);
}

.page-hero.slim h1 {
    font-size: clamp(34px, 5vw, 56px);
    margin: 10px 0 12px;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    font-size: 17px;
}

.overview-grid {
    margin-bottom: 38px;
}

.chip-row {
    margin-top: 22px;
}

.chip {
    cursor: pointer;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: rgba(8, 145, 178, 0.1);
}

.chip.active,
.chip:hover {
    color: #ffffff;
    background: rgba(6, 182, 212, 0.38);
}

.search-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 0.8fr;
    gap: 12px;
    padding: 18px;
    margin-bottom: 28px;
}

.search-results .movie-card.hidden,
.filter-grid .movie-card.hidden {
    display: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 26px 0;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(6, 182, 212, 0.14), transparent 42%),
        rgba(15, 23, 42, 0.72);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.detail-copy h1 {
    margin: 12px 0 14px;
    color: #ffffff;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.lead-text {
    max-width: 780px;
    font-size: 20px;
    margin: 0 0 22px;
}

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

.player-section h2 {
    font-size: 28px;
    margin-bottom: 18px;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    border: 1px solid rgba(51, 65, 85, 0.92);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

.video-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background:
        radial-gradient(circle, rgba(6, 182, 212, 0.22), rgba(0, 0, 0, 0.36) 44%, rgba(0, 0, 0, 0.62));
    transition: 0.2s ease;
}

.play-overlay:hover {
    background:
        radial-gradient(circle, rgba(37, 99, 235, 0.3), rgba(0, 0, 0, 0.32) 44%, rgba(0, 0, 0, 0.55));
}

.play-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding-left: 4px;
    font-size: 28px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 50px rgba(37, 99, 235, 0.35);
}

.play-overlay strong {
    font-size: 18px;
}

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

.detail-text {
    margin-top: 34px;
    padding: 28px;
}

.detail-text h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 28px;
}

.detail-text p + h2 {
    margin-top: 28px;
}

.detail-text p {
    margin: 0;
    font-size: 17px;
}

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

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

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

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a {
    color: #94a3b8;
    font-size: 14px;
}

.footer-links a:hover {
    color: #67e8f9;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding-top: 20px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
}

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

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

    .split-layout,
    .search-hero,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-poster {
        display: none;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .hero-content {
        padding: 88px 0 92px;
    }

    .hero-controls {
        right: 18px;
        bottom: 22px;
    }

    .search-hero,
    .page-hero,
    .detail-hero,
    .player-section,
    .detail-text {
        padding: 22px;
        border-radius: 22px;
    }

    .quick-search,
    .search-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .movie-grid,
    .small-grid,
    .category-grid,
    .rank-page-list,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero {
        gap: 22px;
    }

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

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

    .site-logo {
        font-size: 18px;
    }

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

    .movie-grid,
    .small-grid,
    .category-grid,
    .rank-page-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 34px 56px 1fr;
    }

    .rank-cover img {
        width: 56px;
        height: 74px;
    }
}
