* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: #0f1115;
  color: #e8eaed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

header {
  padding: 14px 16px 8px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #b8bcc4;
}

.header-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #3a3f4a;
  border-radius: 10px;
  background: #1a1d24;
  color: #e8eaed;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.header-btn:active {
  background: #2a2e38;
}

.player-count-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-count-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  min-width: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 14px 8px;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar ausblenden */
main::-webkit-scrollbar { display: none; }
main { scrollbar-width: none; }

.player-card {
  display: flex;
  align-items: center;
  background: #1a1d24;
  border-radius: 18px;
  padding: 14px 16px;
  gap: 14px;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.player-name {
  font-size: 14px;
  color: #c5c9d2;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px dashed transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.player-name:active {
  background: #232730;
  border-color: #3a3f4a;
}

.player-name-input {
  width: 100%;
  max-width: 140px;
  background: #0f1115;
  color: #fff;
  border: 1px solid #74256c;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
}

.player-value {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: center;
  line-height: 1;
}

.btn-increment {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #1e8e3e, #16a34a);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.btn-increment:active {
  transform: scale(0.93);
}

footer {
  padding: 10px 20px 14px;
  text-align: center;
  font-size: 12px;
  color: #555a64;
}

/* Wenig Spieler: Karten vertikal strecken */
main.few-players .player-card {
  flex: 1;
}

main.few-players .player-value {
  font-size: 64px;
}

main.few-players .btn-increment {
  width: 80px;
  height: 80px;
  font-size: 40px;
  border-radius: 20px;
}
