/* =========================================================================
   Zockbox – gemeinsames Stylesheet. made by Oskar

   Spiel-Basis (Legacy): Reset, Variablen und .zb-*-Bausteine, die Spiele
   mitbenutzen (zurzeit games/kritzel-duell). Bitte hier nichts umbenennen
   oder löschen, sonst ändert sich das Spiel.

   Startseite, Statistik und Fehlerseite binden diese Datei NICHT mehr ein –
   sie nutzen shared/ui.css (hell, schlicht, feine Linien).
   ========================================================================= */

/* ===================== TEIL A · Spiel-Basis (Legacy) ===================== */
/* Nur noch für die Spiele: Reset, Variablen, alte .zb-*-Bausteine.
   Startseite, Statistik und Fehlerseite nutzen shared/ui.css (hell, schlicht).
   Schriften liegen in shared/spiel-fonts.css. */
@import url('spiel-fonts.css');

:root {
  --bg: #0a0b12;
  --bg2: #11131d;
  --card: #151826;
  --card2: #1b1f30;
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .14);
  --text: #f2f3f8;
  --muted: #9aa0b8;
  --violet: #7c5cff;
  --pink: #ff4fd8;
  --lime: #c6ff3d;
  --cyan: #3de0ff;
  --red: #ff5a6e;
  --radius: 20px;
  --font-display: 'Unbounded', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-meme: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
  --pad: max(16px, env(safe-area-inset-left));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

.zb-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(124, 92, 255, .28), transparent 70%),
    radial-gradient(45% 35% at 95% 10%, rgba(255, 79, 216, .16), transparent 70%),
    radial-gradient(50% 40% at 50% 100%, rgba(61, 224, 255, .08), transparent 70%),
    var(--bg);
}

.zb-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--pad); padding-right: max(16px, env(safe-area-inset-right)); }

.zb-grad { background: linear-gradient(90deg, var(--violet), var(--pink) 60%, #ff9a5c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.zb-panel {
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line2); border-radius: var(--radius);
  padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.zb-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.zb-panel-head h2 { font-size: 17px; font-weight: 700; }
.zb-hint { color: var(--muted); font-size: 13px; font-weight: 500; }
.zb-join-row { display: flex; gap: 10px; }
.zb-code {
  flex: 1; min-width: 0; height: 60px; padding: 0 16px;
  border-radius: 14px; border: 1px solid var(--line2); background: #0c0e17;
  font: 800 28px/1 var(--font-display); letter-spacing: .32em; text-transform: uppercase; text-align: center;
  caret-color: var(--lime); transition: border-color .2s, box-shadow .2s;
}
.zb-code::placeholder { color: rgba(255, 255, 255, .16); }
.zb-code:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124, 92, 255, .25); }

.zb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 750; font-size: 16px; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.zb-btn:active { transform: scale(.97); }
.zb-btn:disabled, .zb-btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.zb-btn-primary { height: 60px; min-width: 84px; background: var(--lime); color: #0b0d06; box-shadow: 0 8px 24px rgba(198, 255, 61, .25); font-family: var(--font-display); font-weight: 800; }
.zb-btn-primary:hover { box-shadow: 0 10px 30px rgba(198, 255, 61, .4); }
.zb-btn-ghost { background: var(--card2); border-color: var(--line2); }
.zb-btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }
.zb-input {
  flex: 1; min-width: 0; height: 56px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line2); background: #0c0e17; font-size: 17px; font-weight: 600;
}
.zb-input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124, 92, 255, .25); }
.zb-input::placeholder { color: #5c6178; }
.zb-dice { flex: none; width: 56px; height: 56px; padding: 0; font-size: 24px; }
.zb-foot { margin-top: 30px; padding: 26px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.zb-foot p { margin: 6px 0 0; }
.zb-sig { font: 600 15px/1.2 var(--font-display); color: var(--text); }
.zb-sig b { background: linear-gradient(90deg, var(--violet), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }


/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  padding: 12px 18px; border-radius: 14px; background: #fff; color: #111; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  animation: zbToast .25s ease-out;
}
@keyframes zbToast { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (min-width: 760px) { .zb-panel { padding: 22px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
