:root {
    --page-bg: #f4f7fb;
    --text-main: #172033;
    --text-soft: #5c667a;
    --text-light: #f8fafc;
    --line: rgba(15, 23, 42, 0.1);
    --card: #ffffff;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --orange: #f97316;
    --red: #dc2626;
    --purple: #7c3aed;
    --blue: #2563eb;
    --teal: #14b8a6;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.14), transparent 28rem),
        radial-gradient(circle at 85% 5%, rgba(37, 99, 235, 0.12), transparent 24rem),
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    color: var(--text-light);
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 26px rgba(249, 115, 22, 0.34);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-3deg);
}

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

.brand-title {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fb923c, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.nav-links a {
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #fb923c;
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 230px;
    height: 42px;
    padding: 0 14px 0 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 13px;
    color: #f8fafc;
    background: rgba(51, 65, 85, 0.88);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, width 0.2s ease;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box input:focus {
    width: 275px;
    border-color: rgba(249, 115, 22, 0.75);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.92);
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: #1e293b;
}

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

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

.mobile-panel a {
    color: #e2e8f0;
    font-weight: 700;
}

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

.main {
    padding-bottom: 56px;
}

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

.hero-track {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.025);
    transition: opacity 0.7s ease, transform 1s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.72) 38%, rgba(15, 23, 42, 0.25) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, transparent 38%),
        var(--poster);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 610px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) 380px;
    align-items: center;
    gap: 38px;
    padding: 76px 0 56px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border: 1px solid rgba(251, 146, 60, 0.42);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.13);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 650px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(249, 115, 22, 0.36);
}

.btn-soft {
    color: #ffedd5;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.hero-panel {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 950;
}

.hero-mini-list {
    display: grid;
    gap: 12px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.22s ease, background 0.22s ease;
}

.hero-mini:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.14);
}

.mini-poster {
    min-height: 92px;
    border-radius: 14px;
    background-image: linear-gradient(145deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.42)), var(--poster);
    background-size: cover;
    background-position: center;
}

.hero-mini strong {
    display: block;
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.hero-mini span {
    display: block;
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 13px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 5;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrows {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
}

.hero-dots {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

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

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

.section {
    margin-top: 34px;
    padding: 30px;
    border-radius: var(--radius-xl);
    background: var(--card);
    box-shadow: var(--shadow);
}

.section.gradient-blue {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.section.gradient-purple {
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.section.gradient-green {
    color: #ffffff;
    background: linear-gradient(135deg, #22c55e, #2563eb);
}

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--text-soft);
    line-height: 1.75;
}

.gradient-blue .section-desc,
.gradient-purple .section-desc,
.gradient-green .section-desc {
    color: rgba(255, 255, 255, 0.82);
}

.more-link {
    flex: none;
    color: var(--orange);
    font-weight: 900;
}

.gradient-blue .more-link,
.gradient-purple .more-link,
.gradient-green .more-link {
    color: #ffffff;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.poster-link {
    display: block;
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 2.85;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.78)),
        var(--poster);
    background-size: cover;
    background-position: center;
}

.poster::after {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    content: "";
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent);
}

.poster-badge,
.poster-type {
    position: absolute;
    z-index: 2;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
}

.poster-badge {
    left: 12px;
}

.poster-type {
    right: 12px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.92), rgba(220, 38, 38, 0.92));
}

.poster-score {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 2;
    color: #fed7aa;
    font-weight: 950;
    text-shadow: 0 2px 8px rgba(2, 6, 23, 0.45);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: -webkit-box;
    min-height: 45px;
    margin: 0;
    overflow: hidden;
    color: #172033;
    font-size: 16px;
    font-weight: 950;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-line {
    display: -webkit-box;
    margin-top: 9px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    background: #f1f5f9;
}

.gradient-blue .movie-card,
.gradient-purple .movie-card,
.gradient-green .movie-card {
    background: rgba(255, 255, 255, 0.97);
}

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

.category-card {
    position: relative;
    min-height: 158px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(124, 58, 237, 0.5)),
        var(--poster);
    background-size: cover;
    background-position: center;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
    transition: transform 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-card-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
}

.category-card h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 950;
}

.category-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.65;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    transition: transform 0.22s ease, background 0.22s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: #eef2ff;
}

.rank-no {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.rank-info strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 950;
}

.rank-info span {
    display: block;
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 13px;
}

.rank-score {
    color: #f97316;
    font-weight: 950;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
    margin: 22px 0;
}

.filter-panel input,
.filter-panel select,
.search-hero input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 15px;
    outline: none;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-hero input:focus {
    border-color: rgba(249, 115, 22, 0.72);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: var(--radius-lg);
    color: var(--text-soft);
    background: #ffffff;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.page-hero {
    margin-top: 34px;
    padding: 42px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.62)),
        var(--poster);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #dbeafe;
    line-height: 1.82;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #fed7aa;
    font-size: 14px;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) 360px;
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.34);
    cursor: pointer;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle at center, rgba(249, 115, 22, 0.18), rgba(2, 6, 23, 0.62)),
        linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.82));
    text-align: center;
}

.play-overlay span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 32px;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.32);
}

.play-overlay strong {
    display: block;
    font-size: 22px;
    font-weight: 950;
}

.play-overlay em {
    display: block;
    color: #cbd5e1;
    font-style: normal;
}

.player-shell.is-playing .play-overlay {
    display: none;
}

.detail-card {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.detail-meta {
    display: grid;
    gap: 10px;
}

.detail-meta div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
}

.detail-meta strong {
    color: var(--text-main);
}

.detail-text {
    line-height: 1.9;
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
}

.detail-text p {
    margin: 0 0 16px;
    color: #334155;
}

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

.search-hero {
    margin-top: 34px;
    padding: 36px;
    border-radius: var(--radius-xl);
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #334155);
    box-shadow: var(--shadow);
}

.search-hero h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.search-hero p {
    max-width: 760px;
    margin: 12px 0 22px;
    color: #cbd5e1;
    line-height: 1.8;
}

.site-footer {
    margin-top: 44px;
    padding: 34px 0;
    color: #94a3b8;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px;
}

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

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

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

    .search-box input {
        width: 190px;
    }

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

    .hero-panel {
        display: none;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        height: auto;
        min-height: 66px;
        padding: 10px 0;
    }

    .brand {
        min-width: 0;
    }

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

    .brand-subtitle {
        display: none;
    }

    .header-actions .search-box {
        display: none;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-content {
        min-height: 570px;
    }

    .hero-content {
        padding: 70px 0 70px;
    }

    .hero-summary {
        font-size: 16px;
    }

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

    .section {
        padding: 22px;
    }

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

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

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: 30px 22px;
    }

    .rank-item {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 2;
    }
}

@media (max-width: 460px) {
    .container,
    .header-inner,
    .hero-content,
    .hero-controls,
    .footer-inner,
    .mobile-panel-inner {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-arrow {
        width: 40px;
        height: 40px;
    }

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