* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #161823;
  --bg2: #1c1e2a;
  --bg3: #242634;
  --line: rgba(255,255,255,.08);
  --txt: #f0f2f5;
  --txt2: #9499a8;
  --red: #fe2c55;
  --cyan: #25f4ee;
  --gold: #ffb800;
  --blue: #4ea6ff;
  --green: #2ecc71;
  --radius: 10px;
}
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  overflow: hidden;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
.ic { display: inline-block; vertical-align: middle; }

#app { height: 100vh; display: flex; flex-direction: column; }

#topbar {
  height: 60px; flex: none; display: flex; align-items: center;
  padding: 0 20px; background: var(--bg); position: relative; z-index: 30;
  border-bottom: 1px solid var(--line);
}
.topbar-left { flex: 1; display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.logo svg { color: var(--red); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 20px; letter-spacing: 2px; }
.logo-text small { font-size: 10px; color: var(--txt2); letter-spacing: 3px; }
.topbar-center { flex: none; width: 420px; }
.search-box {
  display: flex; align-items: center; gap: 8px; height: 38px;
  background: var(--bg3); border-radius: 19px; padding: 0 16px;
  border: 1px solid transparent;
}
.search-box:focus-within { border-color: rgba(255,255,255,.25); }
.search-ico { color: var(--txt2); display: flex; cursor: pointer; }
.search-box input { flex: 1; background: none; border: none; color: var(--txt); font-size: 14px; }
.search-box input::placeholder { color: var(--txt2); }
.topbar-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.tb-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: 8px; color: var(--txt2); font-size: 11px;
}
.tb-item:hover { background: rgba(255,255,255,.08); color: var(--txt); }
.badge {
  position: absolute; top: 0; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff; font-size: 10px; font-style: normal;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
}
.avatar-item { padding: 4px; }
.avatar-item .avatar { cursor: pointer; }

#main { flex: 1; display: flex; min-height: 0; }

#sidenav {
  width: 200px; flex: none; padding: 12px 8px; display: flex; flex-direction: column;
  border-right: 1px solid var(--line); overflow-y: auto; position: relative; z-index: 2;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; color: var(--txt2); font-size: 15px; cursor: pointer; user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: var(--txt); }
.nav-item.active { color: var(--red); background: rgba(254,44,85,.12); font-weight: 600; }
.nav-pin {
  margin-left: auto; width: 20px; height: 20px; border-radius: 4px; border: none;
  background: transparent; color: var(--txt3); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 10px; flex: none;
  transition: color .2s;
}
.nav-pin:hover { color: var(--red); background: rgba(254,44,85,.15); }
.nav-pin.active { color: var(--red); }
.nav-dot {
  width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: #fff; flex: none;
}
.nav-ico { width: 22px; display: flex; justify-content: center; flex: none; }
.nav-foot { margin-top: auto; padding: 12px; font-size: 11px; color: var(--txt2); line-height: 1.8; text-align: center; }

#content { flex: 1; position: relative; min-width: 0; background: #0e0f16; }
.page { position: absolute; inset: 0; }
.page-scroll { position: absolute; inset: 0; overflow-y: auto; padding: 24px 32px 48px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head h2 { font-size: 20px; }
.page-head .sub { color: var(--txt2); font-size: 13px; margin-left: 12px; }

#feedViewport { position: absolute; inset: 0; overflow: hidden; }
#feedSlides { position: absolute; inset: 0; transition: transform .45s cubic-bezier(.22,.61,.36,1); }
#feedSlides.no-anim { transition: none; }
.slide { position: absolute; left: 0; right: 0; height: 100%; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 18px 90px 18px 24px; }
.stage-col { height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: calc(100% - 120px); }
.stage {
  position: relative; flex: 1; min-height: 0; border-radius: 12px; overflow: hidden;
  background: #000; box-shadow: 0 8px 40px rgba(0,0,0,.5); cursor: pointer;
}
.stage video {
  width: 100%; height: 100%; object-fit: contain; display: block;
  margin: auto; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
}
.center-flash {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(.6);
  color: rgba(255,255,255,.9); opacity: 0; pointer-events: none; transition: all .25s;
}
.center-flash.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.heart-burst {
  position: absolute; transform: translate(-50%,-50%) scale(0); color: var(--red);
  pointer-events: none; z-index: 3;
  animation: heartBurst .7s ease-out forwards;
}
.heart-burst .ic { fill: var(--red); filter: drop-shadow(0 2px 6px rgba(254,44,85,.5)); }
@keyframes heartBurst {
  0% { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  25% { transform: translate(-50%,-50%) scale(1.2); opacity: 1; }
  60% { transform: translate(-50%,-55%) scale(.9); opacity: 1; }
  100% { transform: translate(-50%,-75%) scale(1); opacity: 0; }
}
.stage-ctrl {
  position: absolute; left: 12px; bottom: 14px; display: flex; align-items: center; gap: 12px;
  opacity: 0; transition: opacity .2s;
}
.stage:hover .stage-ctrl { opacity: 1; }
.ctrl-btn { color: #fff; opacity: .9; display: flex; cursor: pointer; background: none; border: none; padding: 4px; }
.ctrl-btn:hover { opacity: 1; }
.fullscreen-btn { margin-left: 4px; }
.volume-wrap { display: flex; align-items: center; gap: 8px; }
.volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.3); outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.volume-slider::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; cursor: pointer; border: none;
}
.speed-wrap { position: relative; }
.speed-btn {
  padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,.4); color: #fff;
  font-size: 12px; font-weight: 600; min-width: 42px;
}
.speed-btn:hover { background: rgba(254,44,85,.8); }
.speed-menu {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  margin-bottom: 8px; background: rgba(30,32,44,.95);
  border-radius: 8px; padding: 4px; min-width: 100px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.4); backdrop-filter: blur(10px);
}
.speed-item {
  padding: 8px 14px; cursor: pointer; border-radius: 6px;
  font-size: 13px; color: var(--txt); text-align: center;
  transition: background .15s;
}
.speed-item:hover { background: rgba(255,255,255,.1); }
.speed-item.active { background: var(--red); color: #fff; font-weight: 600; }

.time-label { color: rgba(255,255,255,.85); font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12px; cursor: pointer;
  display: flex; align-items: flex-end;
}
.progress::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.22); }
.progress-fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--red); z-index: 1; }
.progress:hover .progress-fill, .progress.scrubbing .progress-fill { height: 5px; }
.video-info { flex: none; max-width: 100%; padding: 0 4px; }
.vi-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-sub { color: var(--txt2); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.vi-tag { background: rgba(255,255,255,.1); padding: 1px 8px; border-radius: 4px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.vi-cat-ico { display: inline-flex; vertical-align: middle; color: var(--txt2); }
.cat-ico { color: var(--red); }

.side-bar { display: flex; flex-direction: column; align-items: center; gap: 20px; flex: none; }
.sb-avatar { position: relative; }
.avatar { border-radius: 50%; object-fit: cover; display: block; background: var(--bg3); }
.avatar.letter { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.follow-plus {
  position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.follow-plus:hover { background: #ff4d6e; }
.sb-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #dcdde4; }
.sb-btn:hover { color: #fff; }
.sb-btn.like.active { color: var(--red); }
.sb-btn.like.active .ic { fill: var(--red); }
.sb-btn.fav.active { color: var(--gold); }
.sb-btn.fav.active .ic { fill: var(--gold); }
.sb-btn.later.active { color: var(--blue); }
.sb-count { font-size: 11px; color: var(--txt2); }

.feed-nav-btns {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 5;
}
.feed-nav-btns button {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.feed-nav-btns button:hover { background: rgba(255,255,255,.2); }

#commentDrawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 380px; z-index: 10;
  background: var(--bg2); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column;
}
#commentDrawer.open { transform: translateX(0); }
.cd-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cd-title { font-weight: 600; }
.cd-title i { font-style: normal; color: var(--txt2); font-size: 12px; }
.cd-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 14px; }
.cd-item { display: flex; gap: 10px; }
.cd-body { flex: 1; min-width: 0; }
.cd-name { font-size: 12px; color: var(--txt2); margin-bottom: 3px; display: flex; justify-content: space-between; }
.cd-text { word-break: break-all; line-height: 1.5; }
.cd-del { color: var(--txt2); font-size: 12px; cursor: pointer; flex: none; }
.cd-del:hover { color: var(--red); }
.cd-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.cd-input input { flex: 1; height: 36px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg3); color: var(--txt); padding: 0 14px; }

.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--txt2); z-index: 4; background: rgba(14,15,22,.6); }
.empty .empty-ico { color: var(--txt2); opacity: .6; }
.empty p { font-size: 15px; }
.empty.in-panel { position: static; background: none; padding: 60px 0; }

.btn { padding: 8px 18px; border-radius: 8px; font-size: 14px; background: var(--bg3); color: var(--txt); border: 1px solid var(--line); }
.btn:hover { border-color: rgba(255,255,255,.3); }
.btn-primary { padding: 8px 18px; border-radius: 8px; font-size: 14px; background: var(--red); color: #fff; }
.btn-primary:hover { background: #ff4d6e; }
.btn-danger { background: rgba(254,44,85,.15); color: var(--red); border: 1px solid rgba(254,44,85,.4); }
.btn-danger:hover { background: rgba(254,44,85,.3); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card { background: var(--bg2); border-radius: var(--radius); overflow: hidden; cursor: pointer; border: 1px solid transparent; }
.card:hover { border-color: rgba(255,255,255,.15); }
.thumb-wrap { position: relative; height: 118px; background: #000; }
.thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--txt2); height: 100%; }
.play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.3); color: #fff; opacity: 0; transition: opacity .2s;
}
.card:hover .play-overlay { opacity: 1; }
.card-body { padding: 10px 12px 12px; }
.card-title { font-size: 14px; line-height: 1.4; height: 39px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-sub { color: var(--txt2); font-size: 12px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { margin-top: 8px; display: flex; gap: 8px; }

/* 首页热度榜 */
.home-card .thumb-wrap { position: relative; }
.hot-badge { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; z-index: 2; }
.hot-badge.hot-1 { background: linear-gradient(135deg, #FF6B6B, #FF4757); }
.hot-badge.hot-2 { background: linear-gradient(135deg, #FFA502, #FF7F50); }
.hot-badge.hot-3 { background: linear-gradient(135deg, #FFD93D, #F9CA24); color: #333; }
.hot-badge.hot-n { background: rgba(0,0,0,.5); color: #ccc; }
.hot-stats { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.hot-stat { display: flex; align-items: center; gap: 3px; color: var(--txt2); font-size: 12px; }
.hot-stat svg { color: var(--txt2); }
.hot-score { margin-left: auto; color: #FE2C55; font-size: 12px; font-weight: 600; }

/* PWA 安装按钮 */
.tb-item.pwa-installable { position: relative; }
.tb-item.pwa-installable::after {
  content: 'NEW';
  position: absolute;
  top: 4px;
  right: 4px;
  background: #FE2C55;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  line-height: 1.4;
}

.mine-layout { position: absolute; inset: 0; display: flex; }
.mine-menu { width: 190px; flex: none; border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 8px; color: var(--txt2); cursor: pointer; font-size: 15px; }
.menu-item:hover { background: rgba(255,255,255,.07); color: var(--txt); }
.menu-item.active { color: var(--red); background: rgba(254,44,85,.12); font-weight: 600; }
.mine-content { flex: 1; overflow-y: auto; padding: 24px 28px; }
.mine-content h3 { margin-bottom: 16px; font-size: 17px; }

.panel-section { background: var(--bg2); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel-section h4 { margin-bottom: 12px; font-size: 15px; }
.tip { color: var(--txt2); font-size: 12px; line-height: 1.8; }
.stat-row { display: flex; gap: 24px; color: var(--txt2); font-size: 13px; margin-bottom: 12px; }
.stat-row b { color: var(--txt); }

.series-card { display: flex; align-items: center; gap: 14px; background: var(--bg2); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
.series-info { flex: 1; min-width: 0; }
.series-name { font-size: 15px; font-weight: 600; }
.series-sub { color: var(--txt2); font-size: 12px; margin-top: 4px; }
.series-acts { display: flex; gap: 8px; }

.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab { padding: 7px 18px; border-radius: 8px; background: var(--bg2); color: var(--txt2); font-size: 14px; }
.tab.active { background: var(--red); color: #fff; }

.sub-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.sub-tab { padding: 6px 14px; border-radius: 6px; background: transparent; color: var(--txt2); font-size: 13px; }
.sub-tab.active { background: var(--bg3); color: var(--txt); font-weight: 600; }

.url-badge { display: inline-block; padding: 1px 6px; background: rgba(46,204,113,.15); color: #2ecc71; border-radius: 4px; font-size: 11px; }

.card-panel { background: var(--bg2); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.card-panel h3 { font-size: 16px; margin-bottom: 16px; }
.form-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.form-row label { width: 70px; flex: none; color: var(--txt2); }
.form-row input[type="text"], .form-row select, .form-row textarea {
  flex: 1; max-width: 420px; height: 38px; background: var(--bg3); border: 1px solid var(--line);
  border-radius: 8px; color: var(--txt); padding: 0 12px; font-size: 14px;
}
.form-row textarea {
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}
.form-row select option { background: var(--bg2); }
.file-name { color: var(--txt2); font-size: 13px; }

.row { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--bg2); border-radius: var(--radius); margin-bottom: 10px; }
.row-thumb { width: 96px; height: 56px; border-radius: 6px; object-fit: cover; background: #000; flex: none; }
.row-thumb.thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--txt2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--txt2); font-size: 12px; margin-top: 4px; }
.row-acts { display: flex; gap: 8px; flex: none; }

.search-head { margin-bottom: 18px; font-size: 16px; color: var(--txt2); }
.search-head b { color: var(--txt); font-size: 18px; margin: 0 4px; }

#panelOverlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
#sidePanel {
  position: fixed; top: 60px; right: 0; bottom: 0; width: 480px; z-index: 41;
  background: var(--bg2); border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(0,0,0,.4);
  transform: translateX(100%); transition: transform .28s ease; display: flex; flex-direction: column;
}
#sidePanel.open { transform: translateX(0); }
#sidePanel.wide { width: 780px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; flex: none; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 20px; }

.notif { display: flex; gap: 12px; padding: 13px 12px; border-radius: 10px; margin-bottom: 6px; }
.notif.unread { background: rgba(254,44,85,.08); }
.notif-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--red); flex: none; }
.notif-text { line-height: 1.5; }
.notif-time { color: var(--txt2); font-size: 12px; margin-top: 4px; }

.msg-layout { flex: 1; display: flex; min-height: 0; }
.conv-list { width: 220px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.conv-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; position: relative; }
.conv-item:hover { background: rgba(255,255,255,.06); }
.conv-item.active { background: rgba(254,44,85,.12); }
.conv-mid { flex: 1; min-width: 0; }
.conv-name { font-size: 14px; font-weight: 600; }
.conv-preview { font-size: 12px; color: var(--txt2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.conv-badge { min-width: 16px; height: 16px; padding: 0 4px; background: var(--red); color: #fff; font-size: 10px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.chat-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head { padding: 13px 18px; border-bottom: 1px solid var(--line); font-weight: 600; flex: none; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 75%; padding: 9px 13px; border-radius: 12px; line-height: 1.5; word-break: break-all; }
.bubble.them { align-self: flex-start; background: var(--bg3); border-top-left-radius: 4px; }
.bubble.me { align-self: flex-end; background: var(--red); color: #fff; border-top-right-radius: 4px; }
.chat-input { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); flex: none; }
.chat-input input { flex: 1; height: 38px; border-radius: 19px; background: var(--bg3); border: 1px solid var(--line); color: var(--txt); padding: 0 16px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal { background: var(--bg2); border-radius: 14px; min-width: 360px; max-width: 560px; box-shadow: 0 12px 50px rgba(0,0,0,.5); }
.modal-head { padding: 16px 20px 0; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 20px; }
.modal-foot { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 10px; }
.modal input[type="text"] { width: 100%; height: 38px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; color: var(--txt); padding: 0 12px; }
.share-row { display: flex; gap: 8px; margin-bottom: 14px; }
.share-row input { flex: 1; height: 38px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; color: var(--txt); padding: 0 12px; font-size: 13px; }

#toastRoot { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast { background: rgba(30,32,44,.95); color: #fff; padding: 10px 22px; border-radius: 20px; font-size: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.4); animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.game-wrap { max-width: 720px; margin: 0 auto; }
.game-hero { text-align: center; padding: 48px 30px; }
.game-hero .gh-ico { color: var(--cyan); margin-bottom: 14px; }
.game-hero h2 { font-size: 24px; margin-bottom: 10px; }
.game-hero p { color: var(--txt2); margin-bottom: 24px; line-height: 1.8; }
.game-best { margin-top: 18px; color: var(--txt2); font-size: 13px; }
.game-modal { width: 640px; max-width: 92vw; }
.game-head { display: flex; align-items: center; gap: 22px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.game-target { flex: 1; font-size: 15px; }
.game-target b { color: var(--cyan); font-size: 22px; margin-left: 4px; }
.game-stat { color: var(--txt2); font-size: 13px; }
.game-stat b { color: var(--txt); font-size: 17px; }
.game-area { position: relative; height: 400px; background: #0e0f16; border-radius: 0 0 14px 14px; overflow: hidden; }
.g-bubble {
  position: absolute; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; cursor: pointer; user-select: none;
  animation: bubbleIn .2s ease; transition: transform .1s;
}
.g-bubble:hover { transform: scale(1.08); }
.g-bubble.pop { animation: bubblePop .18s ease forwards; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes bubblePop { to { opacity: 0; transform: scale(1.6); } }
.game-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(14,15,22,.85); z-index: 2; }
.game-center .go-score { font-size: 40px; font-weight: 800; color: var(--cyan); }

.icon-btn { color: var(--txt2); display: flex; padding: 4px; border-radius: 6px; }
.icon-btn:hover { color: var(--txt); background: rgba(255,255,255,.08); }
.link-btn { color: var(--blue); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
/* ===== 系列卡片（feed 系列级滚动） ===== */
.series-slide { position: absolute; left: 0; right: 0; height: 100%; display: flex; gap: 20px; padding: 18px 90px 18px 24px; }
.series-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; max-width: calc(100% - 360px); }
.series-right { width: 260px; flex: none; display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }

.series-head { display: flex; align-items: center; gap: 12px; flex: none; }
.series-head .avatar-col { position: relative; flex: none; cursor: pointer; }
.series-head .info-col { flex: 1; min-width: 0; }
.series-head .s-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.series-head .s-sub { color: var(--txt2); font-size: 12px; }
.series-head .follow-btn {
  flex: none; padding: 5px 14px; border-radius: 16px; background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600;
}
.series-head .follow-btn.followed { background: var(--bg3); color: var(--txt2); border: 1px solid var(--line); }

.series-thumbs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.series-thumb-item {
  display: flex; gap: 10px; padding: 6px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.04); transition: background .15s;
}
.series-thumb-item:hover { background: rgba(255,255,255,.08); }
.series-thumb-item.active { background: rgba(254,44,85,.15); }
.series-thumb-item .t-thumb { width: 96px; height: 54px; flex: none; border-radius: 6px; overflow: hidden; background: #000; }
.series-thumb-item .t-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.series-thumb-item .t-thumb .thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--txt2); height: 100%; }
.series-thumb-item .t-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.series-thumb-item .t-title { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.series-thumb-item .t-meta { color: var(--txt2); font-size: 11px; margin-top: 4px; }

.series-side-bar { display: flex; flex-direction: column; align-items: center; gap: 20px; flex: none; }


/* ===== 选集栏 ===== */
.episode-bar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex: none;
}
.ep-label {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: var(--txt2);
  background: var(--bg3);
  border-radius: 6px;
  font-weight: 600;
}
.ep-list {
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
  scrollbar-width: thin;
}
.ep-item {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg3);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  border: 1px solid transparent;
}
.ep-item:hover { background: rgba(255,255,255,.12); }
.ep-item.active {
  background: rgba(254,44,85,.15);
  border-color: var(--red);
  color: #fff;
}
.ep-num {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}
.ep-item.active .ep-num { color: #fff; }
.ep-title { font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* ===== 系列详情页 ===== */
.series-page-wrap { position: absolute; inset: 0; overflow-y: auto; }
.series-page-head {
  position: relative; padding: 36px 40px 28px; background: linear-gradient(180deg, rgba(254,44,85,.12), transparent);
  display: flex; align-items: center; gap: 24px;
}
.series-page-head .back-btn {
  position: absolute; top: 18px; left: 20px; display: flex; align-items: center; gap: 4px;
  color: var(--txt2); font-size: 14px; padding: 6px 10px; border-radius: 6px;
}
.series-page-head .back-btn:hover { background: rgba(255,255,255,.08); color: var(--txt); }
.series-page-head .sp-avatar { flex: none; }
.series-page-head .sp-info { flex: 1; min-width: 0; }
.series-page-head .sp-name { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.series-page-head .sp-meta { color: var(--txt2); font-size: 14px; margin-bottom: 14px; }
.series-page-head .sp-actions { display: flex; gap: 10px; }
.series-page-body { padding: 20px 40px 60px; }
.series-page-body h3 { font-size: 17px; margin-bottom: 14px; }

/* ===== 预设头像选择器 ===== */
.preset-avatar {
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preset-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}
.preset-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
}
.preset-picker .pp-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  padding: 2px;
}
.preset-picker .pp-item:hover {
  border-color: rgba(255,255,255,.2);
  transform: scale(1.08);
}
.preset-picker .pp-item.active {
  border-color: var(--red);
  background: rgba(254,44,85,.1);
}

/* ===== 简介文字 ===== */
.bio-text {
  color: var(--txt2);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 视频简介 ===== */
.vi-desc {
  color: var(--txt2);
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== VIP / 会员 ===== */
.vip-btn { position: relative; }
.vip-btn .vip-tag {
  position: absolute; top: -2px; right: -2px;
  background: linear-gradient(135deg,#ffd700,#ff8c00);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 1px 4px; border-radius: 4px;
  font-style: normal; line-height: 1.2;
}
.vip-btn.is-vip { color: var(--gold); }

/* ===== 云同步状态 ===== */
.sync-status {
  font-size: 11px; color: var(--txt2);
  display: flex; align-items: center; gap: 4px;
}
.sync-status.ok { color: var(--cyan); }

/* ===== 投稿 / 审核 ===== */
.earn-row { display: flex; gap: 12px; margin-bottom: 20px; }
.earn-card {
  flex: 1; background: var(--bg2); border-radius: var(--radius);
  padding: 16px 18px; border: 1px solid var(--line);
}
.earn-num { font-size: 22px; font-weight: 700; color: var(--gold); }
.earn-num.green { color: #3ddc84; }
.earn-num small { font-size: 13px; color: var(--txt2); font-weight: 400; }
.earn-label { color: var(--txt2); font-size: 12px; margin-top: 4px; }

.prog-wrap {
  height: 8px; background: var(--bg3); border-radius: 99px;
  overflow: hidden; margin-top: 14px;
}
.prog-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #fe2c55, #ff7847);
  border-radius: 99px; transition: width .2s;
}

.chip {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
}
.chip.gold { color: var(--gold); background: rgba(255,184,0,.12); }
.chip.green { color: #3ddc84; background: rgba(61,220,132,.12); }
.chip.red { color: var(--red); background: rgba(254,44,85,.12); }
.chip.cyan { color: var(--cyan); background: rgba(37,244,238,.1); }

.rev-thumb {
  width: 150px; height: 86px; flex: none;
  border-radius: 8px; object-fit: cover;
  background: #000; display: block;
}
.rev-thumb.thumb-empty { display: flex; align-items: center; justify-content: center; color: var(--txt2); background: var(--bg3); }

/* ===== 移动端顶部频道标签条（抖音式） ===== */
#mobileChanTabs {
  display: none; position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  padding: 8px 10px 34px; gap: 6px; overflow-x: auto; white-space: nowrap;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none;
}
#mobileChanTabs::-webkit-scrollbar { display: none; }
#mobileChanTabs button {
  pointer-events: auto; flex: none; padding: 5px 14px; border-radius: 99px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(4px); border: 1px solid transparent;
}
#mobileChanTabs button.active {
  background: #fff; color: #111;
}

/* ===== 移动端底部标签栏（抖音式） ===== */
#mobileTabs {
  display: none; position: fixed; left: 0; right: 0; bottom: 0;
  height: 54px; padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg); border-top: 1px solid var(--line); z-index: 45;
}
#mobileTabs button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--txt2); font-size: 11px; background: none;
}
#mobileTabs button.active { color: var(--red); }
#mobileTabs button.active svg { stroke-width: 2.2; }
#mobileTabs button.tab-big {
  position: relative; justify-content: center; color: var(--txt2);
}
#mobileTabs .tab-big { justify-content: flex-start; padding-top: 1px; }
#mobileTabs .tab-big .tab-cam-mask {
  width: 42px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, #fe2c55, #ff7847);
  display: flex; align-items: center; justify-content: center;
  color: #fff; border: 2px solid var(--bg); box-shadow: 0 2px 8px rgba(254,44,85,.4);
  margin-bottom: 2px;
}

.chan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.chan-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 6px; background: var(--bg3); border-radius: 10px;
  color: var(--txt); border: 1px solid transparent;
}
.chan-btn b { font-size: 14px; }
.chan-btn small { color: var(--txt2); font-size: 11px; }
.chan-btn:active { border-color: var(--red); }

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  #topbar { padding: 0 10px; }
  .topbar-center { flex: 1; width: auto; margin: 0 8px; }
  .search-box { padding: 0 10px; height: 34px; }
  .search-box input { font-size: 13px; }
  #btnClient, #btnVip { display: none; }
  .tb-item .tb-label { display: none; }
  .tb-item { padding: 6px 8px; }
  .logo-text b { font-size: 16px; letter-spacing: 1px; }
  .logo-text small { letter-spacing: 1.5px; }

  #sidenav { display: none; }
  #mobileTabs { display: flex; }
  #main { padding-bottom: 54px; }

  .page-scroll { padding: 14px 12px 32px; }
  .page-head h2 { font-size: 18px; }
  .page-head .sub { margin-left: 8px; font-size: 12px; }

  .series-slide { padding: 8px 56px 8px 10px; gap: 10px; }
  .feed-nav-btns { display: none; }
  #commentDrawer { width: 100%; right: 0; left: 0; top: auto; bottom: 0; height: 62vh; border-left: none; border-top: 1px solid var(--line); transform: translateY(105%); border-radius: 16px 16px 0 0; }
  #commentDrawer.open { transform: translateY(0); }

  .series-slide { flex-direction: column; padding: 46px 10px 8px; gap: 6px; }
  .series-left { max-width: 100%; width: 100%; flex: 1; gap: 8px; }
  .series-right { display: none; }
  .series-side-bar {
    position: absolute; right: 10px; bottom: 60px; gap: 16px; z-index: 4;
  }
  .series-side-bar .sb-btn svg { width: 26px; height: 26px; }
  .series-slide .video-info { order: 0; }
  .series-slide .episode-bar { order: 2; }
  .series-slide .stage { order: 1; }
  .ep-item { padding: 6px 10px; }
  .stage-ctrl { left: 8px; bottom: 8px; gap: 8px; }
  .volume-slider { width: 56px; }
  .hide-mob-labels { display: none; }

  #mobileChanTabs {
    display: flex !important;
  }

  .modal { min-width: 0; max-width: 92vw; width: 92vw; }
  .modal input[type="text"], .modal input[type="password"], .modal textarea { font-size: 16px; }

  .card-panel { padding: 14px; }
  .form-row { flex-wrap: wrap; }
  .form-row label { width: 100%; margin-bottom: 6px; }
  .form-row input, .form-row select, .form-row textarea { max-width: 100%; }
  .tabs { flex-wrap: wrap; gap: 6px; }

  .earn-row { flex-wrap: wrap; gap: 8px; }
  .earn-card { min-width: calc(50% - 4px); padding: 12px 14px; }
  .earn-num { font-size: 18px; }

  .row { flex-wrap: wrap; }
  .row-thumb { width: 110px; height: 64px; }
  .rev-thumb { width: 110px; height: 64px; }
  .row-acts { width: 100%; justify-content: flex-end; }

.chan-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 商城卡片（通用） */
.shop-card { cursor: pointer; }
.shop-price {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(254,44,85,.9); color: #fff;
  padding: 2px 10px; border-radius: 12px;
  font-size: 14px; font-weight: 700;
}
.shop-card .card-actions .btn-primary { background: #ff5000; }
.shop-card .card-actions .btn-primary:hover { background: #ff6a26; }

/* 广告覆盖层 */
.ad-overlay { transition: opacity .3s; }
.ad-overlay.hidden { display: none; opacity: 0; }
.ad-overlay:not(.hidden) { opacity: 1; }
.ad-skip .btn { font-size: 12px; padding: 6px 14px; border-radius: 20px; }
.ad-timer { text-shadow: 0 1px 3px rgba(0,0,0,.8); }
