body {
  margin: 0;
  font-family: 'Courier New', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #0d0d0d;
  color: #00ffcc;
  padding: 2rem;
}

h1 {
  margin-top: 20px;
  color: #00ffd5;
  text-shadow: 0 0 5px #00ffd5;
}

/* 💠 Memory-Spiel Styles */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 16px 24px;
  justify-content: center;
  padding: 20px;
  max-width: 500px;
  margin: 0 auto;
}

.menu-grid button {
  background-color: #222;
  color: white;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 100%;
}

.menu-grid button:hover {
  background-color: #333;
  transform: scale(1.03);
}

#info-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 10px;
  font-size: 18px;
  text-align: center;
  flex-wrap: wrap;
}

#timer {
  font-weight: bold;
  font-size: 22px;
  text-shadow: 0 0 6px #00ffd5;
}

.timer-danger {
  color: red;
  text-shadow: 0 0 8px red;
}

.turn-indicator {
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  color: #ffcc00;
}

.chili-label {
  grid-column: span 2;
  text-align: center;
  font-size: 1.5rem;
  color: red;
  text-shadow: 0 0 5px orange;
}

#score-display,
#timer-display {
  margin: 10px 0;
  font-size: 20px;
  color: #00e6b8;
  text-shadow: 0 0 3px #00ffd5;
}

#result-area {
  background: #111;
  border: 1px solid #00ffd5;
  border-radius: 10px;
  margin-top: 20px;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 80px);
  grid-gap: 12px;
  padding: 15px;
  background-color: #1a1a1a;
  border: 2px solid #00ffcc;
  border-radius: 10px;
}

.card {
  width: 80px;
  height: 80px;
  background-color: #262626;
  border: 2px solid #00cc99;
  border-radius: 8px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 0 8px #00ffd5;
}

.card.flipped {
  background-color: transparent;
}

.card.matched {
  filter: grayscale(100%) brightness(0.7);
  border-color: #00ff99;
  pointer-events: none;
}

.card.disabled {
  pointer-events: none;
  opacity: 0.6;
  filter: grayscale(100%) brightness(0.7);
}

button {
  margin: 5px;
  padding: 10px 15px;
  background-color: #00cc99;
  color: black;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: #00e6b8;
}

/* 🏆 Leaderboard Styles integriert */
table {
  width: 100%;
  border-collapse: collapse;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  /* margin-top: 2rem;*/
  margin-top: 0.5rem; /* oder z. B. 0.75rem für feinere Abstimmung */
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid #222;
  text-align: left;
  color: #e0fff9;
}

th {
  background: #222;
  color: #00ffd5;
  text-shadow: 0 0 3px #00ffd5;
}

.status {
  font-size: 1.2rem;
}

.badge {
  margin-right: 0.4em;
}

.rank {
  font-weight: bold;
  color: #00ffd5;
}

.challenge-btn {
  font-size: 14px;
  padding: 4px 6px;
  background-color: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.challenge-btn:hover {
  background-color: #eee;
}

/* 🎮 Multiplayer-Scoreboard */
#multiplayer-scoreboard {
  margin-top: 10px;
  padding: 6px 10px;
  background: #111;
  border: 1px solid #00ffd5;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 0 6px rgba(0, 255, 213, 0.5);
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

#multiplayer-scoreboard .score-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 16px;
  color: #e0fff9;
}

#multiplayer-scoreboard .score-row span:first-child {
  color: #00ffd5;
  text-shadow: 0 0 4px #00ffd5;
}

#multiplayer-scoreboard .score-row span:last-child {
  color: #ffcc00;
  text-shadow: 0 0 4px #ffcc00;
}

/* Reset & Layout aus dem früheren <style> */

.card.matched-own {
  filter: none;                /* eigene Karten farbig lassen */
  border-color: #00ff99 !important;
}

.card.matched-opponent {
  filter: grayscale(100%) brightness(0.7) !important;
  border-color: #00ff99 !important;
}

/* sichtbarer Tastaturfokus */
button:focus-visible,
.challenge-btn:focus-visible,
.card:focus-visible {
  outline: 2px solid #00ffd5;
  outline-offset: 2px;
}

/* weniger Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Buttons außerhalb des Menüs nicht grün einfärben (optional) */
/* Falls gewünscht: ersetze den globalen button-Block durch: */
.menu-grid button {
  /* ...deine bisherigen button-Regeln hierher verschieben... */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
.memory-grid { display: grid; justify-content: center; }
@media (max-width: 500px) {
  .memory-grid { grid-template-columns: repeat(4, 60px); grid-gap: 6px; }
  .card { width: 60px; height: 60px; }
}
@media (min-width: 501px) and (max-width: 768px) {
  .memory-grid { grid-template-columns: repeat(4, 80px); grid-gap: 10px; }
  .card { width: 80px; height: 80px; }
}

/* Klassen für frühere inline style="" */
.hidden { display: none; } 
.center { text-align: center; }
.mt-10 { margin-top: 10px; }
.result-area { text-align: center; padding: 20px; }
.result-message { white-space: pre-line; font-size: 16px; margin-bottom: 20px; }
.leaderboard { max-width: 800px; margin: 20px auto; }

/* === HOTFIX: zurück auf die alten Größen === */
body {
  padding: 0 !important;               /* weg mit der zusätzlichen Außenluft */
}

/* Menü wieder kompakter */
.menu-grid {
  max-width: unset !important;          /* keine künstliche Verbreiterung */
  gap: 12px !important;                 /* kleineres Grid-Gap */
}

/* Buttons wieder kleiner wie zuvor */
.menu-grid button {
  padding: 8px 12px !important;
  font-size: 14px !important;
  transform: none !important;           /* kein Hover-Zoom, falls das als “größer” wirkt */
}
.menu-grid button:hover {
  transform: none !important;
}

/* Karten & Grid: exakt wie vorher (lassen wir unberührt, nur falls woanders übersteuert wird) */
.memory-grid { grid-template-columns: repeat(4, 80px) !important; grid-gap: 12px !important; }
@media (max-width: 500px) {
  .memory-grid { grid-template-columns: repeat(4, 60px) !important; grid-gap: 6px !important; }
  .card { width: 60px !important; height: 60px !important; }
}
@media (min-width: 501px) and (max-width: 768px) {
  .memory-grid { grid-template-columns: repeat(4, 80px) !important; grid-gap: 10px !important; }
  .card { width: 80px !important; height: 80px !important; }
}