/* Homepage only. Shared shell and other pages retain their existing appearance. */
.home-page {
  --home-bg: #07080d;
  --home-card: #12151f;
  --home-text: #f3f5fb;
  --home-muted: #a4abbe;
  --home-dim: #929aae;
  --home-line: rgba(255, 255, 255, .08);
  --home-line-strong: rgba(255, 255, 255, .14);
  --home-brand: #ff3b52;
  --home-gold: #ffc24b;
  --home-gradient: linear-gradient(135deg, #ff3b52, #ff7a45);
  background: var(--home-bg);
  color: var(--home-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: .1px;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
  scrollbar-color: #414960 var(--home-bg);
}
.home-page, .home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }
.home-page::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70vw 55vh at 82% -8%, rgba(139,92,255,.18), transparent 60%), radial-gradient(60vw 50vh at 6% 4%, rgba(34,211,238,.12), transparent 55%), radial-gradient(80vw 60vh at 50% 120%, rgba(255,59,82,.10), transparent 60%);
}
.home-page ::selection { background: #604493; color: #fff; }
.home-page a { color: inherit; text-decoration: none; }
.home-page button { font: inherit; cursor: pointer; }
.home-page svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home-page :is(h1,h2,h3,p) { margin: 0; }
.home-page :is(a,button,input):focus-visible { outline: 2px solid #b5a1ff; outline-offset: 4px; }
.home-page [hidden] { display: none !important; }
.home-wrap { max-width: 1220px; margin: 0 auto; padding: 0 16px; }
#homeContent { scroll-margin-top: 82px; }
.home-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.home-skip { position: fixed; left: 16px; top: -80px; z-index: 300; padding: 10px 16px; background: #29213e; border-radius: 8px; }
.home-skip:focus { top: 8px; }
.home-header { position: sticky; top: 0; z-index: 100; background: rgba(9,11,17,.7); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-bottom: 1px solid var(--home-line); }
.home-nav { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.home-logo { flex-shrink: 0; display: inline-flex; align-items: center; gap: 9px; color: var(--home-text); font-size: 22px; font-weight: 900; letter-spacing: .2px; white-space: nowrap; }
.home-logo-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--home-gradient); color: #fff; }
.home-logo-mark svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
.home-logo img { display: block; width: auto; height: 38px; max-width: 150px; object-fit: contain; }
.home-menu { display: flex; align-items: center; justify-content: center; flex: 1; min-width: 0; gap: clamp(4px, 1.5vw, 22px); flex-wrap: wrap; padding: 8px 0; }
.home-menu > a { padding: 7px 6px; border-radius: 10px; font-size: 14px; color: var(--home-muted); font-weight: 500; max-width: 100%; overflow-wrap: anywhere; white-space: normal; transition: background .18s, color .18s; }
.home-menu > a:hover { color: #fff; background: rgba(255,255,255,.07); }
.home-menu > a.is-current { color: #fff; background: var(--home-gradient); }
.home-menu-toggle, .home-menu > .home-mobile-account { display: none; }
.home-search { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid var(--home-line); }
.home-search svg { width: 19px; height: 19px; }
.home-search span { display: none; }
.home-search:hover { background: rgba(255,255,255,.1); border-color: var(--home-line-strong); }
.home-account { flex-shrink: 0; max-width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--home-gradient); color: #fff; border-radius: 20px; padding: 8px 16px; font-size: 13.5px; font-weight: 700; }
.home-intro { padding: 30px 0 6px; }
.home-intro h1 { font-size: 32px; font-weight: 900; letter-spacing: -.6px; line-height: 1.2; margin-bottom: 10px; text-wrap: balance; }
.home-intro h1 span { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.home-intro h1 .home-intro-emphasis { background: linear-gradient(135deg,#8b5cff,#22d3ee); background-clip: text; -webkit-background-clip: text; color: transparent; }
.home-intro p { color: var(--home-muted); font-size: 15px; line-height: 1.75; text-wrap: balance; }
.home-section { padding: 30px 0; scroll-margin-top: 82px; }
#homeRecommendTitle { scroll-margin-top: 100px; }
.home-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.home-section-head h2 { font-size: 23px; font-weight: 800; display: flex; align-items: center; gap: 11px; letter-spacing: -.3px; min-width: 0; overflow-wrap: anywhere; }
.home-section-head h2::before { content: ""; width: 4px; height: 20px; flex-shrink: 0; border-radius: 4px; background: var(--home-gradient); }
.home-section-head > a { color: var(--home-muted); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; flex-shrink: 0; }
.home-section-head > a:hover { color: #ff956b; }
.home-reel { display: flex; position: relative; overflow: hidden; padding: 12px 2px 16px; scrollbar-width: none; margin-top: 4px; }
.home-reel::-webkit-scrollbar { display: none; }
.home-reel-item { position: relative; flex: 1 1 0; min-width: 0; height: 460px; border-radius: 16px; overflow: hidden; cursor: pointer; z-index: 1; margin-left: -14px; border: 2px solid var(--home-line); background: var(--home-card); box-shadow: 0 16px 30px -12px rgba(0,0,0,.75); transition: flex-grow .45s cubic-bezier(.2,.7,.2,1), flex-basis .45s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s; }
.home-reel-item:first-child { margin-left: 0; }
.home-reel-item.is-active { flex: 0 0 320px; z-index: 5; border-color: var(--home-brand); box-shadow: 0 26px 50px -14px rgba(0,0,0,.9); }
.home-reel-item:focus-visible { outline-offset: -5px; }
.home-reel-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-reel-shade { position: absolute; inset: 0; background: linear-gradient(to top,rgba(0,0,0,.92),rgba(0,0,0,.2) 46%,transparent 72%); pointer-events: none; }
.home-reel-badge { position: absolute; top: 12px; left: 12px; z-index: 3; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 8px; color: #fff; }
.home-reel-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px; pointer-events: none; }
.home-reel-title { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.25; text-shadow: 0 2px 8px rgba(0,0,0,.7); overflow-wrap: anywhere; }
.home-reel-item:not(.is-active) .home-reel-title { font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-reel-desc { max-height: 0; opacity: 0; overflow: hidden; color: #e2e5ef; font-size: 13.5px; line-height: 1.65; transition: max-height .45s, opacity .35s, margin .45s; }
.home-reel-item.is-active .home-reel-desc { max-height: 48px; opacity: 1; margin: 10px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-reel-meta { display: flex; gap: 12px; max-height: 0; opacity: 0; overflow: hidden; font-size: 12.5px; font-weight: 700; color: var(--home-gold); transition: max-height .35s, opacity .35s; }
.home-reel-item.is-active .home-reel-meta { display: flex; gap: 12px; max-height: 26px; opacity: 1; }
.home-reel-single .home-reel-item.is-active { flex: 0 1 320px; }
.home-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 18px; }
.home-card { background: var(--home-card); border-radius: 16px; overflow: hidden; border: 1px solid var(--home-line); display: block; position: relative; min-width: 0; transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s; }
.home-poster { position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.home-cover { width: 100%; height: 100%; object-fit: cover; }
.home-cover-missing { color: var(--home-muted); font-size: 13px; position: absolute; inset: 0; display: grid; place-items: center; }
.home-image-error::after { content: "封面暂不可用"; color: var(--home-muted); font-size: 13px; position: absolute; top: 40%; left: 0; right: 0; text-align: center; }
.home-badge { position: absolute; top: 10px; right: 10px; z-index: 3; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 8px; color: #fff; }
.home-badge-new { background: linear-gradient(135deg,#2563ad,#087c96); }
.home-badge-hot { background: var(--home-gradient); }
.home-badge-free { background: #176349; color: #fff; }
.home-badge-vip { background: var(--home-gold); color: #1a1405; }
.home-episodes { position: absolute; bottom: 10px; left: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; z-index: 3; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; color: #fff; background: rgba(0,0,0,.65); }
.home-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.home-play svg { width: 56px; height: 56px; padding: 15px; border-radius: 50%; background: var(--home-gradient); fill: #fff; stroke: none; box-shadow: 0 8px 26px rgba(255,59,82,.35); }
.home-card-info { padding: 10px; }
.home-card-info h3 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-card-meta { min-height: 19px; justify-content: space-between; font-size: 11.5px; color: var(--home-dim); margin-top: 3px; display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.home-card-meta span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home-card-meta .home-heat { flex-shrink: 0; color: var(--home-gold); }
.home-rank { position: absolute; top: 0; left: 0; z-index: 4; font-size: 34px; font-weight: 900; font-style: italic; padding: 2px 12px; background: linear-gradient(180deg,rgba(0,0,0,.6),transparent); color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); font-variant-numeric: tabular-nums; }
.home-rank-1 { color: var(--home-gold); }
.home-rank-2 { color: #d9d9d9; }
.home-rank-3 { color: #ff9d5c; }
.home-empty { grid-column: 1 / -1; padding: 48px 24px; color: var(--home-muted); text-align: center; border: 1px solid var(--home-line); border-radius: 16px; background: var(--home-card); }
.home-empty p { color: var(--home-text); font-size: 16px; font-weight: 600; }
.home-empty > span { display: block; margin-top: 6px; font-size: 13px; }
.home-empty-recommend { min-height: 240px; display: flex; flex-direction: column; justify-content: center; }
.home-empty-page { margin: 36px 0 60px; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.home-empty h2 { color: var(--home-text); font-size: 23px; }
.home-empty > a { margin-top: 8px; padding: 10px 20px; background: var(--home-gradient); border-radius: 20px; color: #fff; font-weight: 600; }
.home-footer { border-top: 1px solid var(--home-line); margin-top: 50px; padding: 36px 0; color: var(--home-muted); font-size: 13px; }
.home-foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; margin-bottom: 24px; }
.home-foot-brand { flex: 1 1 300px; max-width: 420px; }
.home-foot-brand > p { margin-top: 12px; }
.home-foot-brand .home-address { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.home-address span { color: var(--home-gold); font-weight: 700; }
.home-address a { overflow-wrap: anywhere; }
.home-foot-col { flex: 0 1 180px; min-width: 100px; }
.home-foot-col h2 { color: var(--home-text); margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.home-foot-col > :is(a,p) { display: block; margin-bottom: 8px; overflow-wrap: anywhere; }
.home-footer a:hover { color: #ff956b; }
.home-foot-bottom { border-top: 1px solid var(--home-line); padding-top: 18px; text-align: center; line-height: 1.8; }
.home-tools { position: fixed; right: 22px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.home-tool { width: 54px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--home-line-strong); border-radius: 50%; background: #171b28; color: var(--home-text); box-shadow: 0 8px 20px -8px rgba(0,0,0,.7); }
.home-tool svg { width: 20px; height: 20px; }
.home-tool span { font-size: 9px; font-weight: 700; line-height: 1.2; }
@media (hover: hover) and (pointer: fine) {
  .home-card:hover { transform: translateY(-6px); border-color: var(--home-line-strong); box-shadow: 0 28px 70px -24px rgba(0,0,0,.75); }
  .home-card:hover .home-play { opacity: 1; }
}
.home-card:focus-visible .home-play { opacity: 1; }
@media (max-width: 1024px) {
  .home-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .home-nav { gap: 8px; }
  .home-menu > a { font-size: 13px; padding: 7px 5px; }
}
@media (max-width: 768px) {
  .home-nav { position: relative; justify-content: space-between; min-height: 54px; gap: 8px; flex-wrap: wrap; }
  .home-nav .home-logo { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); }
  .home-nav .home-logo { font-size: 20px; }
  .home-nav .home-logo-mark { width: 34px; height: 34px; }
  .home-nav .home-logo img { height: 30px; max-width: 132px; }
  .home-menu { order: 3; flex: 0 0 100%; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); padding: 12px 0; gap: 8px; }
  .home-enhanced .home-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100dvh - 54px); overflow-y: auto; padding: 16px; background: #10131e; border-bottom: 1px solid var(--home-line-strong); box-shadow: 0 16px 28px -16px #000; }
  .home-enhanced .home-menu.is-open { display: grid; }
  .home-menu > a { padding: 10px 6px; font-size: 14px; text-align: center; white-space: normal; }
  .home-menu > .home-mobile-account { display: block; grid-column: 1 / -1; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--home-line); }
  .home-menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: none; padding: 4px 8px; min-width: 44px; height: 48px; margin-left: -8px; color: #fff; }
  .home-menu-toggle span, .home-search span { display: block; font-size: 10px; font-weight: 600; color: var(--home-muted); line-height: 1; }
  .home-search { margin-left: auto; margin-right: -8px; flex-direction: column; gap: 2px; min-width: 44px; height: 48px; background: none; border: none; border-radius: 0; }
  .home-search svg { width: 22px; height: 22px; }
  .home-account { display: none; }
  .home-intro { padding: 20px 0 4px; }
  .home-intro h1 { font-size: 23px; }
  .home-intro p { font-size: 14px; }
  .home-section-head h2 { font-size: 19px; }
  .home-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
  .home-reel { overflow-x: auto; overscroll-behavior-x: contain; }
  .home-reel-item { flex: 0 0 74px; height: 360px; margin-left: -12px; }
  .home-reel-item.is-active { flex: 0 0 240px; }
  .home-reel-title { font-size: 17px; }
  .home-reel-item:not(.is-active) .home-reel-info { padding-left: 12px; padding-right: 12px; }
  .home-reel-single .home-reel-item.is-active { flex-basis: 240px; }
  .home-foot-brand { max-width: none; flex-basis: 100%; }
  .home-foot-col { flex: 1 1 calc(50% - 24px); }
  .home-tools { right: 12px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .home-tool { width: 48px; height: 48px; }
}
@media (max-width: 480px) { .home-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .home-page *, .home-page *::before, .home-page *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Footer: two category links per row, compact contact and policy columns. */
.home-foot-categories { flex-basis: 210px; }
.home-foot-category-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 16px; }
.home-foot-category-links a { overflow-wrap: anywhere; }
.home-foot-brand { max-width: 380px; }
.home-foot-contact { scroll-margin-top: 90px; }
@media(max-width:768px) { .home-foot-categories { flex-basis: 100%; } .home-foot-brand { max-width: none; } }
