/* 飞哇 Web 桌面端聊天 样式 */
:root {
  --bg-dark: #1e1e24;
  --panel-left: #282832;
  --panel-middle: #2e2e38;
  --panel-right: #23232b;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f0f0f5;
  --text-sub: #9a9ab0;
  --text-muted: #6e6e82;
  --primary-color: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: rgba(124, 58, 237, 0.2);
  --accent-color: #06b6d4;
  --bubble-mine: #6d28d9;
  --bubble-other: #363642;
  --danger-color: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* App 容器 */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* ==================== 最左侧侧边栏 ==================== */
.left-bar {
  width: 64px;
  background-color: var(--panel-left);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  border-right: 1px solid var(--border-color);
  user-select: none;
}

.user-avatar-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  transition: transform 0.2s;
}

.user-avatar-wrap:hover {
  transform: scale(1.05);
}

.user-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-icons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s;
}

.nav-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #fff;
  background-color: var(--primary-color);
}

.nav-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--danger-color);
  color: #fff;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: bold;
}

.left-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
}

/* ==================== 中间列表栏 ==================== */
.middle-panel {
  width: 280px;
  background-color: var(--panel-middle);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.search-header {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-sub);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.search-input-wrap:focus-within {
  border-color: var(--primary-color);
}

.search-input-wrap svg {
  margin-right: 6px;
}

.search-input-wrap input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 13px;
  width: 100%;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

.tab-title {
  padding: 12px 14px 6px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.discover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 0;
}

.discover-header .tab-title {
  padding: 4px 0 0;
  flex-shrink: 0;
}

.discover-topic-filter {
  flex: 1;
  max-width: 160px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

.discover-hint {
  padding: 4px 14px 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.discover-hint a {
  color: var(--accent-color);
}

.profile-topics-note {
  margin: 8px 0 16px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
}

.profile-topics-note a {
  color: var(--accent-color);
  margin-left: 4px;
}

/* 列表通用 */
.chat-list, .user-list {
  list-style: none;
}

.empty-tip {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.chat-section-header {
  padding: 10px 14px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: default;
}

.chat-item .role-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.chat-item, .user-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background-color 0.15s;
}

.chat-item:hover, .user-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.chat-item.active {
  background-color: rgba(124, 58, 237, 0.25);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background-color: #3b3b4a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-right: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-time {
  font-size: 11px;
  color: var(--text-muted);
}

.item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-last-msg, .item-bio {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-badge {
  background-color: var(--danger-color);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: bold;
}

.type-tag {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
  margin-left: 4px;
}

/* ==================== 右侧主对话区 ==================== */
.main-chat-panel {
  flex: 1;
  background-color: var(--panel-right);
  display: flex;
  flex-direction: column;
  position: relative;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  min-height: 60px;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-more-wrap {
  position: relative;
  display: inline-block;
}

.chat-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: var(--panel-left);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 30;
  overflow: hidden;
}

.chat-more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.chat-more-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.chat-more-menu button.danger {
  color: var(--danger-color);
}

.chat-block-hint {
  flex: 1 1 100%;
  margin: 0;
  padding: 6px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.report-select {
  width: 100%;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--panel-left);
  color: var(--text-primary);
}

.expert-modal-actions {
  flex-wrap: wrap;
  gap: 8px;
}

#chat-header.role-payer,
.chat-header.role-payer {
  background-color: #ef4444;
  background-image: linear-gradient(180deg, #fb7185 0%, #ef4444 100%);
  border-bottom-color: rgba(254, 226, 226, 0.45);
}

#chat-header.role-payee,
.chat-header.role-payee {
  background-color: #22c55e;
  background-image: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  border-bottom-color: rgba(187, 247, 208, 0.45);
}

.chat-header.role-payer .target-info h3,
.chat-header.role-payer .target-id,
.chat-header.role-payer .target-status,
.chat-header.role-payer .target-rates,
.chat-header.role-payee .target-info h3,
.chat-header.role-payee .target-id,
.chat-header.role-payee .target-status,
.chat-header.role-payee .target-rates {
  color: rgba(255, 255, 255, 0.92);
}

.chat-header.role-payer .target-status.online,
.chat-header.role-payee .target-status.online {
  color: #bbf7d0;
  background-color: rgba(255, 255, 255, 0.15);
}

.target-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.billing-role-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  white-space: nowrap;
}

.chat-header.role-payer .btn-icon,
.chat-header.role-payee .btn-icon {
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.chat-header.role-payer .btn-icon:hover:not(:disabled),
.chat-header.role-payee .btn-icon:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.32);
}

.chat-header.role-payer .billing-role-tag,
.chat-header.role-payee .billing-role-tag {
  background: rgba(0, 0, 0, 0.15);
}

.target-info h3 {
  font-size: 16px;
  font-weight: 600;
  display: inline-block;
  margin-right: 8px;
}

.target-id {
  font-size: 12px;
  color: var(--text-muted);
}

.target-status {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  background-color: rgba(255, 255, 255, 0.05);
}

.target-status.online {
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
}

.target-rates {
  font-size: 12px;
  color: var(--accent-color);
  max-width: 420px;
  text-align: right;
}

.chat-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.call-actions {
  display: flex;
  gap: 8px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover:not(:disabled) {
  background-color: rgba(124, 58, 237, 0.35);
}

.btn-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-success {
  background-color: #10b981;
  color: #fff;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--danger-color);
  color: #fff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

/* 消息框：stage 不滚动，container 滚动，水印固定在 stage 正中 */
.messages-stage {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.messages-container {
  flex: 1;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.consult-topic-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 40px;
  pointer-events: none;
  overflow: hidden;
}

.consult-topic-backdrop.hidden {
  display: none;
}

.consult-topic-backdrop-inner {
  max-width: 82%;
  text-align: center;
  transform: rotate(-10deg);
  user-select: none;
}

.consult-topic-backdrop-label {
  font-size: 13px;
  letter-spacing: 0.28em;
  color: rgba(167, 139, 250, 0.42);
  margin-bottom: 14px;
  font-weight: 600;
}

.consult-topic-backdrop-text {
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 800;
  line-height: 1.25;
  color: rgba(124, 58, 237, 0.11);
  white-space: pre-wrap;
  word-break: break-word;
}

.consult-topic-backdrop-text.long {
  font-size: clamp(22px, 5vw, 36px);
  line-height: 1.35;
}

.chat-messages-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: min-content;
}

.chat-messages-panel.hidden {
  display: none;
}

.chat-messages-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: min-content;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message-row.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: #3b3b4a;
  overflow: hidden;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  display: flex;
  flex-direction: column;
}

.message-row.mine .message-content {
  align-items: flex-end;
}

.message-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.message-row.other .message-bubble {
  background-color: var(--bubble-other);
  color: var(--text-main);
  border-top-left-radius: 2px;
}

.message-row.mine .message-bubble {
  background-color: var(--bubble-mine);
  color: #ffffff;
  border-top-right-radius: 2px;
}

.message-bubble.message-bubble-media {
  padding: 6px;
  background-color: rgba(0, 0, 0, 0.2);
}

.message-row.mine .message-bubble.message-bubble-media {
  background-color: rgba(255, 255, 255, 0.12);
}

.chat-msg-image {
  display: block;
  max-width: min(240px, 100%);
  max-height: 320px;
  border-radius: 8px;
  cursor: zoom-in;
  object-fit: contain;
}

.chat-msg-file-link {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
}

.message-row.mine .chat-msg-file-link {
  color: #fff;
}

.message-bubble audio {
  max-width: min(260px, 100%);
  height: 36px;
}

.system-notice {
  align-self: center;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
}

.call-record-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  width: 100%;
}

.call-record-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-sub);
  font-size: 13px;
}

.call-record-icon {
  font-size: 14px;
  line-height: 1;
}

.call-record-title {
  font-weight: 500;
}

.call-record-subtitle {
  font-size: 12px;
  color: var(--accent-color);
}

.call-record-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* 底部编辑器 */
.chat-editor {
  height: 160px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.15);
}

.editor-toolbar {
  padding: 6px 16px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.editor-attach-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-attach-btn {
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
}

.editor-textarea-wrap {
  flex: 1;
  padding: 0 16px;
}

.editor-textarea-wrap textarea {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  resize: none;
  font-family: inherit;
}

.editor-footer {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.balance-hint {
  font-size: 12px;
  color: var(--text-sub);
}

/* ==================== 按钮与通用组件 ==================== */
.btn {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.btn-block {
  width: 100%;
  padding: 10px;
  font-size: 14px;
}

/* 专家资料浮窗 */
.expert-modal-box {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  max-height: min(88vh, 720px);
  overflow-y: auto;
  background-color: var(--panel-middle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  padding: 24px;
}

.expert-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.expert-modal-header {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.expert-modal-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  background: #3b3b4a;
  flex-shrink: 0;
}

.expert-modal-title-wrap {
  min-width: 0;
  flex: 1;
}

.expert-modal-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.expert-modal-name-row h3 {
  font-size: 18px;
  font-weight: 700;
}

.expert-verified-badge {
  font-size: 11px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.expert-modal-id {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.expert-modal-status {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
}

.expert-modal-status.online {
  color: #4ade80;
}

.expert-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.expert-info-row {
  display: flex;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.expert-info-row .label,
.expert-info-block .label,
.expert-price-item .label {
  flex-shrink: 0;
  width: 64px;
  color: var(--text-muted);
  font-size: 12px;
}

.expert-info-block .label {
  display: block;
  margin-bottom: 6px;
}

.expert-modal-bio {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  white-space: pre-wrap;
}

.expert-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}

.expert-price-item {
  text-align: center;
}

.expert-price-item .label {
  display: block;
  width: auto;
  margin-bottom: 4px;
}

.expert-price-item strong {
  font-size: 13px;
  color: var(--accent-color);
}

.expert-type-tags {
  font-size: 13px;
  color: var(--text-main);
}

.expert-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* 发起咨询 · 选择主题 */
.consult-topic-modal-box {
  width: min(480px, calc(100vw - 32px));
  max-height: min(85vh, 720px);
  overflow-y: auto;
  background: var(--panel-middle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.consult-topic-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.consult-topic-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.consult-topic-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.consult-topic-expert {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--accent-color);
}

.consult-topic-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 14px;
}

.consult-topic-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--panel-dark);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.consult-topic-option:hover {
  border-color: var(--accent-color);
}

.consult-topic-option.selected {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.12);
}

.consult-topic-option input {
  margin-top: 3px;
  flex-shrink: 0;
}

.consult-topic-option-body {
  flex: 1;
  min-width: 0;
}

.consult-topic-option-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.consult-topic-option-category {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.consult-topic-remark-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.consult-topic-remark {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--panel-dark);
  color: var(--text-main);
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.consult-topic-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-box {
  position: relative;
  width: 360px;
  background-color: var(--panel-middle);
  border-radius: var(--radius-lg);
  padding: 32px;
  padding-top: 44px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.login-mode-switch {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--accent-green);
  background: rgba(7, 193, 96, 0.12);
  border: 1px solid rgba(7, 193, 96, 0.35);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
}

.login-mode-switch:hover {
  background: rgba(7, 193, 96, 0.2);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-logo {
  font-size: 48px;
  margin-bottom: 8px;
}

.login-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.login-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-qr-wrap {
  text-align: center;
}

.login-qr-image {
  display: block;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.login-qr-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group > label:not(.checkbox-item) {
  display: block;
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.form-group > input:not([type="checkbox"]),
.form-group > textarea {
  width: 100%;
  padding: 10px 12px;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.form-group > input:not([type="checkbox"]):focus,
.form-group > textarea:focus {
  border-color: var(--primary-color);
}

.code-group {
  display: flex;
  gap: 8px;
}

.code-group input {
  flex: 1;
}

.hint-text {
  font-size: 11px;
  color: var(--accent-color);
  margin-bottom: 16px;
  text-align: center;
}

/* 关于飞哇 */
.about-feiwaa-box {
  width: min(520px, calc(100vw - 32px));
}

.about-feiwaa-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-main);
}

.about-feiwaa-lead {
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--text-main);
}

.about-feiwaa-body p {
  margin: 0 0 12px;
  color: var(--text-sub);
}

.about-feiwaa-list {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  color: var(--text-sub);
}

.about-feiwaa-list li {
  margin-bottom: 6px;
}

.about-feiwaa-note {
  font-size: 13px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary-color);
}

.about-partner-note {
  display: none;
  font-size: 13px;
  color: var(--text-sub);
}

.partner-site .about-partner-note {
  display: block;
}

.about-feiwaa-site {
  margin-top: 16px !important;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
}

.about-feiwaa-site a {
  color: var(--primary-color);
  word-break: break-all;
}

.about-feiwaa-site a:hover {
  text-decoration: underline;
}

/* 个人中心 modal */
.modal-box {
  width: 480px;
  background-color: var(--panel-middle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.profile-header-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.profile-avatar-img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background-color: #3b3b4a;
}

.form-section-title {
  font-size: 12px;
  color: var(--primary-color);
  font-weight: 600;
  margin: 16px 0 8px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.checkbox-group {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group label.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-item span {
  line-height: 1.4;
}

.form-group-pricing-channel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
  row-gap: 10px;
}

.form-group-pricing-channel label.checkbox-item {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.form-group-pricing-channel .price-stepper {
  margin-top: 0;
  padding-left: 0;
  flex: 0 0 auto;
}

.price-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex: 0 0 auto;
}

.form-group .price-stepper input {
  width: 72px;
  max-width: 72px;
  flex: 0 0 72px;
  padding: 8px 6px;
  text-align: center;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.form-group .price-stepper input:focus {
  border-color: var(--primary-color);
}

.btn-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color, #ddd);
  background: var(--bg-secondary, #f5f5f5);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.btn-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.price-unit {
  font-size: 12px;
  color: var(--text-secondary, #888);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Toast 通知 */
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 10px 20px;
  border-radius: 20px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: toastIn 0.3s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== 音视频通话 ==================== */
.call-modal-card {
  width: 320px;
  background-color: var(--panel-middle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.call-modal-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.incoming-caller-name {
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0;
}

.incoming-call-meta {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 20px;
}

.call-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.call-modal-actions .btn {
  min-width: 96px;
  padding: 10px 16px;
}

.call-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(8, 8, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-overlay-inner {
  width: min(960px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.call-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.call-top-bar h3 {
  font-size: 20px;
  margin-bottom: 4px;
}

.call-top-bar p {
  font-size: 13px;
  color: var(--text-sub);
}

.call-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--accent-color);
}

.call-video-wrap {
  position: relative;
  flex: 1;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
}

.call-remote-video {
  width: 100%;
  height: 100%;
  background: #111;
}

.call-local-video {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 180px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #222;
  z-index: 2;
}

.call-remote-video video,
.call-local-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.call-voice-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
}

.call-voice-avatar {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  object-fit: cover;
  background: #3b3b4a;
}

.call-voice-panel p {
  font-size: 16px;
  color: var(--text-sub);
}

.call-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-bottom: 8px;
}

.call-controls .btn.hidden {
  display: none;
}
