:root {
    --brand: #f97316;
    --brand-dark: #ea580c;
    --pink: #ec4899;
    --red: #ef4444;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: #f9fafb;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.brand-text {
    background: linear-gradient(135deg, var(--brand), var(--pink));
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-weight: 700;
    color: #374151;
}

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

.nav-links a:hover {
    color: var(--brand);
}

.nav-search {
    width: 230px;
    position: relative;
}

.nav-search input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 18px;
    color: #374151;
    outline: none;
    background: white;
}

.nav-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.mobile-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    padding: 10px 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: white;
    padding: 14px 24px 22px;
}

.mobile-panel a {
    display: block;
    padding: 12px 8px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
}

.mobile-panel a:hover {
    background: #fff7ed;
    color: var(--brand);
}

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

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: linear-gradient(135deg, #fb923c, #ec4899 56%, #ef4444);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.25), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.22), transparent 26%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(17, 24, 39, 0.12));
}

.hero-inner {
    position: relative;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 46px;
    padding: 78px 0 84px;
}

.hero-badge,
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 800;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.section-badge {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--pink));
}

.hero h1 {
    max-width: 800px;
    margin: 22px 0 18px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.06;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-highlight {
    display: block;
    background: linear-gradient(135deg, #fef3c7, #fde047);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-text {
    max-width: 690px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(18px, 2.4vw, 24px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 28px 0;
}

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

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

.btn-primary {
    color: var(--brand);
    background: white;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.btn-gradient {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 14px 32px rgba(249, 115, 22, 0.28);
}

.btn-ghost {
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.82);
}

.btn-ghost:hover {
    color: var(--brand);
    background: white;
}

.hero-search-box {
    width: min(620px, 100%);
    display: flex;
    gap: 10px;
    margin-top: 28px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-search-box input {
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    outline: none;
    color: var(--ink);
}

.hero-search-box button {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    cursor: pointer;
}

.hero-stage {
    position: relative;
    min-height: 520px;
}

.hero-card {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: end;
    overflow: hidden;
    border-radius: 34px;
    background: #111827;
    box-shadow: 0 38px 85px rgba(15, 23, 42, 0.42);
    opacity: 0;
    transform: scale(0.94) translateY(26px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-card.is-active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 34%, rgba(17, 24, 39, 0.9));
}

.hero-card-content {
    position: relative;
    z-index: 2;
    padding: 30px;
}

.hero-card-content h2 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 950;
}

.hero-card-content p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    left: 30px;
    top: 30px;
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 26px;
    background: white;
}

.wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 70px;
    background: linear-gradient(180deg, transparent, #f9fafb);
}

.section {
    padding: 68px 0;
}

.section-white {
    background: white;
}

.section-soft {
    background: #f9fafb;
}

.section-glow {
    background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

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

.section-title h2,
.page-hero h1 {
    margin: 12px 0 6px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-title p,
.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-item {
    padding: 26px 20px;
    border-radius: 22px;
    text-align: center;
    background: white;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.feature-icon {
    width: 66px;
    height: 66px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 999px;
    color: var(--brand);
    background: linear-gradient(135deg, #ffedd5, #fce7f3);
    font-size: 30px;
}

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

.category-tile {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 26px;
    padding: 26px;
    color: white;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -42px;
    bottom: -42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 50px rgba(15, 23, 42, 0.22);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 950;
}

.category-tile p {
    position: relative;
    z-index: 2;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

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

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

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

.movie-card a {
    display: block;
    height: 100%;
    border-radius: 22px;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.55));
    opacity: 0.86;
}

.badge-year {
    position: absolute;
    z-index: 2;
    right: 10px;
    top: 10px;
    padding: 4px 9px;
    border-radius: 9px;
    color: white;
    background: rgba(249, 115, 22, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.badge-type {
    position: absolute;
    z-index: 2;
    left: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 9px;
    color: white;
    background: rgba(17, 24, 39, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.play-float {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--brand);
    background: rgba(255, 255, 255, 0.94);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    font-size: 22px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
}

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

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 7px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

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

.card-meta {
    margin: 0 0 8px;
    color: #6b7280;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.filter-card {
    margin: -28px auto 34px;
    position: relative;
    z-index: 4;
    padding: 20px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow);
}

.filter-form {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr auto;
    gap: 12px;
}

.filter-form input,
.filter-form select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 12px 14px;
    outline: none;
    color: #374151;
    background: white;
}

.filter-form input:focus,
.filter-form select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.page-hero {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    padding: 74px 0 86px;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 360px;
    height: 360px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.page-hero .container {
    position: relative;
    z-index: 2;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #6b7280;
    font-size: 14px;
    margin: 26px 0;
}

.breadcrumb a {
    color: var(--brand);
    font-weight: 800;
}

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

.detail-main,
.detail-side {
    min-width: 0;
}

.info-panel,
.content-panel,
.related-panel,
.rank-panel {
    border-radius: 28px;
    background: white;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.info-panel {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    padding: 26px;
}

.info-cover {
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.16);
}

.info-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.info-body h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.meta-list span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    color: #374151;
    background: #f3f4f6;
    font-size: 13px;
    font-weight: 800;
}

.info-summary {
    color: #4b5563;
    margin: 18px 0 22px;
}

.player-section {
    margin: 30px 0;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.72));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--brand);
    background: white;
    font-size: 34px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.play-overlay strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.play-overlay.is-hidden {
    display: none;
}

.content-panel {
    padding: 30px;
    margin-bottom: 30px;
}

.content-panel h2,
.related-panel h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 950;
}

.content-panel p {
    margin: 0 0 18px;
    color: #374151;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.related-panel {
    padding: 28px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

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

.side-card {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #f9fafb;
    transition: background 0.22s ease, transform 0.22s ease;
}

.side-card:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.side-card img {
    width: 82px;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
    background: #e5e7eb;
}

.side-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-card p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.rank-num {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    font-weight: 950;
}

.rank-item img {
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    object-fit: cover;
    background: #e5e7eb;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 950;
}

.rank-item p {
    margin: 0;
    color: #6b7280;
}

.empty-state {
    display: none;
    padding: 44px;
    border-radius: 24px;
    text-align: center;
    color: #6b7280;
    background: white;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.site-footer {
    color: white;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 52px 0 36px;
}

.footer-grid h3,
.footer-grid h4 {
    margin: 0 0 16px;
}

.footer-grid p,
.footer-grid a,
.footer-grid li {
    color: rgba(255, 255, 255, 0.72);
}

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 20px 0 28px;
    text-align: center;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 45;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--pink));
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.25);
    cursor: pointer;
}

.back-top.is-visible {
    display: inline-flex;
}

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-stage {
        min-height: 470px;
    }

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

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

    .detail-side {
        display: none;
    }
}

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

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

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

    .hero-inner {
        padding: 54px 0 70px;
    }

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

    .hero-stage {
        min-height: 420px;
    }

    .hero-search-box {
        border-radius: 28px;
        flex-direction: column;
    }

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

    .feature-grid,
    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

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

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

    .info-cover {
        max-width: 280px;
    }

    .rank-item {
        grid-template-columns: 38px 74px 1fr;
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }

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

@media (max-width: 520px) {
    .brand {
        font-size: 22px;
    }

    .hero-card-content {
        padding: 22px;
    }

    .feature-grid,
    .category-grid,
    .movie-grid,
    .movie-grid.compact,
    .related-grid {
        grid-template-columns: 1fr;
    }

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