/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局背景 + 字体 */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* 主容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 顶部标题 */
.header {
  padding: 10px 0 20px;
  text-align: center;
}

.header h1 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 2px;
}

/* 主卡片 */
.main-card {
  background: #ffffff;
  border: 1px solid #e3e6ec;
  border-radius: 14px;
  padding: 22px 22px 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.main-card-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* 分区 */
.section {
  padding-bottom: 18px;
  border-bottom: 1px solid #eceff4;
}

.section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f6;
  letter-spacing: 1px;
}

/* 表单控件布局 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 13px;
}

/* 输入/选择框统一样式 */
.auth-input,
.currency-input,
textarea,
select,
input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #dde2ec;
  border-radius: 6px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus,
.currency-input:focus,
textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #4c8dff;
  box-shadow: 0 0 0 2px rgba(76, 141, 255, 0.15);
}

/* textarea 细节 */
.textarea,
textarea {
  resize: vertical;
  min-height: 70px;
  font-size: 13px;
}

/* 按钮基础样式 */
.btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #d0d7e6;
  background: #f7f9fc;
  color: #203047;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.btn:hover {
  background: #e7edf8;
  border-color: #c3cbe0;
}

.btn:disabled {
  background: #f2f4f8;
  color: #9aa4b7;
  border-color: #e0e4f0;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-primary {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1f2933;
  border-color: #1f2933;
}

.btn-secondary {
  background: #e5e7eb;
  border-color: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d4d4d8;
  border-color: #d4d4d8;
}

.btn-info {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #ffffff;
}

.btn-info:hover {
  background: #0284c7;
  border-color: #0284c7;
}

.btn-send {
  background: linear-gradient(90deg, #1fa2ff, #12d8fa);
  border-color: transparent;
  color: #ffffff;
}

.btn-send:hover {
  filter: brightness(0.95);
}

.btn-login {
  background: linear-gradient(90deg, #6c5ce7, #8e44ad);
  border-color: transparent;
  color: #ffffff;
}

.btn-login:hover {
  filter: brightness(0.95);
}

.btn-full {
  width: 100%;
}

/* 按钮组 */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn-group .btn {
  flex: 1;
  min-width: 0;
}

/* 身份验证区域专用布局 */
.auth-section .auth-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.auth-section .auth-button-group {
  display: flex;
  gap: 8px;
}

/* 状态提示条 */
.status-indicator {
  padding: 8px 10px;
  background: #f3f4f6;
  border-left: 3px solid #9ca3af;
  margin-bottom: 10px;
  font-size: 12px;
  border-radius: 4px;
  color: #4b5563;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.status-indicator.info {
  background: #e0f2fe;
  border-left-color: #0ea5e9;
  color: #0369a1;
}

.status-indicator.success {
  background: #ecfdf3;
  border-left-color: #22c55e;
  color: #15803d;
}

.status-indicator.error {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #b91c1c;
}

/* 当前数据展示区 */
.data-display-section {
  background: #f8fafc;
  padding: 12px 12px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.resource-values-row,
.resource-labels-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.resource-value,
.resource-label {
  min-width: 64px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.resource-values-row .resource-value {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

.resource-label {
  font-size: 11px;
  color: #6b7280;
}

/* 货币输入区 */
.currency-panel {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.currency-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #ffffff;
  border: 1px solid #dde3ea;
}

.currency-label {
  min-width: 60px;
  font-size: 13px;
  color: #374151;
}

/* 日志区 */
.log-section {
  margin-top: 12px;
}

.log-title {
  font-size: 13px;
  margin-bottom: 6px;
  color: #4b5563;
}

.log-box {
  background: #111827;
  color: #9fe99f;
  padding: 10px;
  min-height: 160px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12px;
  font-family: Consolas, Menlo, monospace;
  white-space: pre-wrap;
  border-radius: 6px;
}

/* 自适应 */
@media (max-width: 1024px) {
  .main-card {
    padding: 18px 14px 20px;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .auth-section .auth-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-section .auth-button-group {
    width: 100%;
  }

  .auth-section .auth-button-group .btn {
    flex: 1;
  }

  .resource-values-row,
  .resource-labels-row {
    justify-content: flex-start;
  }
}
