/* ==========================================================================
   抖音网页版 · 个人页 / 发现 / 搜索 / 私信 / 通知 / 发布 / 创作者 / 设置 / 直播
   ========================================================================== */

/* ------------------------------------------------------------------ profile */
.profile-page { max-width: 1180px; margin: 0 auto; padding: 18px 34px 80px; }
.profile-cover {
  position: relative; height: 208px; border-radius: 20px; overflow: hidden;
  background: var(--bg-soft) center/cover no-repeat; border: 1px solid var(--line);
}
.profile-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,12,.12) 20%, rgba(8,8,12,.72) 100%); }
.profile-cover .cover-mask { position: absolute; inset: 0; backdrop-filter: blur(1px); }
.profile-head { display: flex; align-items: flex-end; gap: 24px; padding: 0 26px; margin-top: -52px; position: relative; z-index: 2; }
.profile-avatar-wrap { position: relative; flex: 0 0 auto; }
.profile-avatar-wrap .avatar.xl { width: 124px; height: 124px; border: 4px solid var(--bg-body); box-shadow: var(--shadow-md); }
.profile-avatar-wrap .live-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand); animation: pulse 1.8s infinite; }
.profile-info { flex: 1; min-width: 0; padding-bottom: 6px; }
.profile-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name { font-size: 28px; font-weight: 800; letter-spacing: -.4px; }
.profile-handle { color: var(--text-3); font-size: 13px; }
.profile-bio { color: var(--text-2); font-size: 13px; margin-top: 6px; max-width: 640px; line-height: 1.65; white-space: pre-wrap; }
.profile-meta-line { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin-top: 7px; flex-wrap: wrap; }
.profile-meta-line .icon { width: 14px; height: 14px; }
.profile-stats { display: flex; align-items: center; gap: 26px; margin-top: 12px; }
.profile-stat { display: flex; align-items: baseline; gap: 5px; cursor: default; }
.profile-stat b { font-size: 19px; font-weight: 800; font-family: var(--font-num); }
.profile-stat span { color: var(--text-3); font-size: 12px; }
.profile-actions { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.profile-tabs { display: flex; align-items: center; gap: 30px; margin-top: 22px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.profile-tab { position: relative; height: 48px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; font-weight: 600; }
.profile-tab:hover { color: var(--text); }
.profile-tab.active { color: var(--text); }
.profile-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }
.profile-tab .count { font-size: 11px; color: var(--text-3); }
.profile-body { padding: 22px 26px; min-height: 300px; }
.profile-body .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.profile-empty { padding: 70px 20px; }
.profile-empty .icon { width: 46px; height: 46px; color: var(--text-4); margin: 0 auto 12px; }
.profile-private { padding: 64px 20px; text-align: center; color: var(--text-3); }
.profile-private .icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--text-4); }

/* ------------------------------------------------------------------ explore */
.explore-page { max-width: 1240px; margin: 0 auto; padding: 22px 34px 80px; }
.explore-hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 40px 42px;
  background: radial-gradient(900px 300px at 12% 20%, rgba(254,44,85,.24), transparent 60%),
              radial-gradient(800px 300px at 88% 10%, rgba(37,244,238,.18), transparent 60%),
              linear-gradient(120deg, #1b1626, #12121b 55%, #101018);
  border: 1px solid var(--line-strong);
}
html[data-theme="light"] .explore-hero { background: radial-gradient(900px 300px at 12% 20%, rgba(254,44,85,.14), transparent 60%), radial-gradient(800px 300px at 88% 10%, rgba(37,244,238,.15), transparent 60%), linear-gradient(120deg, #fff, #f4f4fa); }
.explore-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -.6px; }
.explore-hero p { color: var(--text-2); margin-top: 8px; max-width: 620px; font-size: 13.5px; }
.explore-search { display: flex; align-items: center; gap: 8px; margin-top: 22px; max-width: 560px; }
.explore-search .input { height: 44px; flex: 1; }
.explore-hot-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.explore-hot-chips .chip { background: rgba(255,255,255,.06); }
.explore-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 24px; margin-top: 26px; align-items: start; }
.trend-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.trend-card h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.trend-card h3 .icon { width: 17px; height: 17px; color: var(--brand); }
.trend-list { margin-top: 12px; display: flex; flex-direction: column; }
.trend-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 9px; cursor: pointer; }
.trend-item:hover { background: var(--bg-soft); }
.trend-rank { width: 20px; font-size: 14px; font-weight: 800; color: var(--text-3); font-family: var(--font-num); text-align: center; }
.trend-item:nth-child(1) .trend-rank { color: var(--brand); }
.trend-item:nth-child(2) .trend-rank { color: #ff7a45; }
.trend-item:nth-child(3) .trend-rank { color: var(--gold); }
.trend-name { flex: 1; font-size: 13px; }
.trend-heat { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.trend-badge { font-size: 9px; color: #fff; background: var(--brand); border-radius: 3px; padding: 0 4px; line-height: 14px; }
.trend-badge.new { background: var(--cyan); color: #062a2a; }
.category-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }
.category-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.category-card .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ search */
.search-page { max-width: 1200px; margin: 0 auto; padding: 22px 34px 80px; }
.search-summary { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.search-summary h1 { font-size: 24px; font-weight: 800; }
.search-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 8px 0 20px; }
.search-tab { height: 44px; color: var(--text-3); font-size: 14px; font-weight: 600; position: relative; }
.search-tab:hover { color: var(--text); }
.search-tab.active { color: var(--text); }
.search-tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); border-radius: 3px 3px 0 0; }
.search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.search-users { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.user-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; }
.user-card:hover { border-color: var(--line-strong); background: var(--bg-soft); }
.user-card .avatar { width: 48px; height: 48px; }
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 14px; }
.user-card-meta { color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.music-list { display: flex; flex-direction: column; gap: 8px; }
.music-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--line); cursor: pointer; }
.music-row:hover { background: var(--bg-soft); }
.music-cover { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.music-info { flex: 1; min-width: 0; }
.music-title { font-size: 13px; font-weight: 600; }
.music-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.search-empty { padding: 70px 20px; text-align: center; color: var(--text-3); }

/* ------------------------------------------------------------------ messages */
.messages-page {
  height: calc(100vh - var(--topbar-h)); display: grid; grid-template-columns: 336px minmax(0, 1fr);
  overflow: hidden; background: var(--bg-body);
}
.conversation-pane { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: var(--bg-body); }
.conversation-head { flex: 0 0 auto; padding: 20px 20px 12px; }
.conversation-head h1 { font-size: 22px; font-weight: 800; }
.conversation-head p { color: var(--text-3); font-size: 12px; margin-top: 2px; }
.conversation-list { flex: 1; overflow-y: auto; padding: 4px 10px 20px; }
.conversation-item { display: flex; gap: 11px; padding: 11px 10px; border-radius: 12px; cursor: pointer; }
.conversation-item:hover { background: var(--bg-soft); }
.conversation-item.active { background: var(--bg-card); box-shadow: inset 0 0 0 1px var(--line); }
.conversation-item .avatar { width: 46px; height: 46px; }
.conversation-main { flex: 1; min-width: 0; }
.conversation-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.conversation-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-time { font-size: 10.5px; color: var(--text-4); flex: 0 0 auto; }
.conversation-last { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-unread { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10px; display: grid; place-items: center; margin-top: 4px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-body); }
.chat-head { flex: 0 0 auto; height: 64px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-body) 88%, transparent); }
.chat-peer { display: flex; align-items: center; gap: 10px; }
.chat-peer .avatar { width: 36px; height: 36px; }
.chat-peer-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.chat-peer-status { font-size: 10.5px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(43,214,123,.12); }
.chat-body { flex: 1; overflow-y: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.chat-date { align-self: center; font-size: 10.5px; color: var(--text-4); padding: 3px 8px; border-radius: 99px; background: var(--bg-soft); }
.msg-row { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.msg-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-row .avatar { width: 30px; height: 30px; }
.msg-bubble { padding: 9px 13px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--line); font-size: 13px; line-height: 1.55; word-break: break-word; white-space: pre-wrap; }
.msg-row.mine .msg-bubble { background: var(--brand); border-color: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg-row:not(.mine) .msg-bubble { border-bottom-left-radius: 4px; }
.msg-video-card { width: 220px; border-radius: 12px; overflow: hidden; background: var(--bg-soft); border: 1px solid var(--line); cursor: pointer; }
.msg-video-card img { width: 100%; aspect-ratio: 9/16; object-fit: cover; }
.msg-video-info { padding: 8px 10px; font-size: 11.5px; color: var(--text-2); }
.msg-time { font-size: 9.5px; color: var(--text-4); margin: 0 4px; }
.chat-composer { flex: 0 0 auto; padding: 12px 18px 16px; border-top: 1px solid var(--line); background: var(--bg-body); }
.chat-input-wrap { background: var(--bg-input); border: 1px solid var(--line); border-radius: 14px; padding: 8px 11px; }
.chat-input-wrap:focus-within { border-color: var(--line-strong); }
.chat-input { width: 100%; min-height: 40px; max-height: 130px; border: 0; outline: 0; resize: none; background: transparent; font-size: 13px; line-height: 1.55; }
.chat-tools { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.chat-tools-left { display: flex; align-items: center; gap: 2px; }
.chat-send { height: 32px; padding: 0 16px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; }
.chat-send[disabled] { opacity: .4; }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); }
.chat-empty .icon { width: 54px; height: 54px; color: var(--text-4); }
.chat-empty h3 { color: var(--text-2); font-size: 15px; }
.chat-empty p { font-size: 12px; }
.chat-placeholder { border-left: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--text-3); }

/* ------------------------------------------------------------------ notifications */
.notifications-page { max-width: 900px; margin: 0 auto; padding: 24px 34px 80px; }
.notice-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.notice-head h1 { font-size: 24px; font-weight: 800; }
.notice-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.notice-list { display: flex; flex-direction: column; gap: 6px; }
.notice-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; }
.notice-item.unread { border-color: rgba(254,44,85,.24); background: linear-gradient(90deg, rgba(254,44,85,.06), var(--bg-card) 45%); }
.notice-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; color: var(--brand); background: var(--brand-soft); }
.notice-icon.comment { color: var(--cyan); background: var(--cyan-soft); }
.notice-icon.follow { color: var(--green); background: rgba(43,214,123,.12); }
.notice-icon.system { color: var(--gold); background: rgba(255,176,32,.12); }
.notice-icon .icon { width: 19px; height: 19px; }
.notice-main { flex: 1; min-width: 0; }
.notice-title { font-size: 13.5px; line-height: 1.55; }
.notice-title b { font-weight: 700; }
.notice-time { font-size: 11px; color: var(--text-4); margin-top: 3px; }
.notice-thumb { width: 46px; height: 62px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.notice-media { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 8px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ upload */
.upload-page { max-width: 960px; margin: 0 auto; padding: 26px 34px 80px; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 24px; align-items: start; }
.upload-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.dropzone {
  position: relative; aspect-ratio: 9 / 16; max-height: 520px; border: 2px dashed var(--line-strong);
  border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-3); cursor: pointer; background: var(--bg-soft); overflow: hidden;
  transition: border-color .2s var(--ease), background .2s var(--ease); text-align: center; padding: 20px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--text-2); }
.dropzone .drop-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--bg-elev); display: grid; place-items: center; color: var(--brand); box-shadow: var(--shadow-sm); }
.dropzone .drop-icon .icon { width: 28px; height: 28px; }
.dropzone b { color: var(--text); font-size: 15px; }
.dropzone small { font-size: 11.5px; line-height: 1.6; }
.dropzone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.dropzone.has-file { border-style: solid; border-color: var(--line-strong); background: #000; }
.dropzone .replace-file { position: absolute; right: 10px; top: 10px; z-index: 2; }
.cover-strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; }
.cover-choice { position: relative; width: 58px; height: 88px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; flex: 0 0 auto; background: var(--bg-soft); }
.cover-choice img { width: 100%; height: 100%; object-fit: cover; }
.cover-choice.active { border-color: var(--brand); }
.cover-choice.active::after { content: "✓"; position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 10px; display: grid; place-items: center; }
.upload-form { display: flex; flex-direction: column; gap: 16px; }
.upload-form .textarea { min-height: 132px; }
.tag-editor { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-editor .tag-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px; border-radius: 7px; background: var(--cyan-soft); color: var(--cyan); font-size: 12px; }
.tag-editor .tag-chip button { color: inherit; display: grid; place-items: center; }
.tag-editor input { flex: 1; min-width: 100px; border: 0; outline: 0; background: transparent; font-size: 12.5px; padding: 4px 0; }
.upload-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.upload-progress { height: 5px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), #ff7a5c); transition: width .2s var(--ease); }
.upload-tip { font-size: 11.5px; color: var(--text-3); line-height: 1.65; }
.upload-success { text-align: center; padding: 20px; }
.upload-success .ok-icon { width: 64px; height: 64px; border-radius: 50%; background: rgba(43,214,123,.12); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }
.upload-success .ok-icon .icon { width: 30px; height: 30px; }

/* ------------------------------------------------------------------ creator */
.creator-page { max-width: 1240px; margin: 0 auto; padding: 24px 34px 80px; }
.creator-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--brand-soft); filter: blur(18px); }
.metric-label { color: var(--text-3); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.metric-label .icon { width: 14px; height: 14px; }
.metric-value { font-size: 27px; font-weight: 800; font-family: var(--font-num); margin-top: 6px; letter-spacing: -.5px; }
.metric-delta { font-size: 10.5px; color: var(--green); margin-top: 3px; }
.creator-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); gap: 20px; margin-top: 20px; align-items: start; }
.chart-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chart-head h3 { font-size: 15px; font-weight: 700; }
.chart-legend { display: flex; gap: 12px; font-size: 11px; color: var(--text-3); }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }
.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 190px; margin-top: 18px; padding: 0 4px; border-bottom: 1px solid var(--line); }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--brand), rgba(254,44,85,.32)); min-height: 3px; transition: height .5s var(--ease); }
.chart-bar.alt { background: linear-gradient(180deg, var(--cyan), rgba(37,244,238,.22)); }
.chart-day { font-size: 9.5px; color: var(--text-4); }
.creator-table { margin-top: 20px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.creator-table-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.creator-table-head h3 { font-size: 15px; font-weight: 700; }
.creator-row { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(80px, .5fr)) 90px; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.creator-row:last-child { border-bottom: 0; }
.creator-row.head { color: var(--text-3); font-size: 11px; background: var(--bg-soft); }
.creator-work { display: flex; align-items: center; gap: 10px; min-width: 0; }
.creator-work img { width: 38px; height: 52px; border-radius: 6px; object-fit: cover; }
.creator-work .caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-num { font-family: var(--font-num); color: var(--text-2); }
.creator-empty { padding: 54px 20px; text-align: center; color: var(--text-3); }

/* ------------------------------------------------------------------ settings */
.settings-page { max-width: 980px; margin: 0 auto; padding: 26px 34px 80px; }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 3px; position: sticky; top: 86px; }
.settings-nav button { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 13px; border-radius: 10px; color: var(--text-2); font-size: 13px; text-align: left; }
.settings-nav button:hover { background: var(--bg-soft); color: var(--text); }
.settings-nav button.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.settings-nav .icon { width: 17px; height: 17px; }
.settings-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.settings-panel h2 { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.settings-panel .settings-desc { color: var(--text-3); font-size: 12.5px; margin-bottom: 20px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .setting-name { font-size: 13.5px; font-weight: 600; }
.setting-row .setting-hint { color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-choice { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; border: 2px solid transparent; cursor: pointer; padding: 0; }
.avatar-choice img { width: 100%; height: 100%; object-fit: cover; }
.avatar-choice.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.about-block { line-height: 1.75; color: var(--text-2); font-size: 13px; }
.about-block h3 { color: var(--text); font-size: 15px; margin: 18px 0 6px; }
.about-block ul { list-style: disc; padding-left: 20px; }
.about-block li { margin: 4px 0; }
.about-meta { display: grid; grid-template-columns: 120px 1fr; gap: 6px 14px; font-size: 12px; color: var(--text-3); margin-top: 12px; }
.about-meta b { color: var(--text-2); font-weight: 600; }

/* ------------------------------------------------------------------ live */
.live-page { max-width: 1240px; margin: 0 auto; padding: 24px 34px 80px; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.live-card { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10; cursor: pointer; background: var(--bg-soft); }
.live-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.live-card:hover img { transform: scale(1.04); }
.live-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.8) 100%); }
.live-card-info { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; color: #fff; }
.live-card-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-card-host { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 11px; color: rgba(255,255,255,.78); }
.live-card-host .avatar { width: 20px; height: 20px; }
.live-card-top { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; }
.live-viewers { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; align-items: center; gap: 4px; font-size: 11px; color: #fff; background: rgba(0,0,0,.35); padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(6px); }
.live-viewers .icon { width: 13px; height: 13px; }
.live-room { height: calc(100vh - var(--topbar-h)); display: grid; grid-template-columns: minmax(0, 1fr) 360px; overflow: hidden; background: #050507; }
.live-stage { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.live-stage video { width: 100%; height: 100%; object-fit: contain; }
.live-stage::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, transparent 40%, rgba(0,0,0,.45)); pointer-events: none; }
.live-overlay { position: absolute; left: 20px; top: 18px; right: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; z-index: 2; }
.live-host-card { display: flex; align-items: center; gap: 10px; background: rgba(10,10,14,.46); border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 8px 12px; backdrop-filter: blur(10px); color: #fff; }
.live-host-card .avatar { width: 36px; height: 36px; }
.live-host-name { font-size: 12.5px; font-weight: 700; }
.live-host-sub { font-size: 10.5px; color: rgba(255,255,255,.65); }
.live-leave { color: #fff; background: rgba(10,10,14,.46); border: 1px solid rgba(255,255,255,.16); border-radius: 10px; height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; backdrop-filter: blur(10px); }
.live-chat-pane { display: flex; flex-direction: column; background: var(--bg-body); border-left: 1px solid var(--line); min-height: 0; }
.live-chat-head { flex: 0 0 auto; padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.live-chat-head h3 { font-size: 14px; font-weight: 700; }
.live-chat-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 9px; }
.live-chat-item { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.live-chat-item b { color: var(--cyan); font-weight: 600; margin-right: 5px; }
.live-chat-item.gift b { color: var(--gold); }
.live-chat-item.gift { color: var(--gold); }
.live-gifts { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); overflow-x: auto; }
.live-gift { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 8px; background: var(--bg-soft); color: var(--text-2); font-size: 11.5px; flex: 0 0 auto; }
.live-gift:hover { background: var(--brand-soft); color: var(--brand); }
.live-chat-composer { display: flex; gap: 8px; padding: 10px 12px 14px; border-top: 1px solid var(--line); }
.live-chat-composer .input { height: 38px; }
.live-chat-composer .btn { height: 38px; }

/* ------------------------------------------------------------------ topic / music / history */
.topic-page, .music-page, .collection-page { max-width: 1200px; margin: 0 auto; padding: 24px 34px 80px; }
.topic-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 24px 26px; border-radius: 20px; background: radial-gradient(600px 220px at 10% 10%, rgba(37,244,238,.14), transparent 65%), var(--bg-card); border: 1px solid var(--line); margin-bottom: 20px; }
.topic-title { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.topic-title span { color: var(--cyan); }
.topic-sub { color: var(--text-3); font-size: 12.5px; margin-top: 4px; }
.music-head { display: flex; align-items: center; gap: 20px; padding: 22px 24px; border-radius: 20px; background: var(--bg-card); border: 1px solid var(--line); margin-bottom: 20px; }
.music-head .cover { width: 104px; height: 104px; border-radius: 16px; object-fit: cover; box-shadow: var(--shadow-md); }
.music-head h1 { font-size: 24px; font-weight: 800; }
.music-head .artist { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.music-head .play-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* ------------------------------------------------------------------ auth / modals */
.auth-modal { width: min(420px, 100%); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 24px 4px; }
.auth-brand .mark { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #ff7a5c); color: #fff; box-shadow: 0 10px 30px rgba(254,44,85,.3); }
.auth-brand .mark .icon { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.auth-brand h2 { font-size: 21px; font-weight: 800; }
.auth-brand p { color: var(--text-3); font-size: 12px; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 11px; margin: 18px 22px 0; }
.auth-tab { flex: 1; height: 34px; border-radius: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.auth-tab.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 13px; padding: 16px 22px 4px; }
.auth-form .input { height: 44px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 42px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; color: var(--text-3); display: grid; place-items: center; }
.auth-error { color: var(--brand); font-size: 12px; min-height: 18px; }
.auth-demo { margin: 4px 22px 0; padding: 11px 13px; border-radius: 11px; background: var(--bg-soft); border: 1px dashed var(--line-strong); font-size: 11.5px; color: var(--text-3); line-height: 1.7; }
.auth-demo b { color: var(--text-2); }
.auth-demo button { color: var(--cyan); margin-left: 4px; }
.auth-foot { padding: 12px 22px 22px; font-size: 11px; color: var(--text-3); text-align: center; line-height: 1.6; }
.auth-foot a { color: var(--text-2); text-decoration: underline; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 6px; border-radius: 12px; color: var(--text-2); font-size: 11px; }
.share-item:hover { background: var(--bg-soft); color: var(--text); }
.share-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-soft); }
.share-icon .icon { width: 20px; height: 20px; }
.share-item.wechat .share-icon { background: #1aad19; color: #fff; }
.share-item.qq .share-icon { background: #12b7f5; color: #fff; }
.share-item.weibo .share-icon { background: #e6162d; color: #fff; }
.share-item.copy .share-icon { background: var(--bg-soft); }
.share-link-row { display: flex; gap: 8px; margin-top: 16px; }
.share-link-row .input { flex: 1; height: 38px; font-size: 12px; }
.report-reasons { display: flex; flex-direction: column; gap: 4px; }
.report-reason { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.report-reason:hover { background: var(--bg-soft); }
.report-reason.active { background: var(--brand-soft); color: var(--brand); }
.report-reason .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.report-reason.active .radio { border-color: var(--brand); box-shadow: inset 0 0 0 4px var(--brand); }
.emoji-panel { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; padding: 8px; max-height: 180px; overflow-y: auto; }
.emoji-btn { height: 34px; border-radius: 7px; font-size: 19px; display: grid; place-items: center; }
.emoji-btn:hover { background: var(--bg-soft); }
.about-modal .about-block { font-size: 12.5px; }
.kbd { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--line-strong); font-size: 10.5px; color: var(--text-2); text-align: center; font-family: var(--font-num); }

/* ------------------------------------------------------------------ share / sheet / theme */
.friend-share-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; margin-top: 8px; }
.friend-share-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 9px; color: var(--text-2); font-size: 13px; text-align: left; }
.friend-share-row:hover { background: var(--bg-soft); color: var(--text); }
.sheet-content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.comment-sheet .sheet-content { display: flex; flex-direction: column; min-height: 0; }
.comment-sheet .panel-body { flex: 1; overflow-y: auto; }
.comment-sheet .composer { flex: 0 0 auto; }
.comment-sheet .composer-input { min-height: 40px; }
.theme-card { cursor: pointer; transition: transform .18s var(--ease); }
.theme-card:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------------ misc pages */
.notfound-page { min-height: calc(100vh - var(--topbar-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px; }
.notfound-page .code { font-size: 92px; font-weight: 900; letter-spacing: -5px; background: linear-gradient(135deg, var(--brand), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.notfound-page h1 { font-size: 20px; }
.notfound-page p { color: var(--text-3); font-size: 13px; }

/* ------------------------------------------------------------------ mobile */
.mobile-nav { display: none; }
@media (max-width: 1220px) {
  .feed-stage { grid-template-columns: minmax(0, 1fr) 350px; }
  .profile-body .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .video-grid.cols-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .creator-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: var(--sidebar-mini); }
  .sidebar .side-item span, .sidebar .side-following, .sidebar .side-footer,
  .sidebar .side-sep, .sidebar .side-badge { display: none; }
  .sidebar .side-item { justify-content: center; padding: 0; }
  .topbar-left { min-width: 0; }
  .top-link span { display: none; }
  .top-link { padding: 0 10px; }
  .feed-stage { grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; }
  .page, .profile-page, .explore-page, .search-page, .upload-page, .creator-page,
  .settings-page, .live-page, .topic-page, .music-page, .collection-page, .notifications-page { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 56px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .sidebar { display: none; }
  .view { margin-left: 0 !important; padding-bottom: var(--mobile-nav-h); }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand-mark .icon { width: 21px; height: 21px; }
  .brand-name { font-size: 18px; }
  .brand-pill { display: none; }
  .searchbox { flex: 1; height: 36px; border-radius: 999px; padding-left: 12px; }
  .search-btn { height: 28px; padding: 0 12px; border-radius: 999px; }
  .topbar-right .creator-link, .topbar-right .top-link { display: none; }
  .topbar-right { gap: 2px; }
  .icon-btn { width: 34px; height: 34px; }
  .top-icon .icon { width: 20px; height: 20px; }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--bg-elev) 92%, transparent); backdrop-filter: blur(18px);
    border-top: 1px solid var(--line); align-items: center; justify-content: space-around;
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-3); font-size: 10px; position: relative; width: 56px; }
  .mobile-nav a .icon { width: 21px; height: 21px; }
  .mobile-nav a.active { color: var(--text); }
  .mobile-nav a.active .icon { color: var(--brand); }
  .mobile-nav .badge { top: -2px; right: 8px; }
  .mobile-create { width: 44px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(254,44,85,.35); }
  .mobile-create .icon { width: 20px; height: 20px; }

  .feed-page { height: calc(100vh - var(--topbar-h) - var(--mobile-nav-h)); }
  .feed-toolbar { height: 46px; padding: 0 12px; }
  .feed-tab { height: 30px; padding: 0 15px; font-size: 12.5px; }
  .feed-tools { right: 10px; }
  .feed-tools .feed-status { display: none; }
  .feed-item { padding: 0; min-height: 100%; }
  .feed-stage { width: 100%; height: 100%; display: block; }
  .video-column { border-radius: 0; height: 100%; }
  .video-shell { width: 100%; height: 100%; aspect-ratio: auto; }
  .video-ambient { display: none; }
  .feed-video { object-fit: cover; }
  .feed-panel { display: none; }
  .video-actions { right: 8px; bottom: 96px; gap: 15px; }
  .action-avatar-wrap .avatar { width: 44px; height: 44px; }
  .action-btn .action-icon-wrap { width: 40px; height: 40px; background: transparent; border: 0; backdrop-filter: none; }
  .action-btn .icon { width: 28px; height: 28px; }
  .video-meta { left: 12px; right: 66px; bottom: 66px; }
  .video-caption { -webkit-line-clamp: 2; font-size: 13px; }
  .video-controls { left: 8px; right: 8px; bottom: 8px; opacity: 1; transform: none; }
  .video-progress { bottom: 0; }
  .video-time { display: none; }
  .volume-wrap { display: none; }
  .danmaku-layer { inset: 0 0 60px 0; }
  .play-center button { width: 62px; height: 62px; }
  .feed-skeleton { padding: 0; height: 100%; }
  .feed-skeleton .stage { display: block; height: 100%; }
  .feed-skeleton .p { display: none; }
  .feed-skeleton .v { height: 100%; border-radius: 0; }

  .page, .profile-page, .explore-page, .search-page, .upload-page, .creator-page,
  .settings-page, .live-page, .topic-page, .music-page, .collection-page, .notifications-page { padding: 14px 14px 70px; }
  .page-title { font-size: 22px; }
  .profile-cover { height: 132px; border-radius: 14px; }
  .profile-head { padding: 0 12px; margin-top: -38px; gap: 14px; align-items: flex-end; }
  .profile-avatar-wrap .avatar.xl { width: 82px; height: 82px; border-width: 3px; }
  .profile-name { font-size: 20px; }
  .profile-bio { font-size: 12px; }
  .profile-stats { gap: 18px; margin-top: 8px; }
  .profile-stat b { font-size: 16px; }
  .profile-head { flex-wrap: wrap; }
  .profile-actions { display: flex; width: 100%; padding: 4px 0 0; gap: 7px; }
  .profile-actions .btn { flex: 1; justify-content: center; height: 34px; font-size: 12px; }
  .profile-actions .btn-icon { flex: 0 0 34px; }
  .profile-tabs { gap: 22px; padding: 0 12px; margin-top: 14px; }
  .profile-body { padding: 14px 10px; }
  .profile-body .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .video-grid, .search-grid, .category-card .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .video-card { border-radius: 6px; }
  .video-card-info { left: 6px; right: 6px; bottom: 5px; }
  .video-card-caption { font-size: 10px; -webkit-line-clamp: 1; }
  .video-card-meta { display: none; }
  .video-card-play { left: 6px; top: 6px; font-size: 9px; padding: 1px 5px; }

  .explore-hero { padding: 24px 18px; border-radius: 18px; }
  .explore-hero h1 { font-size: 24px; }
  .explore-columns { grid-template-columns: 1fr; }
  .explore-search { flex-direction: column; align-items: stretch; }
  .explore-search .btn { height: 40px; }
  .search-users { grid-template-columns: 1fr; }
  .search-tabs { gap: 18px; overflow-x: auto; }

  .messages-page { display: block; height: calc(100vh - var(--topbar-h) - var(--mobile-nav-h)); }
  .conversation-pane { border-right: 0; height: 100%; }
  .chat-pane { display: none; height: 100%; }
  .messages-page.chat-open .conversation-pane { display: none; }
  .messages-page.chat-open .chat-pane { display: flex; }
  .chat-head { height: 54px; padding: 0 12px; }
  .chat-body { padding: 14px 12px; }
  .msg-row { max-width: 86%; }
  .chat-composer { padding: 8px 10px 10px; }
  .notifications-page { padding-top: 14px; }
  .notice-item { padding: 12px; }
  .notice-thumb { width: 40px; height: 54px; }

  .upload-layout { grid-template-columns: 1fr; }
  .dropzone { max-height: 420px; }
  .creator-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { padding: 14px; }
  .metric-value { font-size: 22px; }
  .creator-row { grid-template-columns: minmax(0, 1fr) 70px; }
  .creator-row > :nth-child(3), .creator-row > :nth-child(4), .creator-row > :nth-child(5) { display: none; }
  .creator-row.head > :nth-child(3), .creator-row.head > :nth-child(4), .creator-row.head > :nth-child(5) { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; }
  .settings-nav button { flex: 0 0 auto; height: 36px; }
  .settings-panel { padding: 18px; }
  .live-grid { grid-template-columns: 1fr; }
  .live-room { display: block; height: calc(100vh - var(--topbar-h) - var(--mobile-nav-h)); }
  .live-stage { height: 100%; }
  .live-chat-pane { display: none; }
  .live-room.chat-open .live-chat-pane { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 56vh; z-index: 192; border-radius: 20px 20px 0 0; border-left: 0; box-shadow: 0 -20px 60px rgba(0,0,0,.5); }
  .live-overlay { left: 10px; right: 10px; top: 10px; }
  .topic-head { padding: 18px; border-radius: 16px; flex-direction: column; align-items: flex-start; }
  .topic-title { font-size: 24px; }
  .music-head { padding: 16px; gap: 14px; }
  .music-head .cover { width: 76px; height: 76px; border-radius: 12px; }
  .music-head h1 { font-size: 19px; }
  .toast-root { top: 68px; }
  .modal-mask { padding: 12px; align-items: end; }
  .modal { border-radius: 20px; max-height: 88vh; }
  .auth-brand { padding-top: 22px; }
}
@media (max-width: 520px) {
  .brand-name { display: none; }
  .topbar-right .top-icon:nth-of-type(1) { display: none; }
  .video-grid, .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-body .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .explore-hero h1 { font-size: 21px; }
  .creator-metrics { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
