/* Front-door kiosk — dark, bold, touch-first. */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #f0b429;
  --green: #2ea043;
  --red: #da3633;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
}

.kiosk-header {
  text-align: center;
  padding: 24px 16px 8px;
}

.kiosk-header h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.kiosk-header p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 1.1rem;
}

.search-wrap {
  padding: 16px clamp(16px, 8vw, 120px);
}

#search {
  width: 100%;
  font-size: 1.6rem;
  padding: 18px 22px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
}

#search:focus { border-color: var(--accent); }

.member-grid {
  flex: 1;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  padding: 8px clamp(16px, 8vw, 120px) 32px;
  align-content: start;
}

.member-btn {
  font-size: 1.35rem;
  font-weight: 600;
  padding: 22px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  width: 100%;
  transition: transform 0.06s ease, border-color 0.06s ease;
}

.member-btn:active { transform: scale(0.97); border-color: var(--accent); }

#no-match {
  display: none;
  text-align: center;
  color: var(--muted);
  font-size: 1.3rem;
  padding: 40px 0;
}

.kiosk-footer {
  text-align: center;
  padding: 10px;
}

.kiosk-footer a {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: none;
}

/* ── Result (welcome) screen ────────────────────────────────────────────── */
.result-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 18px;
}

.result-screen.green { background: var(--green); }
.result-screen.red { background: var(--red); }

.result-screen .big-icon { font-size: clamp(4rem, 14vw, 8rem); }

.result-screen h1 {
  font-size: clamp(2rem, 7vw, 4rem);
  color: #fff;
}

.result-screen p {
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  color: rgba(255, 255, 255, 0.92);
}

.result-screen .back-btn {
  margin-top: 18px;
  font-size: 1.2rem;
  padding: 14px 36px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}

.countdown { color: rgba(255, 255, 255, 0.75); font-size: 1rem; }

/* ── Admin login page reuses kiosk styling ─────────────────────────────── */
/* The login-card + its children are fully styled inline in
   templates/login.html now — that template owns the PIN pad, email fallback,
   and toggle. Leaving generic descendant rules here would out-specificity
   those and paint every button gold. */
.login-error { color: #ff7b72; text-align: center; }

/* ════════════════════════════════════════════════════════════════════════
   KIDS BJJ — profile, fighter card, belt journey & promotion celebration
   ════════════════════════════════════════════════════════════════════════ */
.is-hidden { display: none !important; }

/* ── Belt graphic (shared) ──────────────────────────────────────────────── */
.belt {
  position: relative;
  height: 46px;
  border-radius: 7px;
  box-shadow: inset 0 -7px 12px rgba(0,0,0,.25), 0 3px 8px rgba(0,0,0,.45);
  overflow: hidden;
  background: var(--white, #f2f0ea);
}
.belt.belt-white  { background: linear-gradient(180deg,#ffffff,#f2f0ea); border: 1px solid #d7d3c6; }
.belt.belt-grey   { background: linear-gradient(180deg,#b7bec6,#9aa3ad); }
.belt.belt-yellow { background: linear-gradient(180deg,#f8d661,#f3c53b); }
.belt.belt-orange { background: linear-gradient(180deg,#ec9a5f,#e07b39); }
.belt.belt-green  { background: linear-gradient(180deg,#4fb374,#3a9d5d); }
.belt .rank {
  position: absolute; right: 34px; top: 0; bottom: 0; width: 86px;
  background: repeating-linear-gradient(90deg,#141414,#141414 2px,#1c1c1c 2px,#1c1c1c 4px);
  display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border-left: 2px solid rgba(0,0,0,.35); border-right: 2px solid rgba(0,0,0,.35);
}
.belt .stripe { width: 9px; height: 58%; background: #fff; border-radius: 1px; box-shadow: 0 0 4px rgba(255,255,255,.5); }
.belt .stripe.ghost { background: rgba(255,255,255,.14); box-shadow: none; }
.belt .tip { position: absolute; right: 0; top: 0; bottom: 0; width: 34px; background: linear-gradient(180deg,#1a1a1a,#000); }

/* ── Profile screen shell ───────────────────────────────────────────────── */
.profile-screen {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px 16px 28px; gap: 14px; overflow-y: auto;
}
.profile { width: min(440px, 96vw); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pane { width: 100%; }
.togo { text-align: center; color: var(--accent); font-weight: 600; font-size: 1.05rem; margin-top: 14px; }

/* ── Fighter card (Concept 2) ───────────────────────────────────────────── */
.fcard {
  border-radius: 20px; padding: 2px;
  background: conic-gradient(from 180deg, #f0b429, #3a9d5d, #4aa3ff, #e07b39, #f0b429);
  box-shadow: 0 22px 55px rgba(0,0,0,.6);
}
.fcard.tier-grey   { background: conic-gradient(from 180deg,#c9d0d7,#8b949e,#c9d0d7,#8b949e); }
.fcard.tier-yellow { background: conic-gradient(from 180deg,#f8d661,#f0b429,#fff1b8,#f3c53b); }
.fcard.tier-orange { background: conic-gradient(from 180deg,#ec9a5f,#e07b39,#ffd1a8,#e07b39); }
.fcard.tier-green  { background: conic-gradient(from 180deg,#4fb374,#3a9d5d,#a8e6c0,#3a9d5d); }
.fcard-inner {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg,#171e28,#0e131b);
  border-radius: 18px; padding: 22px;
}
.fcard-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.07) 48%, transparent 56%);
}
.tier-tag {
  position: absolute; top: 16px; right: 16px;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800;
  color: var(--accent); border: 1px solid var(--gold-dim, #b8860b); border-radius: 6px; padding: 3px 8px;
}
.por {
  width: 88px; height: 88px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(135deg,#2a333f,#161c25);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; color: #fff; border: 1px solid var(--border);
}
.fname { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; }
.frole { color: var(--accent); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.gems { display: flex; gap: 8px; margin: 16px 0; }
.gem { width: 24px; height: 24px; border-radius: 6px; transform: rotate(45deg);
  background: linear-gradient(135deg,#fff,#cfcabb); box-shadow: 0 0 10px rgba(255,255,255,.4); }
.gem.empty { background: #232b35; box-shadow: none; }
.fstats { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 8px; }
.fstat { background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 10px; padding: 11px 6px; text-align: center; }
.fstat .n { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fstat .l { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* ── Belt journey (Concept 1) ───────────────────────────────────────────── */
.jhead { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg,#fff,#dcd8cc); color: #1a1a1a;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; flex: none;
}
.jname { font-size: 1.4rem; font-weight: 800; }
.jsub { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.belt-hero { margin: 16px 0 4px; }
.belt-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 10px; }
.belt-meta span { color: var(--text); }
.timeline { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.timeline .th { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.tl-item { display: grid; grid-template-columns: 14px 1fr; gap: 13px; position: relative; padding-bottom: 18px; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--bg); margin-top: 3px; }
.tl-body .ev { font-weight: 600; font-size: .95rem; }
.tl-body .dt { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; margin-top: 1px; }
.tl-body .no { color: var(--muted); font-size: .8rem; font-style: italic; margin-top: 3px; }
.tl-empty { color: var(--muted); font-size: .9rem; }

/* ── Profile controls ───────────────────────────────────────────────────── */
.profile-controls { display: flex; gap: 12px; margin-top: 20px; }
.flip-btn, .done-btn {
  font-size: 1.05rem; font-weight: 700; padding: 13px 26px; border-radius: 12px; cursor: pointer;
  text-decoration: none; border: 2px solid var(--border); background: var(--panel); color: var(--text);
}
.flip-btn { background: var(--accent); color: #1a1a1a; border-color: var(--accent); }
.flip-btn:active, .done-btn:active { transform: scale(0.97); }

/* ── Promotion celebration ──────────────────────────────────────────────── */
.celeb-screen {
  flex: 1; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 28px 20px; gap: 6px;
  background: radial-gradient(circle at 50% 32%, #1c2431, var(--bg));
}
.celeb-burst { font-size: clamp(3.4rem, 12vw, 5.5rem); animation: celeb-pop .85s ease infinite alternate; }
.celeb-title {
  font-size: clamp(2rem, 8vw, 3.4rem); font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  color: var(--accent); text-shadow: 0 0 28px rgba(240,180,41,.55); margin: 8px 0 2px;
}
.celeb-who { font-size: 1.3rem; font-weight: 700; }
.celeb-belt { width: min(74%, 320px); margin: 18px 0 6px; }
.celeb-what { color: var(--muted); font-size: 1rem; }
.conf { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; opacity: .9; animation: celeb-fall linear infinite; }
.conf.c1 { left: 12%; background: var(--accent);    animation-duration: 2.4s; }
.conf.c2 { left: 28%; background: var(--white);     animation-duration: 2.9s; animation-delay: .4s; }
.conf.c3 { left: 46%; background: var(--green);     animation-duration: 2.1s; animation-delay: .7s; }
.conf.c4 { left: 64%; background: #4aa3ff;          animation-duration: 2.6s; animation-delay: .2s; }
.conf.c5 { left: 80%; background: #e07b39;          animation-duration: 2.4s; animation-delay: .9s; }
.conf.c6 { left: 92%; background: var(--accent);    animation-duration: 3.1s; animation-delay: .5s; }
@keyframes celeb-fall { 0% { transform: translateY(-20px) rotate(0); } 100% { transform: translateY(105vh) rotate(340deg); } }
@keyframes celeb-pop  { to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  .conf, .celeb-burst { animation: none; }
  .conf { display: none; }
}
