/* Winner Modal */
.winner-modal-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.winner-modal {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px 0 rgba(60, 80, 120, 0.18);
  padding: 32px 24px 18px 24px;
  min-width: 260px;
  max-width: 90vw;
  text-align: center;
}
.winner-modal h2 {
  color: var(--primary-green-dark);
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.winner-places {
  margin-bottom: 18px;
}
.winner-place {
  font-size: 1.08rem;
  margin: 2px 0;
}
.winner-rank {
  font-weight: bold;
  color: var(--primary-green);
  margin-right: 7px;
}
.winner-name {
  font-weight: 600;
}
.winner-score {
  color: var(--text-muted);
  margin-left: 7px;
}
.winner-modal .btn {
  margin-top: 18px;
  width: auto;
  min-width: 120px;
}
/* Black circle for last 1 in Runde column */
.runde-black-circle {
  display: inline-block;
  width: 1.7em;
  height: 1.7em;
  background: #111;
  color: #fff;
  border-radius: 50%;
  line-height: 1.7em;
  text-align: center;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.13);
}
#round-section {
  margin-bottom: 18px;
}
/* Modern, responsive, light green theme for Nullern Punkte App */
:root {
  --primary-bg: #eafbe7;
  --primary-green: #6fcf97;
  --primary-green-dark: #3a7e6c;
  --primary-green-light: #d6f5e3;
  --accent-blue: #2a5d8f;
  --table-header-bg: #d6f5e3;
  --table-row-even: #f6fcf7;
  --table-row-odd: #eafbe7;
  --table-border: #b6e3c6;
  --table-sum-bg: #c6f2d6;
  --text-main: #23272f;
  --text-muted: #6b7a8f;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', Arial, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, var(--primary-bg) 100%);
  color: var(--text-main);
}


.container {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px 0 rgba(60, 80, 120, 0.09);
  padding: 0 0 24px 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header.app-header {
  background: var(--primary-green);
  border-radius: 18px 18px 0 0;
  padding: 18px 0 10px 0;
  text-align: center;
  color: #fff;
  box-shadow: 0 2px 8px 0 rgba(60, 80, 120, 0.04);
}

h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: var(--primary-green-dark);
  text-align: center;
}

#round-section {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  padding: 18px 12px 8px 12px;
  box-shadow: 0 2px 8px 0 rgba(60, 80, 120, 0.04);
}

#table-section {
  flex: 1 1 auto;
  overflow-x: auto;
  min-height: 0;
  padding: 0 0 16px 0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  border-radius: 12px;
  overflow: hidden;
}
th, td {
  padding: 0.6em 0.3em;
  border-bottom: 1px solid var(--table-border);
  text-align: center;
}

/* Double border after Runde column */
th.runde-sep, td.runde-sep {
  border-right: 3px double var(--primary-green-dark) !important;
}
th {
  background: var(--table-header-bg);
  font-weight: 600;
  color: var(--accent-blue);
  font-size: 1rem;
}
table tbody tr:nth-child(even) {
  background: var(--table-row-even);
}
table tbody tr:nth-child(odd) {
  background: var(--table-row-odd);
}
.player-sep {
  border-left: 2px solid var(--table-border) !important;
}
.score-correct {
  background: #e3fbe7;
  color: var(--primary-green-dark);
  font-weight: 600;
  border-radius: 5px;
}
.score-wrong {
  background: #ffeaea;
  color: #b94a48;
  font-weight: 600;
  border-radius: 5px;
}
.sum-row td {
  background: var(--table-sum-bg);
  color: var(--primary-green-dark);
  font-weight: 700;
  border-radius: 0 0 7px 7px;
}

input[type="number"], input[type="text"] {
  width: 7em;
  min-width: 4em;
  max-width: 100px;
  padding: 7px 9px;
  border: 1px solid var(--table-border);
  border-radius: 7px;
  font-size: 1rem;
  margin-bottom: 8px;
  background: #f4f8fb;
  color: var(--text-main);
  outline: none;
  transition: border 0.2s;
  display: inline-block;
}
input[type="number"]:focus, input[type="text"]:focus {
  border: 1.5px solid var(--primary-green);
}
.btn {
  background: linear-gradient(90deg, var(--primary-green) 0%, #a8e063 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px 0 rgba(60, 80, 120, 0.07);
  margin-top: 8px;
  transition: background 0.2s, box-shadow 0.2s;
  width: 100%;
}
.btn:hover {
  background: linear-gradient(90deg, #a8e063 0%, var(--primary-green) 100%);
  box-shadow: 0 2px 8px 0 rgba(60, 80, 120, 0.13);
}
.round-inputs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 -10px;
}
.round-inputs label {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 10px 12px 10px;
  min-width: 90px;
}

.round-inputs .player-label {
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--primary-green-dark, #219150);
}

.round-inputs input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 1px solid #b2dfdb;
  text-align: center;
}

.input-row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}
@media (max-width: 1200px) {
  .container {
    max-width: 98vw;
  }
}

@media (max-width: 900px) {
  .container {
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
  header.app-header {
    border-radius: 0;
    padding: 12px 0 8px 0;
  }
  #round-section {
    padding: 12px 4vw 8px 4vw;
  }
  table {
    font-size: 0.97rem;
  }
  th, td {
    padding: 0.4em 0.1em;
  }
}
@media (max-width: 500px) {
  .container {
    padding: 0;
    border-radius: 0;
    min-width: 100vw;
  }
  table {
    font-size: 0.89rem;
  }
  th, td {
    font-size: 0.93rem;
    padding: 3px 1px;
  }
}
/* Center the button below the round input fields */
.round-inputs + .btn,
.round-inputs.grid-players + .btn {
  display: block;
  width: 100%;
  margin: 12px 0 0 0;
}
/* dealer-circle class for dealer's turn indication */
.dealer-circle {
  display: inline-block;
  border: 2px solid #27ae60;
  border-radius: 50%;
  padding: 0.2em 0.7em;
  background: #eaffea;
  color: #219150;
  font-weight: bold;
  margin: 0 2px;
}

/* Einheitliche Abstände und Ausrichtung für Spieleranzahl und Spielernamen */
#setup-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

#setup-form label {
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--primary-green-dark, #219150);
  align-self: flex-start;
}

#setup-form input[type="number"] {
  width: 80px;
  padding: 7px 9px;
  font-size: 1rem;
  border-radius: 7px;
  border: 1px solid var(--table-border);
  margin-bottom: 8px;
  background: #f4f8fb;
  color: var(--text-main);
  outline: none;
  transition: border 0.2s;
  display: inline-block;
  text-align: center;
}

.player-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 16px;
  width: 100%;
}

.player-name-input {
  width: 120px;
  padding: 6px 8px;
  font-size: 1rem;
  border-radius: 7px;
  border: 1px solid var(--table-border);
  margin-bottom: 8px;
  background: #f4f8fb;
  color: var(--text-main);
  outline: none;
  transition: border 0.2s;
  display: inline-block;
  text-align: center;
}

.num-players-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.num-players-group label {
  margin-bottom: 6px;
  font-size: 1rem;
  color: var(--primary-green-dark, #219150);
  text-align: center;
}

.dealer-select {
  width: 100%;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--primary-green, #6fcf97);
  background: var(--primary-green-light, #d6f5e3);
  color: var(--primary-green-dark, #3a7e6c);
  font-size: 1.1rem;
  margin: 18px 0 10px 0;
  outline: none;
  transition: border 0.2s;
  box-shadow: 0 2px 8px 0 rgba(60, 80, 120, 0.07);
}

.dealer-select:focus {
  border: 2px solid var(--primary-green-dark, #3a7e6c);
  background: #fff;
}
