:root {
  --primary: #1677ff;
  --primary-hover: #4096ff;
  --primary-bg: #e6f4ff;
  --success: #52c41a;
  --warning: #fa8c16;
  --error: #ff4d4f;
  --text: #1f1f1f;
  --text-secondary: #8c8c8c;
  --text-tertiary: #bfbfbf;
  --border: #f0f0f0;
  --bg: #f5f5f5;
  --bg-white: #fff;
  --shadow-sm:
    0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02),
    0 2px 4px 0 rgba(0, 0, 0, 0.02);
  --shadow:
    0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12),
    0 9px 28px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --cyan: #08979c;
  --gold: #d48806;
  --blue: #1677ff;
  --green: #389e0d;
}

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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(
    135deg,
    #f0f5ff 0%,
    #e6f7ff 25%,
    #f6ffed 50%,
    #fff7e6 75%,
    #f9f0ff 100%
  );
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---- floating decorative blobs ---- */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #1677ff 0%, transparent 70%);
  top: -200px;
  right: -200px;
}
body::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #52c41a 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

.container {
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---- header with illustration ---- */
.hero {
  text-align: center;
  padding: 0px 24px 32px;
  position: relative;
}
.hero-illustration {
  display: inline-block;
  position: relative;
  margin-bottom: 16px;
}
.hero-icon {
  width: 96px;
  height: 96px;
  background: linear-gradient(135deg, #1677ff 0%, #69b1ff 100%);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  box-shadow: 0 12px 32px rgba(22, 119, 255, 0.3);
  margin: 0 auto;
  position: relative;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
/* floating dots around icon */
.hero-icon::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: #ffc53d;
  border-radius: 50%;
  top: -8px;
  right: -8px;
}
.hero-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #52c41a;
  border-radius: 50%;
  bottom: 4px;
  left: -6px;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.hero .subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.hero .subtitle code {
  background: var(--primary-bg);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 500;
}

/* ---- stat cards row ---- */
.stat-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.stat-card {
  flex: 1;
  min-width: 180px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  border: 1px solid transparent;
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--border);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-card .stat-icon.blue {
  background: #e6f4ff;
}
.stat-card .stat-icon.green {
  background: #f6ffed;
}
.stat-card .stat-icon.gold {
  background: #fffbe6;
}
.stat-card .stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---- weakness tags ---- */
.weak-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  line-height: 1.4;
}
.weak-tag + .weak-tag {
  margin-left: 4px;
}
.weak-雷 {
  background: #f9f0ff;
  color: #722ed1;
  border: 1px solid #d3adf7;
}
.weak-火 {
  background: #fff2f0;
  color: #cf1322;
  border: 1px solid #ffa39e;
}
.weak-冰 {
  background: #e6fffb;
  color: #006d75;
  border: 1px solid #87e8de;
}
.weak-圣 {
  background: #fffbe6;
  color: #d48806;
  border: 1px solid #ffe58f;
}

/* ---- form card ---- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.card:hover {
  box-shadow: var(--shadow);
}

.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.form-group {
  flex: 1;
  min-width: 160px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}
.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-tertiary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: help;
  margin-left: 4px;
  vertical-align: middle;
}
.tip-icon:hover {
  background: var(--primary);
}
.form-group label .required {
  color: var(--error);
  margin-left: 2px;
}
.form-group input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
  background: #fafafa;
}
.form-group input:hover {
  border-color: var(--primary-hover);
  background: #fff;
}
.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
  background: #fff;
}
.form-group select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
  background: #fafafa;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238c8c8c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-group select:hover {
  border-color: var(--primary-hover);
  background-color: #fff;
}
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
  background-color: #fff;
}
.form-group .hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  display: block;
}

/* ---- header controls（表头右侧：技能耗蓝 + 计算按钮）---- */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.header-right label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.header-right input {
  height: 32px;
  width: 90px;
  padding: 0 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  background: #fafafa;
  transition: all 0.2s;
}
.header-right input:hover {
  border-color: var(--primary-hover);
  background: #fff;
}
.header-right input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
  background: #fff;
}
/* ---- 物防/魔防切换开关 ---- */
.def-toggle {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 3px;
  gap: 2px;
  background: var(--bg);
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
.def-toggle input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}
.def-opt {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all 0.2s;
}
.def-toggle input:checked ~ .def-pdd,
.def-toggle input:not(:checked) ~ .def-mdd {
  background: var(--bg-white);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.header-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- button ---- */
.btn {
  height: 80px;
  padding: 0 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 0 rgba(22, 119, 255, 0.1);
}
.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 0.85rem;
}
.btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

/* ---- table card ---- */
.table-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.table-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.table-card-header .title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-card-header .title .badge {
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 100px;
}
.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
}
table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
  white-space: nowrap;
}
thead th {
  background: #fafafa;
  position: sticky;
  top: 0;
  z-index: 2;
}
th {
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s,
    color 0.15s;
}
th:hover {
  background: #f0f0f0;
  color: var(--text);
}
th .arrow {
  font-size: 0.7em;
  margin-left: 4px;
  opacity: 0.25;
  transition: opacity 0.15s;
}
th.sorted {
  color: var(--primary);
}
th.sorted .arrow {
  opacity: 1;
}
td {
  padding: 12px 8px;
  border-bottom: 1px solid #fafafa;
  text-align: center;
  transition: background 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* table auto layout — column widths driven by content */
tbody tr {
  transition: background 0.15s;
}
tbody tr:hover td {
  background: #e6f4ff;
}
tbody tr:last-child td {
  border-bottom: none;
}

/* rank medal */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
}
.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #fff;
}
.rank-2 {
  background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
  color: #fff;
}
.rank-3 {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: #fff;
}
.rank-n {
  color: var(--text-secondary);
}

.monster-name {
  color: var(--cyan);
  font-weight: 600;
  vertical-align: middle;
}
.mob-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.monster-name .mob-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.monster-name span {
  line-height: 1.4;
}
.score {
  font-weight: 700;
}
.ratio {
  color: var(--cyan);
  font-weight: 600;
}
.per-hp {
  color: var(--error);
  font-weight: 600;
}
.avg-money {
}
.gold-mp {
  color: var(--gold);
  font-weight: 600;
}
.max-count {
  color: var(--green);
  font-weight: 600;
}

/* ---- 冻结前两列（等级、怪物），水平滚动时保持可见 ---- */
/* th 保持基础规则的 z-index: 2（高于 td），否则纵向滚动时冻结的 td 会盖住表头 */
thead th:nth-child(1) {
  left: 0;
}
thead th:nth-child(2) {
  left: var(--col1-w, 0);
}
tbody td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 1;
}
tbody td:nth-child(2) {
  position: sticky;
  left: var(--col1-w, 0);
  z-index: 1;
}
/* 冻结列需要不透明背景，否则滚动时内容会透出来 */
tbody td:nth-child(1),
tbody td:nth-child(2) {
  background: var(--bg-white);
}
tbody tr:hover td:nth-child(1),
tbody tr:hover td:nth-child(2) {
  background: #e6f4ff;
}
/* 冻结区右缘加一道浅阴影，区分滚动内容 */
thead th:nth-child(2),
tbody td:nth-child(2) {
  box-shadow: 2px 0 6px -2px rgba(0, 0, 0, 0.12);
}

/* ---- filter popup ---- */
.filter-wrap {
  position: relative;
  display: inline-flex;
}
.filter-btn {
  height: 26px;
  padding: 0 12px;
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--primary);
}
.filter-popup {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  min-width: 400px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 12px;
}
.filter-popup.open {
  display: block;
}
.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
}
.filter-row select,
.filter-row input {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 0.8rem;
  outline: none;
  background: #fafafa;
  transition: all 0.2s;
}
.filter-row select:hover,
.filter-row input:hover {
  border-color: var(--primary-hover);
  background: #fff;
}
.filter-row select:focus,
.filter-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
  background: #fff;
}
.filter-row .f-col {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.filter-row .f-op {
  width: 60px;
  flex-shrink: 0;
  cursor: pointer;
}
/* 三种值控件统一放在固定宽度的槽位里，切换列时各选择框位置保持对齐 */
.filter-row .f-val-slot {
  width: 100px;
  flex-shrink: 0;
  display: flex;
}
.filter-row .f-val,
.filter-row .f-val-name,
.filter-row .f-val-weak {
  width: 100%;
  min-width: 0;
}
.filter-row .f-val-weak {
  cursor: pointer;
}
.filter-row .f-logic {
  width: 52px;
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
}
.filter-row .f-logic-start {
  width: 52px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  background: #f5f5f5;
  border-radius: 6px;
  user-select: none;
}
.f-del {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.f-del:hover {
  background: #fff2f0;
  color: var(--error);
}
.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.f-add {
  border: 1px dashed #d9d9d9;
  background: transparent;
  color: var(--text-secondary);
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.f-add:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.f-spacer {
  flex: 1;
}
.f-clear,
.f-apply {
  height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.f-clear {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: var(--text);
}
.f-clear:hover {
  border-color: var(--error);
  color: var(--error);
}
.f-apply {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
}
.f-apply:hover {
  background: var(--primary-hover);
}

/* ---- 对比功能 ---- */
.cmp-btn.active,
.cmp-btn.active:hover {
  background: var(--gold);
  box-shadow: 0 4px 12px rgba(212, 136, 6, 0.3);
}
/* 未计算排行时禁用（置灰） */
.cmp-btn:disabled,
.cmp-btn:disabled:hover,
.cmp-btn:disabled:active {
  background: #d9d9d9;
  color: rgba(255, 255, 255, 0.85);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
/* 对比模式下整行可点击 */
table.cmp-active tbody tr {
  cursor: pointer;
}
/* 原目标 / 对比目标行高亮（置于 hover 规则之后，靠同优先级+顺序覆盖） */
tbody tr.cmp-a td,
tbody tr.cmp-a:hover td,
tbody tr.cmp-a td:nth-child(1),
tbody tr.cmp-a td:nth-child(2),
tbody tr.cmp-a:hover td:nth-child(1),
tbody tr.cmp-a:hover td:nth-child(2) {
  background: #e6f4ff;
}
tbody tr.cmp-b td,
tbody tr.cmp-b:hover td,
tbody tr.cmp-b td:nth-child(1),
tbody tr.cmp-b td:nth-child(2),
tbody tr.cmp-b:hover td:nth-child(1),
tbody tr.cmp-b:hover td:nth-child(2) {
  background: #fff7e6;
}
/* 对比提示条 */
.cmp-hint {
  padding: 10px 24px;
  background: #fffbe6;
  border-bottom: 1px solid #ffe58f;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 500;
}
/* 对比结果面板 */
.cmp-panel {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafcff;
}
.cmp-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cmp-panel-header .cmp-title {
  font-size: 0.95rem;
  font-weight: 600;
}
.cmp-mobs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.cmp-mob-a {
  color: var(--primary);
  background: var(--primary-bg);
  padding: 2px 10px;
  border-radius: 100px;
}
.cmp-mob-b {
  color: var(--gold);
  background: #fffbe6;
  padding: 2px 10px;
  border-radius: 100px;
}
.cmp-mobs .cmp-arrow {
  color: var(--text-tertiary);
}
.cmp-close {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}
.cmp-close:hover {
  background: #fff2f0;
  color: var(--error);
}
.cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.cmp-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.cmp-item .cmp-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.cmp-item .cmp-vals {
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cmp-val-a {
  color: var(--primary);
}
.cmp-val-b {
  color: var(--gold);
}
.cmp-vs {
  color: var(--text-tertiary);
  font-weight: 400;
  font-size: 0.75rem;
}
.cmp-item .cmp-diff {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 2px;
}
/* 上升红色、下降绿色（涨红跌绿惯例） */
.cmp-diff.up {
  color: var(--error);
}
.cmp-diff.down {
  color: var(--green);
}
.cmp-diff.zero {
  color: var(--text-tertiary);
}

/* ---- empty / loading ---- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-tertiary);
}
.empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-state p {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.empty-state .hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.loading-dots {
  display: inline-flex;
  gap: 6px;
  padding: 32px;
}
.loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.error-banner {
  display: none;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: var(--radius);
  padding: 10px 16px;
  color: var(--error);
  font-size: 0.85rem;
  margin: 12px 0;
}

/* ---- footer ---- */
.footer {
  text-align: center;
  padding: 32px 0 48px;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

.footer a {
  color: inherit;
  text-decoration: underline;
}
