* {
    box-sizing: border-box;
}

:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --orange: #f97316;
    --amber: #f59e0b;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --card: #ffffff;
    --soft: #fff7ed;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 48%, #fffbeb 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    color: #fff;
    box-shadow: 0 12px 35px rgba(2, 6, 23, 0.28);
}

.header-inner,
.category-strip-inner,
.footer-inner,
.content-section,
.detail-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 20px;
    background: linear-gradient(90deg, #fb923c, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    color: #cbd5e1;
    font-size: 12px;
    margin-top: 4px;
}

.top-search {
    flex: 1;
    max-width: 420px;
    position: relative;
    margin-left: auto;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 999px;
    padding: 11px 48px 11px 18px;
    outline: none;
    background: rgba(51, 65, 85, 0.78);
    color: #fff;
    transition: 0.22s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.22);
}

.top-search button {
    position: absolute;
    top: 4px;
    right: 5px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    color: #fff;
    cursor: pointer;
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #e2e8f0;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fb923c;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-panel.open {
    display: grid;
    gap: 12px;
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    padding-right: 16px;
}

.mobile-search button,
.search-page-form button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    cursor: pointer;
}

.mobile-link {
    color: #e2e8f0;
    font-weight: 650;
}

.category-strip {
    background: rgba(2, 6, 23, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.category-strip-inner {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding: 11px 0;
    scrollbar-width: none;
}

.category-strip-inner::-webkit-scrollbar {
    display: none;
}

.category-strip a {
    white-space: nowrap;
    color: #dbeafe;
    font-size: 14px;
    transition: color 0.2s ease;
}

.category-strip a:hover {
    color: #fb923c;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 72px;
    width: min(680px, calc(100% - 48px));
    color: #fff;
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.32);
}

.hero-content h1 {
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    margin: 20px 0 16px;
}

.hero-content p {
    color: #e2e8f0;
    font-size: 19px;
    line-height: 1.75;
    margin: 0 0 20px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #e5e7eb;
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.32);
}

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

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.ghost-btn.light {
    color: #fff;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.24s ease, background 0.24s ease;
}

.hero-dot.active {
    width: 34px;
    background: #fff;
}

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

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

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

.section-head h2,
.score-panel h2,
.side-panel h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
}

.section-icon {
    font-size: 28px;
}

.section-more {
    color: #ea580c;
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

.movie-grid.one {
    grid-template-columns: 1fr;
}

.movie-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-image-wrap {
    display: block;
    position: relative;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #f97316);
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover img,
.mini-card:hover img,
.poster-panel:hover img {
    transform: scale(1.06);
}

.category-badge,
.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
}

.category-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

.duration-badge {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f43f5e, #f97316);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: #ea580c;
}

.card-body p {
    color: #64748b;
    line-height: 1.65;
    font-size: 14px;
    min-height: 46px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tag-row span,
.detail-tags a {
    background: #f1f5f9;
    color: #475569;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.card-meta {
    color: #64748b;
    font-size: 13px;
    justify-content: space-between;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.movie-card.horizontal .card-image-wrap {
    height: 100%;
    min-height: 148px;
}

.movie-card.horizontal .card-title {
    min-height: auto;
    -webkit-line-clamp: 1;
}

.movie-card.horizontal .card-body p {
    min-height: auto;
}

.score-panel {
    width: min(1180px, calc(100% - 32px));
    margin: 64px auto 0;
    border-radius: 26px;
    padding: 36px;
    color: #fff;
    background: linear-gradient(120deg, var(--slate-800), var(--slate-950));
    box-shadow: var(--shadow);
}

.score-panel-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.score-panel-head span {
    color: #facc15;
    font-size: 30px;
}

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

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

.mini-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    transition: background 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.side-panel .mini-card,
.category-card .mini-card {
    background: #f8fafc;
}

.mini-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.side-panel .mini-card:hover,
.category-card .mini-card:hover {
    background: #fff7ed;
}

.mini-card img {
    width: 92px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--slate-900), var(--orange));
    transition: transform 0.25s ease;
}

.mini-title {
    color: inherit;
    font-weight: 800;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-meta {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 8px;
}

.page-hero {
    min-height: 310px;
    display: grid;
    align-items: center;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.44), transparent 30%), linear-gradient(120deg, var(--slate-800), var(--slate-950));
    color: #fff;
    padding: 60px max(24px, calc((100vw - 1180px) / 2));
}

.page-hero.compact {
    min-height: 280px;
}

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

.page-hero p {
    color: #dbeafe;
    max-width: 720px;
    line-height: 1.8;
    font-size: 18px;
}

.color-red {
    background: radial-gradient(circle at 20% 20%, rgba(248, 113, 113, 0.36), transparent 28%), linear-gradient(120deg, #7f1d1d, #111827);
}

.color-purple {
    background: radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.36), transparent 28%), linear-gradient(120deg, #3b0764, #111827);
}

.color-rose {
    background: radial-gradient(circle at 20% 20%, rgba(244, 63, 94, 0.36), transparent 28%), linear-gradient(120deg, #881337, #111827);
}

.color-blue {
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.36), transparent 28%), linear-gradient(120deg, #1e3a8a, #111827);
}

.color-green {
    background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.36), transparent 28%), linear-gradient(120deg, #14532d, #111827);
}

.color-teal {
    background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.36), transparent 28%), linear-gradient(120deg, #134e4a, #111827);
}

.color-amber {
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.38), transparent 28%), linear-gradient(120deg, #78350f, #111827);
}

.color-sky {
    background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.36), transparent 28%), linear-gradient(120deg, #0c4a6e, #111827);
}

.color-slate {
    background: radial-gradient(circle at 20% 20%, rgba(148, 163, 184, 0.28), transparent 28%), linear-gradient(120deg, #334155, #020617);
}

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

.category-card {
    border-radius: 24px;
    padding: 24px;
    color: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.category-main-link {
    display: block;
    margin-bottom: 20px;
}

.category-main-link span {
    font-size: 28px;
    font-weight: 900;
    display: block;
    margin-bottom: 8px;
}

.category-main-link strong {
    color: #e2e8f0;
    line-height: 1.7;
    font-weight: 500;
}

.category-samples {
    display: grid;
    gap: 12px;
}

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

.filter-input {
    max-width: 420px;
    background: #fff;
    color: #0f172a;
    padding-right: 18px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    background: #fff;
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.sort-btn {
    border: 0;
    border-radius: 12px;
    padding: 9px 14px;
    color: #475569;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.sort-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

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

.ranking-side,
.detail-side {
    display: grid;
    gap: 24px;
    align-content: start;
}

.side-panel,
.detail-card,
.poster-panel {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
    padding: 24px;
}

.side-panel h2 {
    font-size: 24px;
    margin-bottom: 18px;
}

.search-page-form {
    display: flex;
    width: min(680px, 100%);
    gap: 10px;
    margin-top: 26px;
}

.search-page-form input {
    background: rgba(255, 255, 255, 0.12);
}

.search-page-form button {
    min-width: 110px;
}

.search-status {
    margin-bottom: 24px;
    color: #64748b;
    font-weight: 700;
}

.detail-wrap {
    padding-top: 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    margin-bottom: 22px;
    font-size: 14px;
}

.breadcrumb a {
    color: #ea580c;
    font-weight: 700;
}

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

.player-shell {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
}

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

.player-button {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 178px;
    height: 64px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.40);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.player-button:hover {
    transform: scale(1.04);
}

.player-shell.is-playing .player-button {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

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

.detail-card h1 {
    font-size: clamp(28px, 4vw, 42px);
    margin: 0 0 18px;
}

.detail-meta {
    color: #64748b;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

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

.detail-tags a:first-child {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
}

.summary-block {
    padding: 22px 0;
    border-top: 1px solid var(--line);
}

.summary-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.summary-block p {
    color: #334155;
    line-height: 2;
    margin: 0;
}

.summary-block.highlight {
    margin-top: 8px;
    padding: 24px;
    border: 1px solid #fed7aa;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #fff);
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--slate-900), var(--orange));
    transition: transform 0.25s ease;
}

.poster-panel a {
    display: inline-flex;
    margin-top: 16px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    padding: 9px 15px;
    font-weight: 800;
}

.sticky-panel {
    position: sticky;
    top: 104px;
}

.site-footer {
    margin-top: 80px;
    background: linear-gradient(180deg, var(--slate-900), #000);
    color: #cbd5e1;
}

.footer-inner {
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 32px;
}

.footer-inner h3 {
    color: #fff;
    margin: 0 0 14px;
}

.footer-inner p,
.footer-inner a {
    color: #94a3b8;
    line-height: 1.8;
}

.footer-inner a:hover {
    color: #fb923c;
}

.footer-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
    padding: 20px 16px;
    color: #94a3b8;
}

@media (max-width: 1024px) {
    .top-search {
        display: none;
    }

    .movie-grid.four,
    .movie-grid.three,
    .mini-grid,
    .category-overview,
    .ranking-layout,
    .detail-grid,
    .footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-side {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

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

    .hero-content {
        bottom: 86px;
    }

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

    .hero-meta {
        gap: 10px;
        font-size: 14px;
    }

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

    .section-head,
    .toolbar,
    .search-page-form {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid.four,
    .movie-grid.three,
    .mini-grid,
    .category-overview,
    .ranking-layout,
    .detail-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .movie-card.horizontal .card-image-wrap {
        height: 220px;
    }

    .toolbar-actions {
        flex-wrap: wrap;
    }

    .detail-wrap,
    .content-section {
        width: min(100% - 24px, 1180px);
    }

    .score-panel {
        width: min(100% - 24px, 1180px);
        padding: 24px;
    }

    .player-button {
        width: 150px;
        height: 56px;
    }
}
