/* ============================================
   ARK 代理下单控制台 - 动漫风格主样式
   颜值语商城 · 对话式 UI · Anime Vibe
   ============================================ */

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

:root {
  /* 动漫风格：粉紫青霓虹 */
  --ark-primary: #ff4d8d;          /* 樱花粉红 */
  --ark-primary-dark: #e63b7a;
  --ark-primary-light: #ff7eb3;
  --ark-secondary: #8b5cf6;        /* 紫色 */
  --ark-cyan: #22d3ee;             /* 青色霓虹 */
  --ark-gold: #fbbf24;             /* 金色 */
  --ark-gold-light: #fde68a;
  --ark-mint: #34d399;             /* 薄荷绿 */

  /* 玻璃拟态背景 */
  --bg-deep: #0f0524;
  --bg-dark: #170a36;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-card-solid: #1f1240;
  --bg-input: rgba(255, 255, 255, 0.08);
  --bg-hover: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.22);
  --border-glow: rgba(255, 77, 141, 0.45);

  /* 文字 */
  --text-primary: #fff5fb;
  --text-secondary: #c4b8e0;
  --text-muted: #8b7eb0;

  /* 状态色 */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #ff4d6d;
  --info: #22d3ee;

  /* 圆角阴影 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-glow-pink: 0 0 24px rgba(255, 77, 141, 0.35), 0 8px 24px rgba(0,0,0,0.4);
  --shadow-glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35), 0 8px 24px rgba(0,0,0,0.4);
  --shadow-glow-gold: 0 0 18px rgba(251, 191, 36, 0.4);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255,255,255,0.04);
}

html, body {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  /* 动漫渐变背景层 */
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255, 77, 141, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(34, 211, 238, 0.15) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.12) 0%, transparent 70%),
    linear-gradient(180deg, #0f0524 0%, #170a36 100%);
  background-attachment: fixed;
}

/* 樱花飘落动画层（用伪元素） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 20%, rgba(255, 182, 220, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 30% 60%, rgba(255, 200, 230, 0.6), transparent),
    radial-gradient(2.5px 2.5px at 70% 30%, rgba(255, 160, 200, 0.5), transparent),
    radial-gradient(1.8px 1.8px at 85% 75%, rgba(255, 220, 240, 0.6), transparent),
    radial-gradient(2px 2px at 45% 85%, rgba(255, 200, 230, 0.5), transparent);
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
  animation: petalFloat 12s ease-in-out infinite alternate;
  opacity: 0.7;
}

@keyframes petalFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0.5; }
  50%  { opacity: 0.8; }
  100% { transform: translateY(-30px) translateX(20px); opacity: 0.5; }
}

.hidden { display: none !important; }

/* ============================================
   登录界面
   ============================================ */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2;
  background-image:
    radial-gradient(circle at 50% 20%, rgba(255, 77, 141, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 50% 80%, rgba(34, 211, 238, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #0f0524 0%, #170a36 100%);
}

.login-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 44px 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-glow-pink);
  position: relative;
  overflow: hidden;
}

/* 登录卡顶部装饰光带 */
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ark-cyan), var(--ark-primary), var(--ark-gold), var(--ark-secondary));
  background-size: 200% 100%;
  animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.login-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary) 50%, var(--ark-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: white;
  box-shadow: var(--shadow-glow-pink);
  animation: logoPulse 3s ease-in-out infinite;
  position: relative;
}

.login-logo::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 77, 141, 0.4);
  animation: ringExpand 2.5s ease-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 24px rgba(255, 77, 141, 0.4), 0 8px 24px rgba(0,0,0,0.4); }
  50%      { transform: scale(1.04); box-shadow: 0 0 36px rgba(255, 77, 141, 0.6), 0 8px 24px rgba(0,0,0,0.4); }
}

@keyframes ringExpand {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.login-card h1 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, #ffb8d6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.form-group input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.25s ease;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  outline: none;
  border-color: var(--ark-primary);
  background: rgba(255, 77, 141, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 77, 141, 0.18);
}

.btn-login {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.btn-login:hover::before { left: 100%; }

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 77, 141, 0.45);
}

.btn-login:active {
  transform: translateY(0);
}

.login-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.login-foot {
  margin-top: 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ============================================
   主控制台
   ============================================ */
.console {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* 顶栏 - 玻璃拟态 */
.topbar {
  background: linear-gradient(135deg, rgba(31, 18, 64, 0.85), rgba(23, 10, 54, 0.85));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  position: relative;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ark-primary), var(--ark-cyan), transparent);
  opacity: 0.5;
}

/* 第一行：个人信息（logo + 标题 + 刷新 + 退出） */
.topbar-row-personal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* 第二行：地址 + 余额（ARK + ¥ + 连接钱包） */
.topbar-row-wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mini {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  box-shadow: 0 4px 14px rgba(255, 77, 141, 0.4);
  position: relative;
  animation: logoPulse 4s ease-in-out infinite;
}

.topbar-title .title-main {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #ffd0e5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-title .title-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.ark-badge, .user-badge, .btn-wallet {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.25s;
  cursor: pointer;
}

.ark-badge {
  color: var(--ark-gold);
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(255,255,255,0.04));
}

.ark-badge:hover { box-shadow: var(--shadow-glow-gold); }

.user-badge {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(255,255,255,0.04));
  border-color: rgba(34, 211, 238, 0.3);
}

.user-badge:hover { box-shadow: var(--shadow-glow-cyan); }

.btn-wallet {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(255, 77, 141, 0.22));
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.25);
  margin-left: auto;
}

.btn-wallet:hover {
  border-color: var(--ark-secondary);
  color: #c4b5fd;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.btn-wallet.connected {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(34, 211, 238, 0.15));
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.35);
}

.btn-refresh, .btn-logout {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all 0.25s;
}

.btn-refresh:hover {
  color: var(--ark-cyan);
  border-color: var(--ark-cyan);
  transform: rotate(180deg);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.4);
}

.btn-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 14px rgba(255, 77, 109, 0.4);
}

/* 对话区 */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 16px;
  scroll-behavior: smooth;
}

.chat-area::-webkit-scrollbar { width: 8px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--ark-primary), var(--ark-secondary));
  border-radius: 4px;
}

/* 欢迎消息 */
.welcome-message {
  text-align: center;
  padding: 40px 20px 20px;
  max-width: 640px;
  margin: 0 auto;
}

.welcome-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary) 50%, var(--ark-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: white;
  box-shadow: var(--shadow-glow-pink);
  animation: logoPulse 3s ease-in-out infinite;
  position: relative;
}

.welcome-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 77, 141, 0.4);
  animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.welcome-message h2 {
  font-size: 22px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff, #ffb8d6 60%, var(--ark-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.welcome-message p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 30px;
}

.quick-cmds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.quick-cmd {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.quick-cmd::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.quick-cmd i {
  font-size: 24px;
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s;
}

.quick-cmd:hover {
  border-color: var(--ark-primary);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 28px rgba(255, 77, 141, 0.3);
}

.quick-cmd:hover i {
  transform: scale(1.15);
  background: linear-gradient(135deg, #fff, #ffe0ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 对话气泡 */
.message {
  max-width: 720px;
  margin: 0 auto 18px;
  display: flex;
  gap: 12px;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.message.user .message-avatar {
  background: linear-gradient(135deg, var(--ark-cyan), var(--ark-secondary));
}

.message.ai .message-avatar {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-gold));
  box-shadow: 0 4px 14px rgba(255, 77, 141, 0.4);
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-sender {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.message-bubble {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
  position: relative;
  box-shadow: var(--shadow-card);
}

.message.user .message-bubble {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 6px 20px rgba(255, 77, 141, 0.35);
}

.message-bubble h3 {
  font-size: 15px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--ark-gold), var(--ark-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.message-bubble ul {
  margin: 8px 0;
  padding-left: 20px;
}

.message-bubble li {
  margin: 4px 0;
}

/* 商品卡片 */
.product-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  box-shadow: 0 8px 20px rgba(255, 77, 141, 0.2);
}

.product-card .product-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
}

.product-card .product-img-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
}

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

.product-card .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.product-card .meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.product-card .price {
  color: var(--ark-gold);
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.product-card button {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 12px rgba(255, 77, 141, 0.3);
}

.product-card button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(255, 77, 141, 0.5);
}

/* 订单卡片 */
.order-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 10px 0;
}

.order-card .row {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 13px;
}

.order-card .order-id {
  color: var(--text-secondary);
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.status-paid      { background: rgba(52, 211, 153, 0.25); color: var(--success); box-shadow: 0 0 10px rgba(52, 211, 153, 0.3); }
.status-unpaid    { background: rgba(255, 77, 109, 0.25); color: var(--danger); box-shadow: 0 0 10px rgba(255, 77, 109, 0.3); }
.status-shipped   { background: rgba(34, 211, 238, 0.25); color: var(--info);   box-shadow: 0 0 10px rgba(34, 211, 238, 0.3); }
.status-completed { background: rgba(52, 211, 153, 0.25); color: var(--success); box-shadow: 0 0 10px rgba(52, 211, 153, 0.3); }

/* 地址卡片 */
.address-card {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 10px 0;
}

.address-card .name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.address-card .detail {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 操作按钮组 */
.action-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.action-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s;
}

.action-btn:hover {
  border-color: var(--ark-primary);
  color: var(--ark-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 77, 141, 0.25);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 14px rgba(255, 77, 141, 0.35);
}

.action-btn.primary:hover {
  background: linear-gradient(135deg, var(--ark-primary-light), var(--ark-primary));
  color: white;
  box-shadow: 0 6px 20px rgba(255, 77, 141, 0.5);
}

/* ARK 充值卡 */
.ark-recharge-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(255, 77, 141, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin: 12px 0;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.12);
}

.ark-recharge-card .label {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ark-recharge-card .address {
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  color: var(--ark-gold);
  font-size: 13px;
  word-break: break-all;
  background: rgba(0,0,0,0.3);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
  border: 1px solid rgba(251, 191, 36, 0.25);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
}

.copy-btn:hover {
  color: var(--ark-gold);
  border-color: var(--ark-gold);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* 输入区 - 玻璃拟态 */
.input-area {
  background: linear-gradient(135deg, rgba(31, 18, 64, 0.85), rgba(23, 10, 54, 0.85));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 14px 20px 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.input-area::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ark-primary), var(--ark-cyan), transparent);
  opacity: 0.5;
}

@media (max-width: 768px) {
  .input-area {
    padding: 12px 12px 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

.input-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 14px;
  transition: all 0.25s;
}

.input-box:focus-within {
  border-color: var(--ark-primary);
  box-shadow: 0 0 0 3px rgba(255, 77, 141, 0.18), 0 0 24px rgba(255, 77, 141, 0.2);
  background: rgba(255, 77, 141, 0.05);
}

#messageInput {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.5;
  padding: 6px 0;
}

#messageInput::placeholder { color: var(--text-muted); }

.btn-send {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-secondary));
  color: white;
  border: none;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(255, 77, 141, 0.35);
}

.btn-send:hover {
  transform: scale(1.1) rotate(-8deg);
  box-shadow: 0 6px 18px rgba(255, 77, 141, 0.5);
}

.btn-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-hint i {
  color: var(--ark-cyan);
}

/* 加载遮罩 */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 5, 36, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: 18px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 77, 141, 0.2);
  border-top-color: var(--ark-primary);
  border-right-color: var(--ark-cyan);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  box-shadow: 0 0 24px rgba(255, 77, 141, 0.3);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(255, 77, 141, 0.4);
}

/* 打字指示器 */
.typing {
  display: flex;
  gap: 5px;
  padding: 4px 0;
}

.typing span {
  width: 9px;
  height: 9px;
  background: var(--ark-primary);
  border-radius: 50%;
  animation: bounce 1.4s infinite;
  box-shadow: 0 0 8px rgba(255, 77, 141, 0.5);
}

.typing span:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--ark-secondary);
}

.typing span:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--ark-cyan);
}

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-10px); opacity: 1; }
}

/* 响应式 */
@media (max-width: 600px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar-row-wallet { padding-top: 6px; gap: 8px; }
  .topbar-title .title-main { font-size: 14px; }
  .topbar-title .title-sub { font-size: 11px; }
  .ark-badge, .user-badge { padding: 5px 10px; font-size: 12px; }
  .btn-wallet { padding: 5px 10px; font-size: 12px; }
  .btn-refresh, .btn-logout { width: 34px; height: 34px; font-size: 15px; }
  .chat-area { padding: 16px 12px; }
  .input-area { padding: 12px 12px 14px; }
  .quick-cmds { grid-template-columns: repeat(2, 1fr); }
  .login-card { padding: 36px 24px 28px; }
  .login-logo { width: 76px; height: 76px; font-size: 38px; }
  .welcome-icon { width: 72px; height: 72px; font-size: 36px; }
}

/* ============================================
   链上钱包余额查询卡片 - 动漫风强化
   ============================================ */
.wallet-card {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(255, 77, 141, 0.08));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 480px;
  margin: 10px 0;
  box-shadow: var(--shadow-card);
}

.wallet-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.wallet-header i {
  background: linear-gradient(135deg, var(--ark-cyan), var(--ark-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 20px;
}

.wallet-chain {
  margin-left: auto;
  background: linear-gradient(135deg, var(--ark-cyan), var(--ark-secondary));
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}

.wallet-address {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.wallet-address .addr-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.wallet-address code {
  flex: 1;
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}

.btn-copy-mini {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.25s;
  flex-shrink: 0;
}

.btn-copy-mini:hover {
  color: var(--ark-cyan);
  border-color: var(--ark-cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.wallet-assets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s;
}

.asset-item:hover {
  transform: translateX(4px);
  border-color: var(--border-glow);
}

.ark-asset {
  border-left: 4px solid var(--ark-gold);
  box-shadow: -2px 0 12px rgba(251, 191, 36, 0.2);
}

.bnb-asset {
  border-left: 4px solid #f0b90b;
  box-shadow: -2px 0 12px rgba(240, 185, 11, 0.2);
}

.asset-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ark-asset .asset-icon {
  background: linear-gradient(135deg, var(--ark-primary), var(--ark-gold));
  color: white;
}

.bnb-asset .asset-icon {
  background: linear-gradient(135deg, #f0b90b, #fbbf24);
  color: #1a1a1a;
}

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

.asset-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.asset-contract {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
}

.asset-balance {
  text-align: right;
  flex-shrink: 0;
}

.bal-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(255, 77, 141, 0.3);
}

.bal-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.wallet-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.wallet-footer i {
  color: var(--ark-cyan);
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 600px) {
  .wallet-card { padding: 16px; }
  .wallet-address code { font-size: 11px; }
  .bal-num { font-size: 18px; }
  .asset-item { padding: 12px 14px; }
}

/* 链接默认样式 */
a {
  color: var(--ark-cyan);
  text-decoration: none;
  transition: all 0.2s;
}

a:hover {
  color: var(--ark-primary-light);
  text-shadow: 0 0 10px rgba(255, 77, 141, 0.4);
}

/* 代码块 */
code, pre {
  font-family: 'SF Mono', Menlo, Monaco, Consolas, monospace;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--ark-cyan);
}

pre {
  padding: 10px 12px;
  border: 1px solid var(--border);
  overflow-x: auto;
}

/* 分隔线 */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  margin: 14px 0;
}
