body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #020617;
  /* 防止移动端横向溢出 */
  overflow-x: hidden;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #020617;
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* 移动端优化：输入框字体防止缩放 + 暗色背景/文字 */
input,
select,
textarea {
  font-size: 16px !important; /* iOS 防止缩放 */
  background-color: #020617;
  color: #e5e7eb;
  border-color: #1f2937;
}
@media (min-width: 640px) {
  input,
  select,
  textarea {
    font-size: 13px !important; /* 桌面端保持精致 */
  }
}

[x-cloak] {
  display: none !important;
}

/* 隐藏滚动条但保持功能 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

/* 组件级 CSS 简版（去掉 @apply，保证浏览器可解析） */
.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  background-color: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-tool:hover {
  background-color: #1f2937;
  border-color: #374151;
  color: #ffffff;
  transform: translateY(-0.5px);
}
.btn-tool:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 10px 25px rgba(12, 74, 110, 0.4);
}
.btn-primary:hover {
  background-color: #0ea5e9;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background-color: #020617;
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-secondary:hover {
  background-color: #111827;
}
.btn-secondary:active {
  transform: scale(0.98);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 0.25rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  background-color: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6b7280;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
}

.input-select {
  background-color: #020617;
  border: 1px solid #1f2937;
  color: #e5e7eb;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  background-color: rgba(15, 23, 42, 0.8);
  border: 1px solid #1f2937;
  font-size: 0.625rem;
  color: #9ca3af;
}

.stat-card {
  padding: 10px 12px;
  background: #0f1013;
  border-radius: 10px;
  border: 1px solid #3c4043;
  text-align: center;
}
.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #6ea8fe;
}
.stat-label {
  font-size: 12px;
  color: #98a2b3;
  margin-top: 2px;
}

/* NF 用户卡片样式 */
.nf-user-card {
  border: 1px solid;
  background-color: rgba(15, 23, 42, 0.6);
  transition: all 0.15s ease;
}

.nf-user-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 徽章基类 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.625rem;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
}

/* 创始用户徽章 */
.badge-founder {
  background-color: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

/* 永久 Pro 徽章 */
.badge-lifetime {
  background-color: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
  color: #a78bfa;
}

/* 推荐人数徽章 */
.badge-referral {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

/* 兑换码状态相关样式 */
.code-row-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.text-code-muted {
  color: #6b7280;
}

.text-code-active {
  color: #38bdf8;
}
