:root{
  --bg:#0f172a; /* slate-900 */
  --card:#111827; /* gray-900 */
  --text:#e5e7eb; /* gray-200 */
  --muted:#9ca3af; /* gray-400 */
  --primary:#3b82f6; /* blue-500 */
  --success:#22c55e; /* green-500 */
  --border:#1f2937; /* gray-800 */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.container{max-width:900px;margin:0 auto;padding:24px}
h1{font-size:28px;margin:8px 0 16px}
h2{font-size:20px;margin:0 0 12px}
h3{font-size:16px;margin:16px 0 8px}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  padding:16px;
  margin:16px 0;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
}

.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.btn{
  background:#1f2937;
  color:var(--text);
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px 14px;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.1)}
.btn.primary{background:var(--primary);border-color:transparent;color:white}
.btn.lg{font-size:18px;padding:14px 18px}
.btn.success{background:var(--success);border-color:transparent;color:white}
.btn.link{background:transparent;border-color:transparent;color:var(--muted)}

label{display:block;margin:8px 0 4px;color:var(--muted)}
input{
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:1px solid var(--border);
  background:#0b1220;
  color:var(--text);
  margin-bottom:12px;
}

.hidden{display:none}
.muted{color:var(--muted)}
.room-code{font-size:32px;letter-spacing:4px;font-weight:700;margin:8px 0}
.list{list-style:none;padding:0;margin:0}
.list li{padding:6px 8px;border-bottom:1px dashed var(--border)}

.status{margin-top:8px;color:var(--muted)}

/* Tafel selectie styling */
.table-selection {
  margin: 16px 0;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.btn.preset {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
}

.btn.preset:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn.preset.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.individual-tables {
  margin-top: 16px;
}

.table-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.checkbox-label:hover {
  background: var(--card);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkbox-label input[type="checkbox"]:checked + span {
  color: var(--primary);
  font-weight: 600;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
  background: var(--card);
  border-color: var(--primary);
}

/* Spel interface styling */
.game-header {
  margin-bottom: 24px;
}

.game-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 80px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat span:last-child {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.game-content {
  text-align: center;
}

.question-display {
  margin: 32px 0;
}

.question-text {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0;
  text-align: center;
}

.question-text input {
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 3px solid var(--primary);
  outline: none;
  width: 120px;
  text-align: center;
  margin-left: 8px;
  /* Verwijder schuifbalkjes */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.question-text input::-webkit-outer-spin-button,
.question-text input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 768px) {
  .question-text {
    font-size: 36px;
    margin: 24px 0;
  }
  
  .question-text input {
    font-size: 36px;
    width: 100px;
  }
  
  .game-stats {
    gap: 12px;
  }
  
  .stat {
    min-width: 70px;
    padding: 8px;
  }
}



.game-end {
  text-align: center;
  margin: 32px 0;
}

.final-score {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  margin: 16px 0;
}

/* Scoreboard styling */
.leaderboard {
  margin: 24px 0;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin: 8px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.leaderboard-item.first {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #000;
  border-color: #ffd700;
}

.leaderboard-item.second {
  background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
  color: #000;
  border-color: #c0c0c0;
}

.leaderboard-item.third {
  background: linear-gradient(135deg, #cd7f32, #daa520);
  color: #fff;
  border-color: #cd7f32;
}

.leaderboard-position {
  font-size: 24px;
  font-weight: 700;
  min-width: 40px;
}

.leaderboard-name {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
  text-align: left;
  margin-left: 16px;
}

.leaderboard-score {
  font-size: 16px;
  color: #000000; /* Zwart voor betere leesbaarheid */
}

/* Gedeelde plaatsen styling */
.leaderboard-item.first + .leaderboard-item.first {
  border-top: none;
  margin-top: 0;
}

.leaderboard-item.second + .leaderboard-item.second {
  border-top: none;
  margin-top: 0;
}

.leaderboard-item.third + .leaderboard-item.third {
  border-top: none;
  margin-top: 0;
}

/* Wait title styling */
.wait-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  margin: 16px 0;
  padding: 12px;
  background: rgba(255, 165, 0, 0.1);
  border-radius: 8px;
  border: 2px solid rgba(255, 165, 0, 0.3);
}

/* Footer styling */
.footer {
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  color: #888888;
  font-size: 12px;
  border-top: 1px solid #e5e5e5;
}

.footer a {
  color: #666666;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
  color: #444444;
}

/* Instructie styling */
.instructions {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.instructions h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.5rem;
}

.instruction-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border-left: 4px solid var(--primary);
}

.step-number {
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: #fff;
  line-height: 1.5;
}

.step strong {
  color: var(--primary);
}

@media (max-width: 768px) {
  .instructions {
    padding: 15px;
    margin: 15px 0;
  }
  
  .step {
    padding: 12px;
    gap: 12px;
  }
  
  .step-number {
    width: 25px;
    height: 25px;
    font-size: 1rem;
  }
}

