:root {
  --ink: #0b0b12;
  --surface: #1a1a24;
  --surface-sunken: #12121a;
  --gold: #d4af37;
  --text: #f2f2f2;
  --text-dim: #9a9aa5;
  --man: #4a90d9;
  --woman: #d94a90;
  --red: #e05555;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px calc(env(safe-area-inset-bottom) + 20px);
}

h1, h2, h3 { margin: 0 0 12px; }

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}

input[type="text"], input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: var(--surface-sunken);
  color: var(--text);
  font-size: 16px;
  margin-bottom: 12px;
}

button {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-bottom: 8px;
  transition: transform 0.08s ease, opacity 0.08s ease;
}
/* Sofortiges taktiles Feedback beim Antippen, unabhängig von jeder Netzwerk-Latenz -
   ohne das wirkt ein Tap "nicht registriert", solange der Server noch antwortet. */
button:active { transform: scale(0.96); opacity: 0.85; }

.btn-primary { background: var(--gold); color: var(--ink); }
.btn-secondary { background: var(--surface-sunken); color: var(--text); border: 1px solid rgba(255,255,255,0.15); }
.btn-danger { background: var(--red); color: white; }
/* Zurückhaltender als .btn-danger - für Fold, solange es nicht die aktiv
   vorgeschlagene Aktion ist. Ein dauerhaft voll-rot gefüllter Button neben zwei
   neutralen zieht den Blick (und Tapps) unverhältnismäßig auf sich. */
.btn-outline-danger { background: var(--surface-sunken); color: var(--red); border: 1px solid rgba(224,85,85,0.5); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

.gender-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.gender-toggle button {
  margin: 0;
  width: auto;
  flex: 1 1 0;
}
.gender-toggle .selected.man { background: var(--man); color: white; }
.gender-toggle .selected.woman { background: var(--woman); color: white; }
.gender-toggle button:not(.selected) { background: var(--surface-sunken); color: var(--text-dim); }

.hole-cards, .community-cards {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.playing-card {
  width: 56px;
  height: 80px;
  background: white;
  color: black;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.playing-card.red { color: var(--red); }

.pot-display {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  margin: 8px 0;
}

.action-bar {
  display: flex;
  gap: 8px;
}
.action-bar button { margin: 0; }

.player-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.player-row.current-turn { color: var(--gold); font-weight: 700; }
.player-row.folded { opacity: 0.4; text-decoration: line-through; }

.event-card {
  background: var(--surface-sunken);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin: 12px 0;
}

.error-banner {
  background: var(--red);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

.blind-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  vertical-align: middle;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-header-row h3 { margin: 0; }

.ios-toggle {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
}
.ios-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ios-toggle-slider {
  position: absolute;
  inset: 0;
  background: #39393d;
  border-radius: 31px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.ios-toggle-slider::before {
  content: "";
  position: absolute;
  height: 27px;
  width: 27px;
  left: 2px;
  bottom: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.ios-toggle input:checked + .ios-toggle-slider {
  background: #34c759;
}
.ios-toggle input:checked + .ios-toggle-slider::before {
  transform: translateX(20px);
}

.coach-panel {
  background: var(--surface-sunken);
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  color: var(--text-dim);
}
.coach-panel .strong { color: #4ade80; }
.coach-panel .caution { color: #facc15; }
.coach-panel .weak { color: var(--red); }
