/* 澶╅緳鍙戝彿浠?- 鍏ㄥ眬鏍峰紡 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #e74c3c;
  --primary-light: #ff6b6b;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --bg: #f5f5f5;
  --card: #ffffff;
  --text: #333333;
  --text-secondary: #999999;
  --border: #e8e8e8;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 70px;
  -webkit-font-smoothing: antialiased;
}

/* 椤堕儴瀵艰埅 */
.top-bar {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar h1 { font-size: 18px; font-weight: 600; }
.top-bar .user-info { font-size: 13px; opacity: 0.9; }

/* 搴曢儴 Tab */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 480px;
  width: 100%;
  background: white;
  display: flex;
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.tab-item {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  text-decoration: none;
}
.tab-item.active { color: var(--primary); }
.tab-item .icon { font-size: 22px; display: block; margin-bottom: 2px; }

/* 鍐呭�瑰�?*/
.content { padding: 12px 16px; }

/* 鍗＄墖 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

/* 璐﹀彿鍗＄墖锛堝彿鍒楄〃锛?*/
.account-card {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s;
}
.account-card:active { transform: scale(0.98); }
.account-card .score-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 10px;
  padding: 8px 14px;
  text-align: center;
  min-width: 70px;
  margin-right: 12px;
}
.score-badge .num { font-size: 22px; font-weight: 700; line-height: 1.2; }
.score-badge .unit { font-size: 11px; opacity: 0.8; }
.account-card .info { flex: 1; }
.account-card .info .sect { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.account-card .info .meta { font-size: 12px; color: var(--text-secondary); }
.account-card .action { text-align: right; }
.account-card .action .rate { color: var(--danger); font-size: 16px; font-weight: 700; }
.account-card .action .deposit { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
.account-card .action .deposit.free { color: var(--success); }

/* 鎸夐挳 */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-outline { background: white; color: var(--primary); border: 1px solid var(--primary); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; display: block; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 琛ㄥ崟 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); }
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: white;
  outline: none;
}

/* 鏍囩�� */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.tag-primary { background: #fde8e8; color: var(--primary); }
.tag-success { background: #d5f5e3; color: var(--success); }
.tag-warning { background: #fef5e7; color: var(--warning); }
.tag-info { background: #dbeafe; color: #3b82f6; }
.tag-gray { background: #f0f0f0; color: #999; }
.tag-danger { background: #fde2e2; color: #e74c3c; }

/* 寮圭獥 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
}
.modal-content {
  background: white;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px 16px;
}
.modal-content h3 { font-size: 17px; margin-bottom: 16px; text-align: center; }

/* 璁℃椂鍣?*/
.timer-display {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.timer-display .time { font-size: 42px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer-display .label { font-size: 13px; opacity: 0.8; margin-top: 4px; }

/* 绌虹姸鎬?*/
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}
.empty-state .icon { font-size: 60px; margin-bottom: 16px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* 绛涢�夋爮 */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-bar .filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
}
.filter-bar .filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 鐧诲綍椤?*/
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}
.login-page .logo { font-size: 48px; margin-bottom: 10px; }
.login-page h1 { font-size: 28px; margin-bottom: 6px; }
.login-page .subtitle { font-size: 14px; opacity: 0.8; margin-bottom: 30px; }
.login-page .form-card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  color: var(--text);
}
.login-page .form-card h3 { margin-bottom: 20px; text-align: center; }

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 300;
  animation: fadeInOut 2.5s ease;
}
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}

/* 瀵嗕繚鍗℃煡璇㈢粨鏋?*/
.security-result {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}
.security-result .cell {
  background: #f0f0f0;
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center;
}
.security-result .cell .pos { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.security-result .cell .val { font-size: 28px; font-weight: 700; color: var(--primary); }

/* 璁㈠崟鍒楄〃锛堝府娲剧��锛?*/
.order-row {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }
.order-row .player-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
  margin-right: 12px;
}
.order-row .detail { flex: 1; }
.order-row .detail .name { font-size: 14px; font-weight: 500; }
.order-row .detail .sub { font-size: 12px; color: var(--text-secondary); }
.order-row .actions { text-align: right; }

/* 婊氬姩鏉＄編鍖?*/
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

/* 鎼滅储妗?*/
.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

/* 鍊掕�℃椂璀﹀�?*/
.deadline-warning {
  background: #fef5e7;
  border: 1px solid #f39c12;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  color: #e67e22;
}
