/* 首页互动：群聊/定制/模型/侧栏菜单/充值/封禁 */

.hub-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
}

.hub-layer.is-on {
  display: flex;
}

.hub-layer.align-end {
  justify-content: flex-end;
  align-items: stretch;
  padding: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hub-modal {
  background: #fff;
  border-radius: 16px;
  width: min(92vw, 520px);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.hub-modal.wide {
  width: min(94vw, 640px);
}

.hub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
}

.hub-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.hub-x {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.hub-tabs {
  display: flex;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid #eee;
}

.hub-tabs button {
  border: none;
  background: transparent;
  padding: 10px 2px 12px;
  color: #888;
  cursor: pointer;
  font-size: 0.92rem;
  position: relative;
}

.hub-tabs button.is-on {
  color: #222;
  font-weight: 700;
}

.hub-tabs button.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #222;
}

.hub-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.hub-label {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 8px;
}

.hub-textarea {
  width: 100%;
  min-height: 110px;
  border: none;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 12px;
  resize: vertical;
  font: inherit;
  color: #333;
  box-sizing: border-box;
}

.hub-count {
  text-align: right;
  font-size: 0.75rem;
  color: #aaa;
  margin: 6px 0 12px;
}

.hub-link {
  border: none;
  background: transparent;
  color: #666;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0;
  margin-bottom: 14px;
}

.summon-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.summon-card {
  border: 1.5px solid #e5e5e5;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.summon-card.is-on {
  border-color: #f93865;
  background: #fff0f6;
}

.summon-card strong {
  display: block;
  margin-bottom: 4px;
}

.summon-card span {
  font-size: 0.78rem;
  color: #888;
}

.hub-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hub-primary {
  flex: 1;
  border: none;
  border-radius: 999px;
  background: #f93865;
  color: #fff;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
}

.hub-locked {
  border: none;
  border-radius: 999px;
  background: #e8e8e8;
  color: #999;
  padding: 12px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.hub-note {
  text-align: center;
  font-size: 0.75rem;
  color: #aaa;
  margin: 10px 0 0;
}

/* 群列表 */
.pill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.pill-tabs button {
  border: 1px solid #eee;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  color: #555;
}

.pill-tabs button.is-on {
  background: #f93865;
  border-color: #f93865;
  color: #fff;
}

.group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: #fafafa;
}

.group-card .g-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.group-card .g-meta {
  font-size: 0.75rem;
  color: #999;
  margin-top: 4px;
}

.group-card .g-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.group-card .g-tag {
  font-size: 0.7rem;
  color: #f93865;
  border: 1px solid #ffb3d0;
  border-radius: 4px;
  padding: 1px 6px;
}

.group-card .g-creator {
  font-size: 0.75rem;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
  grid-column: 1;
}

.btn-join {
  border: none;
  background: #f93865;
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  align-self: center;
  grid-row: 1 / span 2;
  grid-column: 2;
}

.btn-enter {
  background: #fff;
  color: #666;
  border: 1px solid #ddd;
}

.btn-create-group {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

/* 模型下拉 */
.model-wrap {
  position: relative;
}

.model-drop {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: min(92vw, 360px);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid #eee;
  padding: 10px;
}

.model-drop.is-on {
  display: block;
}

.model-sec {
  font-size: 0.75rem;
  color: #aaa;
  padding: 8px 8px 6px;
}

.model-item {
  width: 100%;
  text-align: left;
  border: 1.5px solid transparent;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  font: inherit;
  margin-bottom: 6px;
}

.model-item:hover {
  background: #fafafa;
}

.model-item.is-on {
  background: #fff0f6;
  border-color: #f93865;
}

.model-item .row1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.model-item .name {
  font-weight: 700;
}

.model-item .badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.model-item .badge {
  font-size: 0.68rem;
  background: #ffe0ec;
  color: #f93865;
  border-radius: 999px;
  padding: 2px 6px;
}

.model-item .badge.hot {
  background: #f93865;
  color: #fff;
}

.model-item .badge.vip {
  background: #f5e6c8;
  color: #b8860b;
}

.model-item .stats {
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 4px;
}

.model-item .stats .fast {
  color: #22c55e;
}

.model-item .stats .slow {
  color: #eab308;
}

.model-item .stats .left {
  color: #ef4444;
}

.model-item .desc {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.4;
}

.model-foot {
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 6px;
}

.model-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.model-toggles button {
  border: none;
  background: #f3f3f3;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.8rem;
  color: #555;
  cursor: pointer;
}

.ctx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 8px;
}

.ctx-pills {
  display: flex;
  gap: 6px;
}

.ctx-pills button {
  border: 1px solid #e5e5e5;
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: #666;
}

.ctx-pills button.is-on {
  border-color: #f93865;
  color: #f93865;
  background: #fff0f6;
}

.model-link {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: #aaa;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  padding: 6px;
}

/* 用户侧栏 */
.user-drawer {
  width: min(100vw, 360px);
  height: 100%;
  background: #1a1a1a;
  color: #eee;
  overflow-y: auto;
  padding: 16px 14px 24px;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.user-drawer .ud-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.user-drawer .ud-head .ph-avatar,
.user-drawer .ud-head .user-face {
  width: 44px;
  height: 44px;
}

.rc-user .user-face {
  width: 40px;
  height: 40px;
}

.user-drawer .ud-name {
  font-weight: 700;
  font-size: 1.1rem;
}

.user-drawer .ud-vip {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 2px;
}

.user-drawer .ud-vip em {
  color: #f93865;
  font-style: normal;
}

.wallet-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #242424;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.wallet-box .bal {
  flex: 1;
}

.wallet-box .bal strong {
  display: block;
  font-size: 1rem;
}

.wallet-box .bal span {
  font-size: 0.75rem;
  color: #888;
}

.wallet-box .charge {
  border: none;
  background: #f93865;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.ud-sec {
  font-size: 0.75rem;
  color: #777;
  margin: 12px 4px 8px;
}

.ud-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: #ddd;
  text-align: left;
  padding: 11px 8px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.ud-item:hover {
  background: #2a2a2a;
}

.ud-item .badge {
  margin-left: auto;
  background: #f93865;
  color: #fff;
  font-size: 0.68rem;
  border-radius: 999px;
  padding: 2px 6px;
}

.ud-foot {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #333;
  font-size: 0.72rem;
  color: #777;
  line-height: 1.8;
}

.ud-foot a {
  color: #888;
  margin-right: 8px;
}

/* 充值页 */
.recharge-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 85;
  background: #121212;
  color: #eee;
  overflow-y: auto;
  padding: 20px 16px 40px;
}

.recharge-page.is-on {
  display: block;
}

.recharge-inner {
  max-width: 480px;
  margin: 0 auto;
}

.rc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.rc-top .site-logo {
  flex-shrink: 0;
}

.rc-top h1 {
  margin: 0;
  font-size: 1.4rem;
  flex: 1;
}

.rc-top .sub {
  display: block;
  font-size: 0.8rem;
  color: #888;
  font-weight: 400;
}

.rc-back {
  border: none;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 0.85rem;
}

.rc-user {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.rc-banner {
  border: 1px solid #8a6d2b;
  color: #e8c56b;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.rc-label {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 8px;
}

.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.pack {
  position: relative;
  background: #1e1e1e;
  border: 1.5px solid #333;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.pack.is-on {
  border-color: #f93865;
  background: #2a1520;
}

.pack .amt {
  font-size: 1.15rem;
  font-weight: 700;
}

.pack .usd {
  margin-top: 4px;
  font-size: 0.9rem;
}

.pack .cny {
  font-size: 0.75rem;
  color: #888;
}

.pack .tag {
  position: absolute;
  top: -6px;
  left: 8px;
  background: #f97316;
  color: #fff;
  font-size: 0.68rem;
  border-radius: 999px;
  padding: 2px 6px;
}

.pack .tag.pink {
  left: auto;
  right: 8px;
  background: #f93865;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.pay {
  background: #1e1e1e;
  border: 1.5px solid #333;
  border-radius: 10px;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  color: #ccc;
  font: inherit;
  font-size: 0.72rem;
}

.pay.is-on {
  border-color: #f93865;
}

.pay .ico {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.rc-go {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: #9b2d5c;
  color: #fff;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  margin-bottom: 8px;
}

.rc-go:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rc-hint {
  text-align: center;
  font-size: 0.75rem;
  color: #777;
  margin-bottom: 16px;
}

.rc-help {
  background: #1e1e1e;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.8rem;
  color: #999;
  line-height: 1.6;
}

.rc-help h3 {
  margin: 0 0 8px;
  color: #ccc;
  font-size: 0.9rem;
}

/* 简易提示弹窗 */
.toast-modal {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px 16px;
  width: min(92vw, 340px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.toast-modal h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.toast-modal p {
  margin: 0 0 16px;
  color: #666;
  font-size: 0.92rem;
  line-height: 1.5;
}

.toast-modal .hub-primary {
  width: 100%;
}

.toast-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.toast-actions .hub-ghost,
.toast-actions .hub-primary {
  flex: 1;
  width: auto;
  margin-top: 0;
}

/* 剧情选项：与消息正文同宽居中 */
.choice-panel {
  max-width: 760px;
  width: calc(100% - 56px);
  margin: 4px auto 24px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

.choice-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: #888;
}

.choice-btn {
  display: block;
  width: 100%;
  text-align: left;
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #f0d4dc;
  background: #fff7f9;
  color: #333;
  font-size: 0.88rem;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.choice-btn:hover {
  background: #ffe8ef;
  border-color: #f93865;
}

.composer-points {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #f93865;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0f4;
  white-space: nowrap;
}

.composer-points.is-empty {
  color: #999;
  background: #f3f3f3;
}

.composer-points.is-debt {
  color: #fff;
  background: #c62828;
}

.hub-ghost {
  border: 1px solid #ddd;
  background: #fff;
  color: #444;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  cursor: pointer;
}

.hub-ghost:hover {
  border-color: #f93865;
  color: #f93865;
}

/* 消息气泡扩展 */
.messages .msg-card.user {
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  max-width: 760px;
}

.messages .msg-card.sys {
  background: #fff8e8;
  border: 1px solid #f5e0b0;
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 760px;
}

.messages .msg-card {
  margin-bottom: 28px;
}

.messages .msg-card.sys .msg-status,
.messages .msg-card.user .msg-status {
  display: none;
}

.tool-icon.is-active {
  background: #ffe6f0;
  color: #f93865;
}

.group-mark {
  color: #f93865;
  font-size: 0.75em;
  margin-right: 2px;
}

.discover-groups-btn {
  width: calc(100% - 16px);
  margin: 10px 8px;
  border: 1px dashed #e0e0e0;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
}

.discover-groups-btn:hover {
  border-color: #f93865;
  color: #f93865;
}

.composer-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.composer-tools .icon-btn {
  color: #999;
}

.composer-wrap.is-group .composer {
  border-radius: 999px;
  padding-right: 10px;
}

.composer-wrap.is-group .send-btn,
.composer-wrap.is-group #composer-plus {
  display: none;
}

.chat-header.group-header {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 56px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line, #e1e1e4);
}

.chat-header.group-header[hidden] {
  display: none !important;
}

.group-header-info {
  min-width: 0;
}

.group-header-title {
  font-size: 1rem;
  font-weight: 700;
  color: #222;
}

.group-header-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #999;
  margin-top: 2px;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

/* —— 群聊消息（截图样式） —— */
.messages.is-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 24px;
  background: #f5f5f5;
}

.g-time {
  text-align: center;
  font-size: 0.75rem;
  color: #bbb;
  margin: 4px 0 2px;
}

.g-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: min(720px, 100%);
}

.g-msg.is-mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.g-msg.is-mine .g-msg-name {
  text-align: right;
}

.g-msg.is-mine .g-bubble {
  background: transparent;
  border: none;
}

.g-msg .avatar.sm {
  width: 36px;
  height: 36px;
  margin-top: 2px;
}

.g-msg-main {
  min-width: 0;
  max-width: calc(100% - 48px);
}

.g-msg-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 4px;
  line-height: 1.2;
}

.g-bubble {
  display: inline-block;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  color: #222;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: none;
  max-width: 100%;
  word-break: break-word;
}

.g-bubble-img {
  padding: 0;
  max-width: 320px;
  margin-top: 4px;
}

.g-msg.is-mine .g-bubble {
  background: transparent;
  border: none;
}

.g-quote {
  background: #f5f5f5;
  border-left: 3px solid #d0d0d0;
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #888;
}

.g-quote-user {
  font-weight: 600;
  color: #666;
  margin-bottom: 2px;
}

.g-msg.is-sys {
  align-self: center;
  max-width: 90%;
  justify-content: center;
}

.g-msg.is-sys .avatar,
.g-msg.is-sys .g-msg-name {
  display: none;
}

.g-msg.is-sys .g-bubble {
  background: transparent;
  border: none;
  padding: 0;
  color: #aaa;
  font-size: 0.78rem;
  text-align: center;
}
