:root {
  --bg-deep: #070b14;
  --bg-card: rgba(15, 23, 42, 0.84);
  --bg-elevated: rgba(30, 41, 59, 0.72);
  --border-subtle: rgba(148, 163, 184, 0.16);
  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --sense: #fb7185;
  --logic: #38bdf8;
  --anomaly: #c084fc;
  --common: #34d399;

  --vo: #ef4444;
  --da: #3b82f6;
  --vi: #eab308;
  --as: #10b981;
}

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

body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% 10%, rgba(56, 189, 248, 0.12), transparent 40%),
    radial-gradient(circle at 88% 15%, rgba(192, 132, 252, 0.12), transparent 42%),
    var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.orb-1 { width: 380px; height: 380px; left: -120px; top: -80px; background: #2563eb; }
.orb-2 { width: 420px; height: 420px; right: -140px; top: 220px; background: #9333ea; }

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1560px;
  margin: 0 auto;
  padding: 18px 14px 40px;
}

@media (min-width: 768px) {
  .app-shell { padding: 28px 24px 56px; }
}

.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
}

/* Header */
.top-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  margin-bottom: 18px;
}

@media (min-width: 1120px) {
  .top-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 24px 26px;
  }
}

.brand-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.brand-block h1 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #f8fafc 15%, #93c5fd 60%, #e879f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 6px;
  color: var(--text-sub);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-pill {
  font-size: 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 2px 9px;
  border-radius: 999px;
}

.action-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

@media (min-width: 1120px) {
  .action-dock { width: 540px; flex-shrink: 0; }
}

.export-img-row,
.short-bind-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-img-row .btn { flex: 1 1 180px; }
.short-bind-row .btn-gold { flex: 1 1 220px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }

.btn-accent {
  background: linear-gradient(135deg, #0891b2, #6366f1);
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.3);
}
.btn-accent:hover:not(:disabled) { filter: brightness(1.1); }

.btn-gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e1b4b;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.28);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.06); }

.btn-ghost {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.24);
}
.btn-ghost:hover:not(:disabled) { background: rgba(51, 65, 85, 0.9); }

.btn-danger-soft {
  background: rgba(127, 29, 29, 0.35);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.28);
}
.btn-danger-soft:hover:not(:disabled) { background: rgba(153, 27, 27, 0.55); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
.btn-mini {
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.45);
  color: #e0f2fe;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Short code banner & base64 chips */
.short-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.short-banner-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.short-label { font-size: 12px; font-weight: 800; color: #6ee7b7; }
.short-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.08em;
  user-select: text;
}
.short-banner-bot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
}
.bot-cmd {
  background: rgba(2, 6, 23, 0.72);
  padding: 2px 8px;
  border-radius: 6px;
  color: #fde68a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  user-select: text;
}

.b64-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 540px) {
  .b64-row { grid-template-columns: 1fr 1fr; }
}
.b64-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.b64-chip:hover { border-color: rgba(99, 102, 241, 0.65); }
.b64-tag {
  font-size: 10px;
  font-weight: 800;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.18);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.b64-val {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #94a3b8;
}
.b64-copy {
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  flex-shrink: 0;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1;
  max-width: 280px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.tab-btn.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.92), rgba(14, 165, 233, 0.88));
  border-color: rgba(165, 180, 252, 0.7);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.28);
}
.tab-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
  color: #e2e8f0;
}

/* Stats Panel */
.stats-panel {
  padding: 14px;
  margin-bottom: 14px;
}
.stats-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 1024px) {
  .stats-layout { grid-template-columns: 230px 1fr; }
}
.stat-main-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-main-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.stat-label { font-size: 11px; color: var(--text-sub); font-weight: 800; letter-spacing: 0.06em; }
.stat-big { font-size: 26px; font-weight: 900; line-height: 1.1; margin-top: 4px; }
.stat-pct { font-size: 18px; font-weight: 900; color: #38bdf8; }
.stat-subline { font-size: 11px; color: #cbd5e1; margin-top: 6px; }

.stat-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 8px;
}
.stat-chip {
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  padding: 9px 11px;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.stat-chip.clickable { cursor: pointer; }
.stat-chip.clickable:hover { border-color: rgba(56, 189, 248, 0.55); transform: translateY(-1px); }
.stat-chip.active-char {
  border-color: rgba(56, 189, 248, 0.9);
  background: rgba(14, 116, 144, 0.25);
}
.stat-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.stat-chip-name { font-size: 12px; font-weight: 800; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-chip-pct { font-size: 11px; font-weight: 800; color: #38bdf8; }
.stat-chip-num { font-size: 11px; color: var(--text-sub); margin-top: 3px; }

.meter-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.8);
  overflow: hidden;
  margin-top: 7px;
}
.meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
}

/* Filter Bar */
.filter-bar {
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.filter-group-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-right: 2px;
}

.f-btn {
  height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}
.f-btn:hover { color: #f8fafc; border-color: rgba(148, 163, 184, 0.35); }
.f-btn.active { background: #4f46e5; color: #fff; border-color: #818cf8; }
.f-btn.active-ssr { background: linear-gradient(135deg, #06b6d4, #6366f1, #ec4899); color: #fff; border-color: transparent; }
.f-btn.active-sr { background: linear-gradient(135deg, #facc15, #ca8a04); color: #271502; border-color: transparent; }
.f-btn.active-r { background: linear-gradient(135deg, #cbd5e1, #64748b); color: #0f172a; border-color: transparent; }

.f-btn.active-vo { background: var(--vo); color: #fff; border-color: transparent; }
.f-btn.active-da { background: var(--da); color: #fff; border-color: transparent; }
.f-btn.active-vi { background: var(--vi); color: #1c1917; border-color: transparent; }
.f-btn.active-as { background: var(--as); color: #052e16; border-color: transparent; }

.f-btn.active-sense { background: rgba(251, 113, 133, 0.25); color: #fda4af; border-color: var(--sense); }
.f-btn.active-logic { background: rgba(56, 189, 248, 0.24); color: #7dd3fc; border-color: var(--logic); }
.f-btn.active-anomaly { background: rgba(192, 132, 252, 0.25); color: #d8b4fe; border-color: var(--anomaly); }
.f-btn.active-common { background: rgba(52, 211, 153, 0.22); color: #6ee7b7; border-color: var(--common); }

.search-input {
  height: 34px;
  min-width: 190px;
  flex: 1 1 200px;
  max-width: 300px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  font-size: 13px;
  padding: 0 11px;
  outline: none;
  user-select: text;
}
.search-input:focus { border-color: #38bdf8; }

.char-select-mobile {
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #0f172a;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  padding: 0 10px;
}

.tip-banner {
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.26);
  color: #c7d2fe;
  font-size: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* Card Grids */
.card-grid {
  display: grid;
  gap: 14px;
}
.card-grid.mode-support {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) {
  .card-grid.mode-support { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .card-grid.mode-support { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1400px) {
  .card-grid.mode-support { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.card-grid.mode-cidol {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 640px) {
  .card-grid.mode-cidol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .card-grid.mode-cidol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1360px) {
  .card-grid.mode-cidol { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* Support Card Tile */
.s-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s-card-box {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.2);
  background: #0f172a;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.s-card-box.is-owned.rarity-3 {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2);
}
.s-card-box.is-owned.rarity-2 {
  border-color: rgba(250, 204, 21, 0.8);
  box-shadow: 0 8px 24px rgba(234, 179, 8, 0.16);
}
.s-card-box.is-max {
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.45), 0 12px 26px rgba(245, 158, 11, 0.25) !important;
}
.s-card-box.is-unowned::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.58);
  pointer-events: none;
  z-index: 4;
}

.card-real-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback vector card art when image is absent */
.vector-card-art {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.vector-card-art.plan-Sense { background: linear-gradient(135deg, #2a1020 0%, #17132b 58%, #0f172a 100%); }
.vector-card-art.plan-Logic { background: linear-gradient(135deg, #0b243d 0%, #111c36 58%, #0f172a 100%); }
.vector-card-art.plan-Anomaly { background: linear-gradient(135deg, #27123d 0%, #171534 58%, #0f172a 100%); }
.vector-card-art.plan-Common { background: linear-gradient(135deg, #0b2b27 0%, #121d33 58%, #0f172a 100%); }

.vector-stripe {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-35deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 22px);
  pointer-events: none;
}
.vector-card-title {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
  padding: 0 6px;
}
.vector-card-sub {
  position: relative;
  z-index: 2;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.card-badges-top {
  position: absolute;
  top: 7px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 6;
  pointer-events: none;
}

.rarity-pill {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.rarity-pill.r-3 { background: linear-gradient(135deg, #22d3ee, #6366f1, #ec4899); color: #fff; }
.rarity-pill.r-2 { background: linear-gradient(135deg, #fde047, #ca8a04); color: #271502; }
.rarity-pill.r-1 { background: #cbd5e1; color: #0f172a; }

.attr-pill {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.attr-vo { background: var(--vo); color: #fff; }
.attr-da { background: var(--da); color: #fff; }
.attr-vi { background: var(--vi); color: #1c1917; }
.attr-as { background: var(--as); color: #052e16; }

.card-bottom-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 10px 7px;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  z-index: 6;
  pointer-events: none;
}
.lv-badge {
  font-size: 17px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.lv-badge.off { color: #64748b; }
.lv-badge.on { color: #ffffff; }
.lv-badge.max { color: #fde047; }

.card-mini-meta {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
  text-align: right;
  max-width: 62%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Split tap zones for support cards */
.tap-zones {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 8;
}
.tap-zone {
  flex: 1;
  height: 100%;
  cursor: pointer;
}
.tap-zone:active { background: rgba(255, 255, 255, 0.08); }

.quick-lv-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.quick-lv-btn {
  height: 27px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}
.quick-lv-btn:hover { border-color: rgba(129, 140, 248, 0.55); color: #e2e8f0; }
.quick-lv-btn.active {
  background: linear-gradient(135deg, #6366f1, #2563eb);
  color: #ffffff;
  border-color: #93c5fd;
}

/* Cidol Card Tile */
.c-card {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.c-card:active { transform: scale(0.98); }
.c-card.is-owned {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 10px 26px rgba(6, 182, 212, 0.22);
}

.c-card-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #090d16;
  overflow: hidden;
}
.c-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.c-card.is-unowned .c-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.56);
  z-index: 4;
}
.owned-flag {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.c-card-footer {
  padding: 8px 10px;
  background: rgba(2, 6, 23, 0.72);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.c-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.c-char-name { font-size: 11px; font-weight: 800; color: #cbd5e1; }
.c-plan-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 5px;
}
.plan-badge-Sense { background: rgba(251, 113, 133, 0.2); color: #fda4af; }
.plan-badge-Logic { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.plan-badge-Anomaly { background: rgba(192, 132, 252, 0.2); color: #d8b4fe; }
.plan-badge-Common { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }

.c-skin-name {
  font-size: 12px;
  font-weight: 800;
  color: #a5b4fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-sub);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

/* Footer */
.site-footer {
  margin-top: 36px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-card-wide { max-width: 960px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 { font-size: 15px; font-weight: 800; }
.modal-header-actions { display: flex; align-items: center; gap: 10px; }
.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(51, 65, 85, 0.8);
  color: #e2e8f0;
  cursor: pointer;
}
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-desc { font-size: 13px; color: #cbd5e1; margin-bottom: 12px; }
.import-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.82);
  color: #f8fafc;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  outline: none;
  user-select: text;
}
.import-textarea:focus { border-color: #38bdf8; }
.modal-error {
  margin-top: 10px;
  font-size: 12px;
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.45);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
}
.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.image-preview-wrap {
  background: #020617;
  text-align: center;
}
.image-preview-wrap img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.hidden { display: none !important; }
