:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --orange: #ea580c;
    --orange-2: #f97316;
    --red: #dc2626;
    --amber: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    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: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #fff7ed 100%);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 54%, #0f172a 100%);
    box-shadow: 0 8px 28px rgba(2, 6, 23, 0.28);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 850;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange-2), var(--red));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.38);
}

.logo-text {
    background: linear-gradient(90deg, #fb923c, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
}

.desktop-nav a,
.mobile-nav a {
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fb923c;
}

.header-search {
    position: relative;
    width: 250px;
    flex: 0 0 auto;
}

.header-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    outline: none;
    padding: 12px 44px 12px 17px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(251, 146, 60, 0.9);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.header-search button,
.search-panel button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-2), var(--red));
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 16px 0 20px;
}

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

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

.hero-carousel {
    position: relative;
    min-height: 630px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.36), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(15, 23, 42, 0.26) 100%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 42px;
    padding: 86px 0 112px;
}

.hero-kicker,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
    font-weight: 750;
    font-size: 13px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(251, 146, 60, 0.36);
    padding: 7px 12px;
}

.hero-title {
    max-width: 760px;
    margin: 20px 0 16px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.06em;
    font-weight: 900;
}

.hero-desc {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

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

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.hero-poster-panel {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.11);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
}

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

.hero-poster-caption {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.88));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

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

.hero-dots button {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--orange-2), var(--red));
}

.section {
    padding: 54px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.section-subtitle {
    max-width: 720px;
    margin-top: 10px;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    display: block;
    min-width: 0;
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

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

.movie-card:hover img {
    transform: scale(1.06);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent 22%, rgba(15, 23, 42, 0.92) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-2), var(--red));
    font-size: 12px;
    font-weight: 850;
    padding: 6px 9px;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.32);
}

.rank-badge {
    left: auto;
    right: 12px;
}

.card-title {
    margin: 12px 0 5px;
    font-weight: 850;
    color: var(--ink);
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--orange);
}

.card-meta,
.card-desc {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

.category-card,
.info-card,
.related-card,
.search-panel,
.player-card,
.detail-panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--soft-shadow);
}

.category-card {
    padding: 22px;
    min-height: 178px;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: var(--shadow);
}

.category-card h3,
.info-card h3,
.detail-panel h2 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-count {
    display: inline-flex;
    margin-top: 18px;
    border-radius: 999px;
    padding: 7px 12px;
    color: #9a3412;
    background: #ffedd5;
    font-weight: 800;
    font-size: 13px;
}

.page-hero {
    padding: 68px 0 44px;
    color: #ffffff;
    background: radial-gradient(circle at 14% 12%, rgba(249, 115, 22, 0.42), transparent 30%), linear-gradient(135deg, #0f172a 0%, #1e293b 62%, #7c2d12 100%);
}

.page-title {
    margin: 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.page-desc {
    max-width: 820px;
    margin: 15px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.search-panel {
    position: relative;
    padding: 22px;
    margin-bottom: 28px;
}

.search-controls {
    display: grid;
    grid-template-columns: 1.4fr 0.75fr 0.75fr;
    gap: 16px;
}

.search-panel input,
.search-panel select {
    min-height: 48px;
    border-color: #cbd5e1;
    background: #ffffff;
    color: var(--ink);
    padding-right: 18px;
}

.search-count {
    margin-top: 14px;
    color: var(--muted);
    font-weight: 700;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

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

.ranking-row img {
    width: 92px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 15px;
}

.detail-hero {
    padding: 46px 0;
    color: #ffffff;
    background: radial-gradient(circle at 22% 18%, rgba(249, 115, 22, 0.38), transparent 34%), linear-gradient(135deg, #020617 0%, #0f172a 58%, #7f1d1d 100%);
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-cover {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

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

.detail-title {
    margin: 14px 0 18px;
    font-size: clamp(34px, 5.4vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.detail-summary {
    max-width: 820px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.85;
    font-size: 17px;
}

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

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(251, 146, 60, 0.3);
    font-size: 13px;
    font-weight: 750;
}

.player-card {
    padding: 18px;
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #020617;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-2), var(--red));
    box-shadow: 0 22px 45px rgba(239, 68, 68, 0.35);
    font-size: 34px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

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

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

.detail-panel {
    padding: 26px;
    margin-top: 24px;
}

.detail-panel p {
    margin: 0 0 16px;
    color: #334155;
    line-height: 1.9;
}

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

.related-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.related-card img {
    width: 76px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

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

.footer-grid p,
.footer-grid li {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 14px;
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 0 24px;
    color: #64748b;
    font-size: 13px;
}

.no-results {
    display: none;
    padding: 46px;
    border-radius: 24px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.no-results.is-visible {
    display: block;
}

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-content,
    .detail-hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster-panel {
        max-width: 340px;
    }

    .search-controls,
    .ranking-list {
        grid-template-columns: 1fr;
    }
}

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

    .logo {
        font-size: 20px;
    }

    .hero-carousel {
        min-height: 720px;
    }

    .hero-content {
        padding: 58px 0 96px;
    }

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

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

    .ranking-row {
        grid-template-columns: 46px 74px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-row img {
        width: 74px;
    }
}
