/* Reusable UI pieces: cards, buttons, inputs, chips, banner, timer, toast. */

.card {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mt { margin-top: 14px; }

.btn {
  appearance: none; border: none; border-radius: 16px; padding: 16px 18px;
  font: inherit; font-weight: 700; font-size: 18px; color: #fff;
  background: linear-gradient(120deg, var(--accent), #9b7bff);
  cursor: pointer; width: 100%;
  transition: transform .08s ease, filter .2s ease, box-shadow .2s;
  box-shadow: 0 10px 24px rgba(124, 92, 255, .35);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: transparent; border: 2px solid var(--line); color: var(--ink); box-shadow: none; }
.btn.warm { background: linear-gradient(120deg, var(--accent2), #ff9a78); box-shadow: 0 10px 24px rgba(255,122,89,.3); }
.btn.gold { background: linear-gradient(120deg, var(--gold), #ffe07a); color: #3a2c00; box-shadow: 0 10px 24px rgba(255,210,63,.3); }
.btn.small { padding: 10px 14px; font-size: 15px; width: auto; }

input.field, select.field {
  width: 100%; background: #1c1440; border: 2px solid var(--line); border-radius: 14px;
  padding: 16px; color: var(--ink); font: inherit; font-size: 18px; outline: none;
  transition: border-color .15s;
}
input.field:focus, select.field:focus { border-color: var(--accent); }
input.field::placeholder { color: #7e72b0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #34276f; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px 8px 14px; display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.chip .x { cursor: pointer; color: var(--muted); font-weight: 800; }
.chip .x:hover { color: var(--accent2); }
.chip.dim { opacity: .5; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.dot.off { background: #6b5fa0; }

.banner {
  border-radius: var(--r); padding: 18px 20px; text-align: center; color: #1a1330;
  font-weight: 800; box-shadow: var(--shadow); margin-bottom: 16px;
}
.banner .ic { font-size: 40px; }
.banner h2 { font-size: 28px; margin: 4px 0; letter-spacing: -.5px; }
.banner p { font-weight: 600; opacity: .85; }

.timerwrap { height: 12px; background: #1c1440; border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.timerbar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--good), var(--gold)); transition: width 1s linear; }
.timerbar.low { background: linear-gradient(90deg, var(--accent2), #ff5a5a); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: #2c2060; border: 1px solid var(--line); color: var(--ink);
  padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; font-weight: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
