* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --red: #ef4444;
    --gold: #f59e0b;
    --blue: #2563eb;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(239, 68, 68, 0.98));
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(185, 28, 28, 0.22);
    backdrop-filter: blur(18px);
}

.header-shell {
    width: min(1240px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-text {
    font-size: 21px;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 10px 12px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.header-search input,
.mobile-panel input {
    width: 210px;
    border: 0;
    outline: 0;
    color: #ffffff;
    border-radius: 999px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: width 0.2s ease, background 0.2s ease;
}

.header-search input::placeholder,
.mobile-panel input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.header-search input:focus {
    width: 270px;
    background: rgba(255, 255, 255, 0.28);
}

.header-search button,
.mobile-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--orange-dark);
    background: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.mobile-panel {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.mobile-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.mobile-panel input {
    width: 100%;
}

.hero-carousel {
    position: relative;
    min-height: 680px;
    background: var(--dark);
    overflow: hidden;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.55s ease;
    padding: 96px max(28px, calc((100vw - 1240px) / 2)) 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 56px;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

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

.hero-badge,
.detail-category,
.sub-hero span,
.section-head span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 9px 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.hero-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 84px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}

.hero-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.2vw, 24px);
    line-height: 1.75;
    max-width: 720px;
}

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

.hero-tags {
    margin: 26px 0 30px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    border-radius: 999px;
    padding: 7px 11px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 36px rgba(239, 68, 68, 0.28);
}

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

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 -80px 120px rgba(0, 0, 0, 0.28);
}

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

.hero-dot {
    width: 38px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.hero-dot.active {
    background: #ffffff;
}

.section-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.section-head.centered {
    display: grid;
    justify-items: center;
    text-align: center;
}

.section-head h2,
.sub-hero h1,
.detail-copy h1 {
    margin: 12px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-head p,
.sub-hero p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-head > a {
    color: var(--orange-dark);
    font-weight: 900;
}

.quick-search-block {
    padding-bottom: 32px;
}

.big-search {
    width: min(820px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.big-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 16px 18px;
    background: #f3f4f6;
}

.big-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
    cursor: pointer;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    aspect-ratio: 16 / 22;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-rating {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.28);
}

.card-body {
    padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-meta span,
.rank-meta span,
.detail-meta span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #f3f4f6;
}

.card-body h3 {
    margin: 13px 0 9px;
    font-size: 20px;
    line-height: 1.25;
}

.card-body h3 a:hover,
.rank-copy h3 a:hover,
.category-card h2 a:hover {
    color: var(--orange-dark);
}

.card-body p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
}

.tag-row span {
    color: var(--orange-dark);
    background: #fff7ed;
    box-shadow: none;
}

.gradient-panel {
    width: min(1280px, calc(100% - 24px));
    padding: 48px 36px;
    border-radius: 34px;
    background: linear-gradient(135deg, #fff7ed, #eff6ff 55%, #faf5ff);
}

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

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

.category-card {
    display: grid;
    grid-template-columns: 156px 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--soft-shadow);
}

.category-posters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    min-height: 130px;
}

.category-posters img {
    height: 130px;
    object-fit: cover;
    border-radius: 14px;
}

.category-posters img:nth-child(2) {
    transform: translateY(12px);
}

.category-card h2 {
    margin: 0 0 9px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.category-card span {
    color: var(--orange-dark);
    font-weight: 800;
    font-size: 13px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 86px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.rank-number {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.rank-cover img {
    width: 86px;
    height: 112px;
    object-fit: cover;
    border-radius: 16px;
}

.rank-copy h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-copy p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.65;
}

.sub-hero {
    min-height: 320px;
    display: grid;
    align-items: center;
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 32%), linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
    padding: 72px max(28px, calc((100vw - 1240px) / 2));
}

.sub-hero p {
    color: rgba(255, 255, 255, 0.76);
    max-width: 760px;
}

.filter-strip {
    padding-bottom: 0;
}

.filter-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.filter-chip {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 11px 16px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 800;
    box-shadow: var(--soft-shadow);
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.movie-detail-hero {
    min-height: 640px;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 42px 0 76px;
}

.detail-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
    margin-bottom: 50px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

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

.detail-poster {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
    font-size: clamp(42px, 6vw, 78px);
}

.detail-copy p {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 20px;
    line-height: 1.8;
}

.detail-meta {
    margin: 24px 0 28px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.detail-content {
    margin-top: -82px;
    position: relative;
    z-index: 2;
}

.player-card {
    overflow: hidden;
    border-radius: 34px;
    background: #000000;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.25);
}

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

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding-left: 5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 45px rgba(239, 68, 68, 0.42);
    font-size: 36px;
}

.player-overlay strong {
    font-size: clamp(20px, 3vw, 34px);
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.detail-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    margin-top: 26px;
}

.content-card,
.info-card {
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.content-card h2,
.info-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.content-card p {
    color: #374151;
    line-height: 1.92;
    margin: 0 0 15px;
}

.info-card dl {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.info-card dl div {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.info-card dt {
    color: var(--muted);
    font-weight: 800;
}

.info-card dd {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.detail-tags span {
    color: var(--orange-dark);
    background: #fff7ed;
    box-shadow: none;
}

.review-card {
    margin-top: 24px;
}

.search-summary {
    margin: 22px 0 0;
    color: var(--muted);
    font-weight: 800;
}

.search-page .movie-grid {
    margin-top: 26px;
}

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

.movie-card.compact .card-body p {
    display: none;
}

.site-footer {
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.72);
    background: #111827;
}

.footer-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 28px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
}

.site-footer p {
    max-width: 460px;
    line-height: 1.75;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    border-radius: 999px;
    padding: 9px 13px;
    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.38);
}

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

    .menu-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: 720px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .detail-intro,
    .detail-columns,
    .footer-shell {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(300px, 70vw);
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .hero-carousel,
    .hero-track {
        min-height: 650px;
    }

    .hero-slide {
        padding-top: 78px;
        padding-bottom: 70px;
        min-height: 650px;
    }

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

    .section-wrap {
        padding: 42px 0;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .big-search {
        border-radius: 24px;
        grid-template-columns: 1fr;
    }

    .big-search button {
        min-height: 48px;
    }

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

    .card-body {
        padding: 14px;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 72px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 14px;
    }

    .rank-cover img {
        width: 72px;
        height: 96px;
    }

    .rank-copy h3 {
        font-size: 18px;
    }

    .rank-copy p {
        display: none;
    }

    .movie-detail-hero {
        min-height: 560px;
        padding-bottom: 108px;
    }

    .detail-copy p {
        font-size: 17px;
    }

    .content-card,
    .info-card {
        padding: 22px;
    }
}

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

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

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

    .play-circle {
        width: 66px;
        height: 66px;
        font-size: 28px;
    }
}
