/* ==========================================================================
   SS15 · 统一 UI（浅色玻璃拟态）
   设计来源：账号注册参考页 —— 冷蓝灰主色 / 大圆角 / 毛玻璃卡片
   ========================================================================== */
:root {
  --bg-gradient-start: #eef2f9;
  --bg-gradient-end: #f9fbfd;
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-bg-strong: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.02), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.05), 0 0 0 0.5px rgba(255, 255, 255, 0.6) inset;
  --shadow-lg: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
  --accent-light: #7c9bc0;
  --accent: #2c6280;
  --accent-strong: #234f68;
  --accent-glow: #8ab3cf;
  --accent-soft: rgba(44, 98, 128, 0.1);
  --text-primary: #1e2c3a;
  --text-muted: #5b6e8c;
  --text-faint: #8ba0b8;
  --border-light: rgba(145, 167, 192, 0.25);
  --border-input: rgba(128, 155, 180, 0.4);
  --hover-bg: rgba(140, 180, 220, 0.08);
  --success: #2c7a5e;
  --success-bg: rgba(44, 122, 94, 0.12);
  --danger: #c2412c;
  --danger-bg: rgba(194, 65, 44, 0.09);
  --warning: #a8611a;
  --warning-bg: rgba(168, 97, 26, 0.1);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background:
    radial-gradient(900px 520px at 8% 0%, rgba(140, 179, 207, 0.22), transparent 62%),
    radial-gradient(760px 460px at 96% 100%, rgba(124, 155, 192, 0.18), transparent 60%),
    linear-gradient(125deg, var(--bg-gradient-start), var(--bg-gradient-end));
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  font-weight: 500;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(44, 98, 128, 0.18); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 155, 192, 0.42); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(92, 124, 160, 0.6); }

/* ---------------------------------------------------------------- 卡片 */
.card, .glass-card {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.25s, transform 0.25s, background 0.25s;
}

.card { padding: 20px 22px; }
.card + .card { margin-top: 16px; }

.card:hover {
  box-shadow: var(--shadow-lg);
  background: rgba(255, 255, 255, 0.74);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h3, .card-header h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(130deg, #1a3a4f, #36677f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card-header .count, .card-header .badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  -webkit-text-fill-color: var(--accent);
}

.card-header .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- 表单 */
.field-group { margin-bottom: 16px; }
.field-group > label, label.field-label {
  display: block;
  color: #4f6e88;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border-input);
  border-radius: 16px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input::placeholder, textarea::placeholder { color: #a0b8cf; font-weight: 400; }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 4px rgba(44, 98, 128, 0.12);
}

textarea { resize: vertical; min-height: 86px; line-height: 1.7; border-radius: 18px; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6c89a5 50%),
                    linear-gradient(135deg, #6c89a5 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input[type="checkbox"], input[type="radio"] {
  width: 15px; height: 15px; min-width: 15px; padding: 0;
  accent-color: var(--accent);
}

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.form-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.form-row.two { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.form-row.three { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.form-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-group label { font-size: 11px; font-weight: 600; color: #4f6e88; letter-spacing: 0.35px; }
.form-group label .hint, .form-group .hint { font-weight: 400; color: var(--text-faint); }
.form-group-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-group-inline label { font-size: 11px; font-weight: 600; color: #4f6e88; flex-shrink: 0; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 20px;
  background: rgba(44, 98, 128, 0.92);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 18px -10px rgba(44, 98, 128, 0.7);
  white-space: nowrap;
}

.btn:hover { background: #2c6a8c; transform: translateY(-1px); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-primary { background: rgba(44, 98, 128, 0.92); }
.btn-secondary, .btn-outline {
  background: rgba(235, 242, 250, 0.92);
  color: #2c5a78;
  border-color: rgba(145, 167, 192, 0.3);
  box-shadow: none;
}
.btn-secondary:hover, .btn-outline:hover { background: rgba(225, 238, 248, 1); }
.btn-success { background: rgba(44, 122, 94, 0.92); box-shadow: 0 8px 18px -10px rgba(44, 122, 94, 0.7); }
.btn-success:hover { background: #2a8a6a; }
.btn-danger { background: rgba(194, 65, 44, 0.92); box-shadow: 0 8px 18px -10px rgba(194, 65, 44, 0.7); }
.btn-danger:hover { background: #a83723; }
.btn-warning { background: rgba(190, 120, 30, 0.92); box-shadow: 0 8px 18px -10px rgba(190, 120, 30, 0.7); }
.btn-warning:hover { background: #a8611a; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- 表格 */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(145, 167, 192, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }

table th {
  background: rgba(234, 241, 249, 0.9);
  color: #4f6e88;
  font-weight: 700;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  white-space: nowrap;
}

table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(145, 167, 192, 0.16);
  vertical-align: middle;
  color: var(--text-primary);
}

table tr:last-child td { border-bottom: none; }
table tbody tr:hover td { background: rgba(140, 180, 220, 0.1); }
table .clickable { cursor: pointer; }

/* ---------------------------------------------------------------- 徽标 */
.badge, .badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.badge-status.normal { background: rgba(44, 122, 94, 0.14); color: #1f6b50; }
.badge-status.banned { background: rgba(194, 65, 44, 0.13); color: #a83723; }
.badge-status.god {
  background: linear-gradient(180deg, rgba(253, 230, 138, 0.95), rgba(245, 196, 81, 0.95));
  color: #7c4a03;
}
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(44, 98, 128, 0.09);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 通用 */
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8 { margin-bottom: 8px; }
.gap-6 { gap: 6px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.text-muted { color: var(--text-faint); font-size: 12px; line-height: 1.7; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace; }

.detail-json {
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(145, 167, 192, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 11.5px;
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 190px;
  overflow: auto;
  color: #33506b;
  line-height: 1.7;
}

.detail-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.detail-section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.detail-section .section-title {
  font-size: 12px; font-weight: 700; color: #22465e; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}

/* 提示条 */
.notice {
  background: rgba(44, 98, 128, 0.06);
  border: 1px solid rgba(44, 98, 128, 0.16);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: #3d5f78;
  font-size: 12.5px;
  line-height: 1.85;
}
.notice.warn { background: var(--warning-bg); border-color: rgba(168, 97, 26, 0.24); color: #7d4712; }
.notice.danger { background: var(--danger-bg); border-color: rgba(194, 65, 44, 0.22); color: #93301f; }

/* 空状态 */
.empty { color: var(--text-faint); text-align: center; padding: 26px 12px; font-size: 12.5px; }

/* 移动端 */
@media (max-width: 700px) {
  body { font-size: 13px; }
  .card { padding: 16px 14px; }
  .form-row, .form-row.two { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr 1fr; }
  table th, table td { padding: 8px 9px; }
}
