:root {
  --bg: #0f172a;
  --panel: #111827;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --primary: #22c55e;
  --primary-700: #15803d;
  --border: #1f2937;
}

* { 
  box-sizing: border-box; 
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #0b1020, #0f172a);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
}

/* 营销模式：完全独立的全宽布局 */
.card.marketing-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

header {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  padding: 18px 20px; 
  margin-bottom: 16px;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.title { 
  font-size: 18px; 
  font-weight: 700; 
  letter-spacing: .4px; 
}

.header-title-group .subtitle {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.language-switcher-container {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.muted { 
  color: var(--muted); 
  font-size: 13px; 
}

.list { 
  padding: 10px; 
}

.list-item { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 14px 16px; 
  border-top: 1px solid var(--border); 
}

.list-item:first-child { 
  border-top: 0; 
}

.btn {
  background: var(--primary);
  color: #051b0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(34,197,94,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform .06s ease, filter .2s ease;
}

.btn:hover { 
  filter: brightness(1.05); 
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
  box-shadow: none;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
  box-shadow: none;
  pointer-events: auto;
}

.btn.secondary { 
  background: #374151; 
  color: #e5e7eb; 
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); 
}

.form { 
  padding: 18px; 
  border-top: 1px solid var(--border); 
}

.field { 
  margin-bottom: 14px; 
}

.label { 
  display: block; 
  font-size: 13px; 
  color: var(--muted); 
  margin-bottom: 8px; 
}

.input, .textarea {
  width: 100%;
  background: #0b1220;
  color: var(--text);
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.input:focus, .textarea:focus { 
  border-color: #334155; 
  box-shadow: 0 0 0 3px rgba(51,65,85,0.35); 
}

.textarea { 
  min-height: 90px; 
  resize: vertical; 
}

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

.row .input { 
  flex: 1; 
}

.row .btn { 
  flex: 1; 
}

.preview { 
  padding: 16px; 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
  gap: 12px; 
}

.imgbox { 
  background: #0b1220; 
  border: 1px solid #1f2937; 
  border-radius: 12px; 
  overflow: hidden; 
}

.imgbox img { 
  width: 100%; 
  display: block; 
}

.status { 
  padding: 10px 16px; 
  border-top: 1px solid var(--border); 
  color: var(--muted); 
  font-size: 13px; 
}

.danger { 
  color: #fca5a5; 
}

/* Login Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
}

.modal-close:hover {
  color: var(--text);
}

/* 可滚动弹窗（.modal 设 overflow-y:auto）内的粘性头部：
   把关闭按钮（position:absolute）的包裹层从 relative 改为 sticky，
   使头部连同 × 始终吸附在滚动容器顶部，避免滚动时关闭按钮被带出可视区。 */
.modal-sticky-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel);
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.modal-tab:hover {
  color: var(--text);
}

/* API Token section styles */
.api-token-section {
  padding: 16px 0;
}

.api-token-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.05);
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
}

.api-token-masked {
  color: var(--text);
  letter-spacing: 1px;
  font-weight: 500;
}

.api-token-hint {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f0f9ff;
  border-left: 3px solid #0ea5e9;
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
}

.api-token-new-section {
  margin-bottom: 20px;
}

.api-token-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* API Token new UI styles */
.api-token-success,
.api-token-empty,
.api-token-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(34,197,94,0.05) 100%);
  border-radius: 12px;
  margin-bottom: 16px;
}

.api-token-empty {
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.05) 100%);
}

.api-token-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.api-token-icon.success {
  color: #22c55e;
}

.api-token-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.api-token-desc {
  font-size: 13px;
  color: var(--muted);
}

.code-btn {
  background: var(--primary);
  color: #051b0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.2s;
}

.code-btn:hover { 
  filter: brightness(1.05); 
}

.code-btn:disabled {
  background: #374151;
  color: #9ca3af;
  cursor: not-allowed;
}

/* User Info Styles */
.user-info-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

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

.user-phone {
  font-size: 14px;
  color: var(--muted);
}

.agent-connect-btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(34, 197, 94, 0.36);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(14, 165, 233, 0.10));
  color: #dffcf0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.06s;
}

.agent-connect-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(14, 165, 233, 0.16));
  border-color: rgba(34, 197, 94, 0.62);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}

.agent-connect-btn:active {
  transform: translateY(1px);
}

.agent-connect-btn::after {
  content: "智能体连接";
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);
  transform: translateX(-50%) translateY(-3px);
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.agent-connect-btn:hover::after,
.agent-connect-btn:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.agent-connect-icons {
  display: grid;
  grid-template-columns: repeat(2, 18px);
  grid-template-rows: repeat(2, 18px);
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.agent-icon-badge {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.agent-icon-badge img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}

.agent-connection-modal {
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
}

.agent-connection-free-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #d97706;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  vertical-align: 2px;
}

.agent-connection-tabs {
  margin: 0 0 4px;
}

.agent-connection-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.agent-connection-desc,
.agent-connection-warning {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.agent-connection-warning {
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
  border-radius: 8px;
}

.agent-connection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.agent-connection-grid code {
  display: block;
  padding: 8px 10px;
  background: #0b1220;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  word-break: break-all;
}

.agent-connection-text {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

/* 智能体默认模型（CLI 偏好，界面简化版） */
.cli-media-pref-panel {
  gap: 14px;
}

.cli-media-pref-intro {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
}

.cli-media-pref-intro-title {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.cli-media-pref-intro-desc {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.cli-media-pref-intro-desc strong {
  color: var(--text);
  font-weight: 600;
}

.cli-media-pref-world {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cli-media-pref-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.cli-media-pref-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cli-media-pref-subhint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cli-media-pref-loading,
.cli-media-pref-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.cli-media-pref-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cli-media-pref-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.02);
}

.cli-media-pref-row-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cli-media-pref-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cli-media-pref-row-head .label {
  margin: 0;
  font-size: 13px;
}

.cli-media-pref-save-state {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.4;
  padding-top: 1px;
}

.cli-media-pref-save-state.saving {
  color: var(--muted);
}

.cli-media-pref-save-state.saved {
  color: #16a34a;
}

.cli-media-pref-row-error {
  margin: 0;
  color: #dc2626;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .agent-connection-grid {
    grid-template-columns: 1fr;
  }

  .agent-connect-btn {
    width: 40px;
    height: 40px;
  }

  .agent-connect-icons {
    grid-template-columns: repeat(2, 14px);
    grid-template-rows: repeat(2, 14px);
    gap: 2px;
  }

  .agent-icon-badge img {
    width: 10px;
    height: 10px;
  }

  .user-info-wrapper {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .user-agent-row {
    gap: 6px;
  }

  .computing-power-display {
    gap: 6px;
    font-size: 12px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
  }

  .header-title-group .subtitle {
    display: none;
  }

  .title {
    font-size: 16px;
  }

  header > div:last-child {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }
}

.computing-power-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.computing-power-value {
  color: var(--primary);
  font-weight: 600;
}

.refresh-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--primary);
}

.checkin-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: transparent;
  color: var(--primary);
  border: none;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 4px;
  flex-shrink: 0;
  padding: 0 6px;
  white-space: nowrap;
}

.checkin-badge.checked {
  color: var(--primary);
  cursor: default;
}

.checkin-badge:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkin-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(102, 126, 234, 0.4);
  border-radius: 10px;
  padding: 14px 18px;
  color: #fff;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  max-width: 260px;
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}

.checkin-toast-title {
  font-size: 15px;
  font-weight: 600;
  color: #a78bfa;
}

.checkin-toast-sub {
  font-size: 13px;
  color: #e2e8f0;
  margin-top: 4px;
}

.checkin-toast-next {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.refresh-btn:active {
  transform: rotate(180deg);
}

/* Prevent template flashing before Vue initializes */
[v-cloak] {
  display: none !important;
}

/* Terms of Service Styles */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 12px;
}

.terms-checkbox input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}

.terms-link {
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}

.terms-link:hover {
  color: #16a34a;
}

.terms-modal {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.terms-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.terms-content h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--primary);
}

.terms-content h2 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.terms-content strong {
  color: var(--primary);
  font-weight: 600;
}

/* Invite Code Styles */
.clickable {
  cursor: pointer;
  transition: color 0.2s;
}

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

.invite-modal {
  position: relative;
  max-width: 500px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), transparent 34%),
    linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

.invite-modal::-webkit-scrollbar {
  display: none;
}

.invite-modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.invite-modal-eyebrow {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.invite-modal-title {
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.invite-modal-body {
  padding: 20px 24px 24px;
}

.invite-user-card,
.invite-stat-card,
.commission-balance-card,
.commission-withdraw-form,
.commission-rate-card,
.commission-record-item {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.invite-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.invite-user-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #052e16;
  font-weight: 800;
  background: var(--primary);
}

.invite-user-info {
  min-width: 0;
}

.invite-user-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-user-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-pass {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.11), transparent 34%, rgba(14, 165, 233, 0.08)),
    rgba(11, 18, 32, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.invite-pass::before,
.invite-pass::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d1422;
  transform: translateY(-50%);
}

.invite-pass::before {
  left: -11px;
}

.invite-pass::after {
  right: -11px;
}

.invite-pass-label {
  color: #a7f3d0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.invite-pass-code {
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 900;
  letter-spacing: 0.22em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-indent: 0.22em;
}

.invite-pass-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 10px;
}

.invite-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.invite-stat-card {
  position: relative;
  border-radius: 12px;
  padding: 13px;
  text-align: center;
}

.invite-stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 5px;
}

.invite-stat-value {
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.invite-stat-value span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
}

.invite-reward-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.26);
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
}

.invite-reward-mark {
  flex: 0 0 auto;
  min-width: 48px;
  padding: 7px 8px;
  border-radius: 10px;
  color: #052e16;
  background: var(--primary);
  font-weight: 900;
  text-align: center;
}

.invite-reward-title {
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.invite-reward-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 2px;
}

.invite-reward-desc strong {
  color: var(--primary);
}

.invite-copy-btn,
.commission-withdraw-btn,
.commission-confirm-btn,
.commission-save-btn {
  width: 100%;
}

.invite-copy-btn {
  padding: 13px;
  border-radius: 12px;
  font-size: 15px;
}

.commission-panel {
  margin-top: 22px;
}

.commission-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.commission-divider::before,
.commission-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(203, 213, 225, 0.35);
}

.commission-balance-card,
.commission-withdraw-form,
.commission-rate-card {
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 14px;
}

.commission-balance-main,
.commission-section-head,
.commission-record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.commission-balance-main {
  margin-bottom: 12px;
}

.commission-balance-main span,
.commission-section-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.commission-balance-main strong {
  color: #f59e0b;
  font-size: 28px;
  line-height: 1;
}

.commission-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.commission-mini-grid div {
  text-align: center;
}

.commission-mini-grid span,
.commission-record-time {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.commission-mini-grid strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.commission-withdraw-btn {
  margin-bottom: 16px;
}

.commission-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px 0;
}

.commission-link-btn:hover {
  color: var(--text);
}

.commission-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.commission-method-tabs button {
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(11, 18, 32, 0.75);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.commission-method-tabs button.active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.commission-field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.commission-withdraw-form .input {
  background: #0b1220;
  color: var(--text);
  border-color: #1e293b;
  margin-bottom: 10px;
}

.commission-confirm-btn {
  margin-top: 0;
}

.commission-section-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  font-size: 13px;
}

.commission-rate-range {
  width: 100%;
  margin: 10px 0 6px;
  accent-color: #22c55e;
}

.commission-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 10px;
}

.commission-save-btn {
  color: #bbf7d0;
  border: 1px solid #22c55e;
  background: rgba(11, 18, 32, 0.75);
}

.commission-record-title {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 9px;
}

.commission-empty {
  color: #94a3b8;
  font-size: 12px;
  padding: 8px 0;
}

.commission-record-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: none;
  padding-right: 2px;
}

.commission-record-list::-webkit-scrollbar {
  display: none;
}

.commission-record-item {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
}

.commission-record-user {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.commission-record-time {
  margin-top: 2px;
}

.commission-record-amount {
  color: #16a34a;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 520px) {
  .invite-modal {
    width: calc(100% - 20px);
  }

  .invite-modal-header,
  .invite-modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .invite-pass-code {
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .commission-balance-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Invite Tip in Register Form */
.invite-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.1);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 13px;
}

.tip-icon {
  font-size: 16px;
  line-height: 1;
}

.tip-text {
  color: var(--muted);
  line-height: 1.4;
}

.tip-text strong {
  color: var(--primary);
  font-weight: 600;
}

/* Progress bar styles */
.progress-container {
  margin-top: 16px;
  width: 100%;
}

.progress-bar-wrapper {
  width: 100%;
  height: 24px;
  background: rgba(16, 24, 48, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #16a34a);
  border-radius: 12px;
  transition: width 0.3s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}



.progress-time {
  font-weight: 600;
  color: var(--primary);
}

/* Scene layout with textarea on the left */
.scene-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.scene-textarea-left {
  flex: 1;
  min-width: 0;
}

.scene-buttons-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Video Results Styles */
.results {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-item .btn {
  margin-top: 8px;
  width: 100%;
  max-width: 240px;
}

.btn-full {
  width: 100%;
  display: inline-flex;
  justify-content: center;
}

/* Package List Styles */
.package-intro {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.package-intro-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.package-intro-subtext {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.package-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.package-item {
  position: relative;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.03) 100%);
  border: 2px solid rgba(34, 197, 94, 0.25);
  border-radius: 14px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.package-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.package-item:hover::before {
  opacity: 1;
}

.package-item:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
  border-color: var(--primary);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
}

.package-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.package-title-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.package-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.package-computing-power {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.package-computing-power::before {
  content: '⚡';
  font-size: 16px;
}

.package-price-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.package-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.package-unit-price {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.package-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.package-select-hint {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.package-arrow {
  font-size: 18px;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.package-item:hover .package-arrow {
  transform: translateX(4px);
}

/* Loading Spinner */
.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid rgba(34, 197, 94, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ICP备案信息 */
.icp-footer {
  padding: 16px 20px;
  text-align: left;
  margin-top: 20px;
}

.icp-footer a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s ease;
}

.icp-footer a:hover {
  color: var(--text);
}

.footer-row {
  margin-bottom: 8px;
}

.footer-row:last-child {
  margin-bottom: 0;
}

/* 本地环境开源及社交信息 */
.local-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.local-footer-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}

.local-footer-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.social-icon {
  color: var(--muted);
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  line-height: 0;
}

.social-icon:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.social-icon svg {
  fill: currentColor;
}

/* Homepage Container */
.homepage-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
}

/* Current Mode Bar */
.current-mode-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 10px;
  margin-bottom: 16px;
}

.current-mode-label {
  font-size: 13px;
  color: var(--muted);
}

.current-mode-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.mode-switch-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.5);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  color: #a5b4fc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-switch-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  color: #c7d2fe;
}

/* Start Creation Banner */
.start-creation-banner {
  background: linear-gradient(135deg, #06b6d4 0%, #a855f7 50%, #8b5cf6 100%);
  border-radius: 16px;
  padding: 40px 32px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.start-creation-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.start-creation-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

.banner-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.banner-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.banner-sparkle {
  font-size: 28px;
}

.banner-title {
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin: 0;
  letter-spacing: 2px;
}

.banner-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.banner-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* Feature Cards */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.feature-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.feature-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.feature-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.feature-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.feature-card-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
}

.feature-card-icon.purple {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.feature-card-icon.storyboard {
  background: linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
}

.feature-card-info {
  flex: 1;
}

.feature-card-title {
  font-size: 17px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.feature-card-subtitle {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.8);
}

.feature-card-body {
  flex: 1;
}

.feature-card-desc {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.7);
  margin: 0;
  line-height: 1.5;
}

.feature-card-footer {
  margin-top: auto;
  padding-top: 12px;
}

.feature-card-link {
  font-size: 16px;
  color: #06b6d4;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-card-link {
  color: #22d3ee;
  transform: translateX(4px);
  display: inline-block;
}

/* AI Tools Section */
.ai-tools-section {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.ai-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.ai-tools-header:hover {
  background: rgba(30, 41, 59, 0.7);
}

.ai-tools-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ai-tools-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-tools-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-tools-title {
  font-size: 15px;
  font-weight: 600;
  color: white;
}

.ai-tools-subtitle {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.7);
}

.ai-tools-toggle {
  transition: transform 0.3s ease;
  color: rgba(148, 163, 184, 0.9);
}

.ai-tools-toggle.expanded {
  transform: rotate(180deg);
}

.ai-tools-content {
  border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.ai-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(71, 85, 105, 0.2);
}

/* Tool Card */
.tool-card {
  background: rgba(15, 23, 42, 0.7);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 130px;
}

.tool-card:hover {
  background: rgba(30, 41, 59, 0.9);
}

.tool-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.tool-card-icon.blue { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.tool-card-icon.purple { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%); }
.tool-card-icon.orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); }
.tool-card-icon.green { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); }
.tool-card-icon.yellow { background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%); }
.tool-card-icon.pink { background: linear-gradient(135deg, #ec4899 0%, #db2777 100%); }
.tool-card-icon.teal { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); }

.tool-card-info {
  flex: 1;
}

.tool-card-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.tool-card-desc {
  font-size: 12px;
  color: rgba(148, 163, 184, 0.7);
  line-height: 1.4;
}

.tool-card-btn {
  background: transparent;
  border: 1px solid rgba(34, 197, 94, 0.6);
  border-radius: 4px;
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 500;
  color: #22c55e;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-end;
  margin-top: auto;
}

.tool-card-btn:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
}

/* Feedback Button */
.feedback-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #16a34a 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.5);
}

.feedback-modal-content {
  text-align: center;
}

.feedback-qr-code {
  max-width: 280px;
  width: 100%;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-tip {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.6;
}

.wx-group-footer-link {
  margin-left: 12px;
  color: #86efac;
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
}

.wx-group-footer-link:hover {
  text-decoration: underline;
  color: #bbf7d0;
}

/* 官方微信群：注册后右下角轻量浮层（无遮罩） */
.wx-group-soft-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: min(300px, calc(100vw - 32px));
  background: rgba(17, 24, 39, 0.98);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 12px;
  padding: 16px 16px 12px;
  color: var(--text);
  z-index: 1001;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: slideInRight 0.28s ease;
}

.wx-group-soft-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.wx-group-soft-close:hover {
  color: var(--text);
}

.wx-group-soft-title {
  font-size: 15px;
  font-weight: 600;
  color: #86efac;
  margin-bottom: 6px;
  padding-right: 20px;
}

.wx-group-soft-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 10px;
}

.wx-group-soft-qr {
  display: block;
  width: 160px;
  height: auto;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: #fff;
}

.wx-group-soft-fallback {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 10px;
}

.wx-group-soft-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.wx-group-soft-dont {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.wx-group-soft-dont input {
  margin: 0;
  cursor: pointer;
}

/* Mode Selection Styles */
.mode-select-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mode-select-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-select-item:hover:not(.disabled) {
  border-color: var(--primary);
  background: rgba(34, 197, 94, 0.05);
}

.mode-select-item.active {
  border-color: var(--primary);
  background: rgba(34, 197, 94, 0.1);
}

.mode-select-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.mode-select-content {
  flex: 1;
}

.mode-select-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.mode-select-desc {
  font-size: 13px;
  color: var(--muted);
}

.beta-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.4;
}

.mode-select-check {
  font-size: 20px;
  color: var(--primary);
  font-weight: bold;
}

/* User Settings Modal Styles */
.settings-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.settings-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.settings-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.settings-select:hover {
  border-color: var(--primary);
}

.settings-select:focus {
  outline: none;
  border-color: var(--primary);
}

.status.success {
  color: var(--primary);
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
}

.status.danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
}

/* @ Mention Dropdown */
.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #0f1a2e;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 4px;
}

.mention-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mention-dropdown-item:last-child {
  border-bottom: none;
}

.mention-dropdown-item:hover,
.mention-dropdown-item.selected {
  background: rgba(59, 130, 246, 0.15);
}

/* ========== 技能配置页面 ========== */
.skill-config-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.skill-config-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.skill-config-header h1 {
  font-size: 24px;
  color: #e2e8f0;
  margin: 0;
}

.back-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.back-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #e2e8f0;
}

.skill-config-desc {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.skill-loading {
  text-align: center;
  padding: 60px 0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.skill-error {
  color: #f87171;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skill-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s;
}
.skill-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

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

.skill-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 2px;
}

.skill-card-id {
  font-size: 12px;
  color: #64748b;
  font-family: monospace;
  margin-bottom: 4px;
}

.skill-card-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.skill-size {
  font-size: 12px;
  color: #64748b;
}

.skill-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.skill-badge.custom {
  background: rgba(20,184,166,0.15);
  color: #14b8a6;
}
.skill-badge.default {
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
}

.skill-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.skill-btn {
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.skill-btn:hover {
  background: rgba(255,255,255,0.1);
}
.skill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.skill-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: #fff;
}
.skill-btn.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* 技能编辑弹窗 */
.skill-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.skill-modal {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  width: 90vw;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.skill-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.skill-modal-header h2 {
  font-size: 18px;
  color: #e2e8f0;
  margin: 0;
}
.skill-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.skill-modal-close:hover {
  color: #e2e8f0;
}

.skill-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 0;
  color: #94a3b8;
}

.skill-modal-info {
  padding: 12px 24px;
  font-size: 13px;
  color: #94a3b8;
}
.skill-modal-label {
  color: #64748b;
}

.skill-modal-body {
  flex: 1;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.skill-textarea {
  width: 100%;
  min-height: 400px;
  max-height: 60vh;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #e2e8f0;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  padding: 16px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.skill-textarea:focus {
  border-color: #3b82f6;
}

.skill-textarea-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  padding: 8px 0;
}
.skill-changed {
  color: #f59e0b;
}

.skill-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ========== 营销模式首页样式 ========== */
/* 覆盖 body 深色背景，确保营销模式没有黑边 */
html.marketing-mode body {
  background: #f8f9fa;
}

html.marketing-mode .container {
  padding: 0;
  max-width: none;
  background: #f8f9fa;
}

.homepage-container.marketing-mode {
  padding: 0;
  max-width: none;
}

.marketing-home {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #f8f9fa;
  overflow: hidden;
}

.marketing-nav {
  width: 64px;
  background: #fff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 4px;
  flex-shrink: 0;
}

.marketing-nav-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 16px;
  border-radius: 10px;
  transition: background 0.2s;
}

.marketing-nav-logo:hover {
  background: #f0f0f0;
}

.marketing-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  width: 56px;
  color: #666;
}

.marketing-nav-item:hover {
  background: #f0f0f0;
  color: #333;
}

.marketing-nav-item.active {
  background: #e6f7ff;
  color: #00a8e6;
}

.marketing-nav-icon {
  font-size: 20px;
  line-height: 1;
}

.marketing-nav-text {
  font-size: 11px;
  line-height: 1.2;
}

.marketing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
  gap: 24px;
}

.marketing-hero {
  text-align: center;
  margin-bottom: 8px;
}

.marketing-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.marketing-title-highlight {
  color: #00a8e6;
}

.marketing-input-section {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.marketing-input-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.marketing-input-upload {
  flex-shrink: 0;
}

.marketing-upload-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px dashed #d0d0d0;
  background: #fafafa;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.marketing-upload-btn:hover {
  border-color: #00a8e6;
  color: #00a8e6;
  background: #f0f9ff;
}

.marketing-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.6;
  color: #1a1a1a;
  background: transparent;
  min-height: 60px;
  font-family: inherit;
}

.marketing-textarea::placeholder {
  color: #aaa;
}

.marketing-input-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

.marketing-input-bar-left {
  display: flex;
  gap: 8px;
  align-items: center;
}

.marketing-input-bar-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.marketing-bar-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.marketing-bar-btn:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.marketing-at-icon {
  color: #00a8e6;
  font-weight: 600;
}

.marketing-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #00a8e6;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.marketing-send-btn:hover:not(:disabled) {
  background: #0095cc;
}

.marketing-send-btn:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
}

.marketing-creation-types {
  width: 100%;
}

.marketing-type-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 12px;
}

.marketing-type-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.marketing-type-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 140px;
}

.marketing-type-item:hover {
  border-color: #00a8e6;
  box-shadow: 0 2px 8px rgba(0,168,230,0.1);
}

.marketing-type-item.active {
  border-color: #00a8e6;
  background: #f0f9ff;
}

.marketing-type-icon {
  font-size: 20px;
}

.marketing-type-info {
  flex: 1;
}

.marketing-type-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.marketing-type-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.marketing-type-check {
  color: #00a8e6;
  font-weight: 600;
}

.marketing-feature-cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.marketing-feature-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8e8e8;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.marketing-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.marketing-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}

.marketing-feature-title {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.marketing-feature-desc {
  font-size: 12px;
  color: #999;
}

/* 图片模式分段按钮 */
.mode-segment {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.mode-segment-item {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  background: transparent;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
  user-select: none;
}

.mode-segment-item:last-child {
  border-right: none;
}

.mode-segment-item:hover {
  color: var(--text);
}

.mode-segment-item.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--primary);
  font-weight: 600;
}

/* ===== 数字人顶部卡片标签 tab ===== */
/* 仅覆盖「直接包含 .dh-tabs」的 .form（即数字人页根容器），
   不影响其他页面的 .form。让 tab+body 撑满容器形成一体卡片。*/
.form > .dh-tabs {
  padding: 0;
  border-top: none;
}
.dh-tabs {
  display: flex;
  gap: 4px;
  margin: 0 4px -1px; /* 左右 4px 与 body 对齐；-1px 让选中项底边与下方卡片无缝衔接 */
}

.dh-tab {
  position: relative;
  flex: 1;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: center;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .06s ease;
}

.dh-tab:hover:not(:disabled):not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.dh-tab:active:not(:disabled) {
  transform: translateY(1px);
}

.dh-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 选中态：绿色凸起卡片，底边与下方表单卡片重合 */
.dh-tab.active {
  color: #051b0d; /* 与 .btn 文字色一致 */
  background: var(--primary);
  border-color: var(--border);
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 表单主体卡片：承接 tab，形成「标签翻起 + 卡片」一体感 */
.dh-tab-body {
  margin: 0 4px; /* 与 .dh-tabs 左右对齐 */
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  padding: 16px;
  background: var(--panel);
}
