* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #e2e8f0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 42%, #0f172a 100%);
    min-height: 100vh;
}

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

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

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.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.9);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.24);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.footer-brand span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 12px 34px rgba(14, 165, 233, 0.28);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    color: #ffffff;
    font-size: 20px;
    line-height: 1.1;
}

.brand-text small {
    color: #94a3b8;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #cbd5e1;
    font-weight: 600;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #ffffff;
}

.nav-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
}

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

.hero-track,
.hero-slide,
.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

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

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

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.86)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.12) 48%, rgba(15, 23, 42, 0.15) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 680px;
    padding-top: 24px;
}

.hero-kicker,
.eyebrow,
.section-heading span {
    display: inline-flex;
    align-items: center;
    color: #facc15;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(44px, 6vw, 80px);
    line-height: 1;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
    max-width: 640px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

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

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary {
    color: #ffffff;
    background: #0ea5e9;
    box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}

.btn-primary:hover {
    background: #38bdf8;
}

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

.btn-soft {
    color: #dbeafe;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 24px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 42px;
    background: #ffffff;
}

.intro-panel,
.page-hero,
.content-panel,
.info-panel,
.catalog-tools,
.category-overview-card {
    background: rgba(30, 41, 59, 0.52);
    border: 1px solid rgba(71, 85, 105, 0.55);
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.2);
    backdrop-filter: blur(8px);
}

.intro-panel {
    margin-top: -48px;
    position: relative;
    z-index: 8;
    border-radius: 24px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.intro-panel h2,
.page-hero h1,
.section-heading h2,
.content-panel h2,
.info-panel h2 {
    margin: 0;
    color: #ffffff;
}

.intro-panel h2 {
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.intro-panel p,
.page-hero p,
.section-heading p,
.content-panel p,
.footer-grid p {
    color: #94a3b8;
    line-height: 1.8;
}

.section-block {
    padding: 60px 0 0;
}

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

.section-heading h2 {
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 8px 0 0;
    max-width: 760px;
}

.section-link {
    color: #7dd3fc;
    font-weight: 700;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 20px;
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.9;
}

.category-tile span {
    position: absolute;
    inset: auto 0 0;
    padding: 56px 18px 18px;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.category-tile strong,
.category-tile em {
    display: block;
}

.category-tile strong {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 8px;
}

.category-tile em {
    color: #cbd5e1;
    font-style: normal;
    font-size: 13px;
    line-height: 1.55;
}

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(71, 85, 105, 0.42);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-4px) scale(1.01);
    background: rgba(30, 41, 59, 0.78);
    box-shadow: 0 22px 40px rgba(14, 165, 233, 0.1);
}

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

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.8), rgba(2, 6, 23, 0.08));
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.year-badge {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
}

.rank-number {
    left: 10px;
    top: 10px;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.card-body strong {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .card-body strong {
    color: #38bdf8;
}

.card-body em {
    min-height: 42px;
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    color: #64748b;
    font-size: 12px;
}

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

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

.movie-card-horizontal {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.poster-small {
    flex: 0 0 126px;
    height: auto;
    min-height: 148px;
}

.movie-card-horizontal .card-body {
    align-content: center;
    padding-right: 18px;
}

.catalog-tools {
    border-radius: 22px;
    padding: 18px;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 26px;
}

.catalog-tools label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.catalog-tools input,
.catalog-tools select {
    width: 100%;
    border: 1px solid rgba(71, 85, 105, 0.8);
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    border-radius: 14px;
    min-height: 44px;
    padding: 0 14px;
    outline: none;
}

.catalog-tools input:focus,
.catalog-tools select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.page-main {
    padding: 36px 0 80px;
}

.compact-hero {
    border-radius: 28px;
    padding: 42px;
    margin-bottom: 32px;
}

.compact-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 22px;
}

.breadcrumb a:hover {
    color: #7dd3fc;
}

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

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

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

.category-overview-head strong {
    color: #7dd3fc;
    font-size: 14px;
}

.category-overview-card p {
    color: #94a3b8;
    line-height: 1.7;
}

.overview-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.detail-main {
    padding-bottom: 80px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.detail-backdrop,
.detail-shade {
    position: absolute;
    inset: 0;
}

.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: blur(1px);
}

.detail-shade {
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.95)),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.1) 100%);
}

.detail-hero-inner {
    position: relative;
    padding: 46px 0 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 38px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.detail-copy h1 {
    color: #ffffff;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    margin: 0 0 18px;
}

.detail-one-line {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
    max-width: 820px;
}

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

.detail-meta span {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    padding: 8px 12px;
    color: #dbeafe;
    font-weight: 700;
    font-size: 13px;
}

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

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

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    border: 1px solid rgba(71, 85, 105, 0.64);
    box-shadow: 0 36px 80px rgba(2, 6, 23, 0.38);
    aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover,
.player-cover img,
.player-cover-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    object-fit: contain;
    z-index: 1;
    background: #000000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    color: #ffffff;
    background: #000000;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.72;
}

.player-cover-shade {
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.82));
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 86px;
    height: 86px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.95);
    font-size: 36px;
    box-shadow: 0 20px 44px rgba(14, 165, 233, 0.32);
}

.detail-content {
    padding-top: 42px;
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 24px;
}

.content-panel,
.info-panel {
    border-radius: 24px;
    padding: 28px;
}

.content-panel h2,
.info-panel h2 {
    margin-bottom: 14px;
    font-size: 24px;
}

.content-panel p {
    font-size: 16px;
    margin: 0 0 24px;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    margin: 0;
}

.info-panel dt {
    color: #64748b;
}

.info-panel dd {
    margin: 0;
    color: #e2e8f0;
}

.site-footer {
    margin-top: 80px;
    background: #020617;
    border-top: 1px solid rgba(51, 65, 85, 0.9);
}

.footer-grid {
    padding: 44px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
}

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

.footer-links {
    display: grid;
    gap: 8px;
    color: #94a3b8;
}

.footer-links a:hover {
    color: #38bdf8;
}

.footer-bottom {
    border-top: 1px solid rgba(30, 41, 59, 0.86);
    color: #64748b;
    text-align: center;
    padding: 18px;
    font-size: 13px;
}

.is-filtered-out {
    display: none !important;
}

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

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

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

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

@media (max-width: 820px) {
    .header-row {
        min-height: 68px;
    }

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

    .main-nav {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        padding: 16px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(71, 85, 105, 0.72);
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 10px 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.04);
    }

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

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

    .hero-control {
        display: none;
    }

    .intro-panel,
    .section-heading,
    .detail-layout,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .intro-panel {
        align-items: start;
    }

    .section-heading {
        align-items: start;
    }

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

    .catalog-tools {
        grid-template-columns: 1fr;
    }

    .detail-layout {
        gap: 24px;
    }

    .detail-poster {
        width: min(280px, 80vw);
    }
}

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

    .brand-text strong {
        font-size: 18px;
    }

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

    .hero-copy p {
        font-size: 16px;
    }

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

    .btn {
        width: 100%;
    }

    .category-grid,
    .movie-grid,
    .ranking-grid,
    .wide-ranking,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap {
        height: 340px;
    }

    .movie-card-horizontal {
        display: grid;
    }

    .poster-small {
        min-height: 260px;
        height: 260px;
        flex-basis: auto;
    }

    .compact-hero,
    .content-panel,
    .info-panel {
        padding: 24px;
    }

    .player-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}
