* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #f1f5f9;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 500px;
  width: 95%;
  margin: 0 auto;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  color: #6366f1;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.screen {
  background: #1e293b;
  padding: 30px;
  border-radius: 15px;
  margin-top: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.screen:hover {
  transform: translateY(-2px);
}

.hidden {
  display: none;
}

.subtitle {
  text-align: center;
  color: #94a3b8;
}

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

.mt-10 {
  margin-top: 10px;
}

.word-box {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.word-box .word {
  background: #334155;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #f1f5f9;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.divider {
  margin: 20px 0;
  font-size: 0.9rem;
  color: #94a3b8;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  display: inline-block;
  width: 30%;
  height: 1px;
  background: #475569;
  margin: 0 10px;
  vertical-align: middle;
}

.input-field {
  width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: none;
  background: #334155;
  color: #f1f5f9;
  font-size: 1rem;
  margin-bottom: 15px;
}

.input-field::placeholder {
  color: #94a3b8;
}

button {
  width: 100%;
  padding: 14px;
  margin: 8px 0;
  border: none;
  border-radius: 10px;
  background: #6366f1;
  color: #f1f5f9;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background: #4f46e5;
  transform: translateY(-2px);
}

button.primary {
  background: #10b981;
}

button.primary:hover {
  background: #059669;
}

button.secondary {
  background: #475569;
}

button.secondary:hover {
  background: #334155;
}

button:focus, .input-field:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

p.small {
  text-align: center;
  margin-top: 15px;
  font-size: 0.8rem;
  color: #64748b;
}

.header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-weight: bold;
}

#answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-btn {
  background: #334155;
  text-align: left;
  font-weight: 500;
}

.answer-btn.correct {
  background: #10b981;
}

.answer-btn.wrong {
  background: #ef4444;
}

.controls {
  margin-top: 20px;
}

#score,
#timer {
  font-weight: bold;
  color: #f1f5f9;
}

.big {
  font-size: 2rem;
  color: #6366f1;
  margin-bottom: 10px;
}

/* === Žebříček a účet === */
.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.leaderboard-item {
  background: #334155;
  padding: 12px 15px;
  margin: 5px 0;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.rank {
  font-weight: bold;
  margin-right: 10px;
  width: 25px;
  text-align: center;
}

.rank.top1 {
  color: #fbbf24;
}
.rank.top2 {
  color: #94a3b8;
}
.rank.top3 {
  color: #fb923c;
}

.current-user-stats {
  strong { margin-right: 5px; }
}

#changeUsernameForm {
  margin-top: 10px;
}