/* -----------------------------------
   GLOBAL
------------------------------------ */
body {
  background: url("cards/background.png") no-repeat center center fixed;
  background-size: cover;
}

/* Login-Screen: eigenes Vollformat-Hintergrundbild */
#login {
  background: url("cards/background-login.png") no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  width: 100%;
}


/* LOGIN & ROOM */

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 80px;
}
.login-img {
  max-width: 720px;
  width: 90%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
#login h2 {
  font-size: 1.6rem;
  margin: 0;
  color: #fdd835;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
}
.screen input,
.screen button {
  padding: 8px;
  font-size: 1rem;
  width: 200px;
}
.screen button {
  cursor: pointer;
}
#roomPlayers {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}
/* Lobby-ÃƒÅ“berschrift ("Raum") weiÃƒÅ¸ */
#room h2 {
  color: #fff;
}

/* Lobby-Spielernamen weiÃƒÅ¸ */
#roomPlayers li {
  color: #fff;
}


/* CARD & GRID (Spiel-Seite) */
.card {
  background: #2a2a2a;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
  padding: 16px;
  margin: 0;
  width: 100%;
}
.card-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* Toggle-Button jetzt inline im Header */
.toggle-score-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin-left: auto;
  padding: 8px 12px;
  font-size: 1rem;
  border: none;
  background: #fdd835;
  color: #222;
  border-radius: 4px;
  cursor: pointer;
}

/* Gesamtes Spiel-Gitter nach unten schieben, damit Header + Rangliste Platz haben */
.grid-container {
  display: grid;
  grid-template-columns: 280px 280px 800px;
  grid-auto-rows: auto;
  column-gap: 64px;
  row-gap: 8px;
  margin-top: 180px; /* ausreichend Abstand fÃƒÂ¼r Header-Bar + Rangliste */
}

/* Spiel-Layout: Grid-Reihen 1Ã¢â‚¬â€œ5 */
#bidding       { grid-column: 1;          grid-row: 1; }
#standings     { grid-column: 1;          grid-row: 2; }
#current-trick { grid-column: 1 / span 2; grid-row: 3; }
#handSection   { grid-column: 1 / span 2; grid-row: 4; }
/* Stiche je Spieler: klar in Zeile 5 unter HandSection */
#stichPanels   { grid-column: 1 / span 2; grid-row: 6; margin-top: 8px; }
/* Overlay fÃƒÂ¼r Block der Wahrheit */
.overlay {
  position: fixed;
  top: 80px;
  right: 20px;
  width: auto;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 100px);
  overflow-x: auto;
  overflow-y: auto;
  display: none;
  z-index: 2000; /* jetzt ganz vorne */
}

/* Minimize-Button im Overlay */
.minimize-btn {
  background: transparent;
  border: none;
  color: #eee;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Biet-Input-Gruppe */
.bid-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.bid-input-group input {
  flex: 1;
  padding: 6px;
  font-size: 1rem;
}
.bid-input-group button {
  padding: 6px 12px;
  font-size: 1rem;
  cursor: pointer;
}
.card-note {
  font-size: 0.9rem;
  color: #aaa;
  margin: 4px 0;
}

/* Trumpf-Container */
.trump-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* Stich-Panels unter Handkarten als Reihe */
.panels-container {
  display: flex;
  flex-direction: row;
  gap: 8px;
}
.player-trick-panel {
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 8px;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 6px;
}
.dice {
  font-size: 3rem;
}
.trick-stack {
  position: relative;
  width: 100%;
  height: 50px;
}
.trick-card {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 45px;
  background: #444;
  border: 1px solid #666;
  border-radius: 4px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transform: translate(-50%,-50%);
}

/* Aktueller Stich: immer sichtbar, mehr Abstand & grÃƒÂ¶ÃƒÅ¸er */
.trick-slots {
  display: flex;
  flex-direction: row;  /* sorgt fÃƒÂ¼r nebeneinander */
  gap: 16px;
  justify-content: center;
  margin-bottom: 16px;
}

.trick-slot {
  width: 200px;
  height: 300px;
  background: #111;
  border: 2px dashed #555;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.trick-slot .card-img {
  width: 180px;
  height: 270px;
  object-fit: contain;
}

/* Handkarten */
#hand {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
  overflow-x: auto;
}
.card-img {
  width: 70px;
  height: 105px;
  object-fit: contain;
  cursor: pointer;
  border: 1px solid #666;
  border-radius: 4px;
  background: #444;
}

/* SHAKE-ANIMATION fÃƒÂ¼r unspielbare Karten (nur diese Variante verwenden, keine Dopplungen!) */
@keyframes shake {
  0% { transform: translateX(0); }
  15% { transform: translateX(-32px); }
  30% { transform: translateX(32px); }
  45% { transform: translateX(-24px); }
  60% { transform: translateX(24px); }
  75% { transform: translateX(-16px); }
  90% { transform: translateX(16px); }
  100% { transform: translateX(0); }
}
.card-img.shake {
  animation: shake 0.8s cubic-bezier(.36,.07,.19,.97) both !important;
  z-index: 10;
  box-shadow: 0 0 16px 2px red;
  border-color: red;
}

/* Rangliste */
#standings {
  position: fixed;
  top: 60px;
  right: 20px;
  width: 280px;
  z-index: 1002;
}
#standingsList {
  list-style: none;
  padding: 0;
  margin: 0;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Rangliste: fixe Spalten fÃƒÂ¼r Balken-Ausrichtung Ã¢â€â‚¬Ã¢â€â‚¬ */
#standingsList li {
  display: grid;
  grid-template-columns:
    24px                /* Platz fÃƒÂ¼r Ã°Å¸Â¥â€¡Ã°Å¸Â¥Ë†Ã°Å¸Â¥â€° oder "1." */
    1fr                 /* Spieler-Name */
    minmax(100px, 1fr)  /* Balken (mind.100px breit) */
    auto;               /* Punktzahl */
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

#standingsList .rank {
  grid-column: 1;
  width: 24px;
  text-align: center;
}
#standingsList .name {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#standingsList .bar {
  grid-column: 3;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #444;
}
#standingsList .bar .fill {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.6s ease;
  background: limegreen;
}
#standingsList .score {
  grid-column: 4;
  text-align: right;
  width: 40px;
}

/* Block der Wahrheit Tabelle */
#scoreSheetTable {
  border-collapse: collapse;
  border: 2px solid #fff;
}
#scoreSheetTable th,
#scoreSheetTable td {
  border: 1px solid #fff;
  padding: 4px 6px;
  text-align: center;
  font-size: 0.9rem;
}
#scoreSheetTable thead th {
  background: #333;
}
#scoreSheetTable tbody tr:nth-child(odd) {
  background: #444;
}
#scoreSheetTable tbody tr:nth-child(even) {
  background: #555;
}
#scoreSheetTable th:nth-child(3n+1),
#scoreSheetTable td:nth-child(3n+1) {
  border-right: 2px solid #fff;
}
#scoreSheetTable th:last-child,
#scoreSheetTable td:last-child {
  border-right: 2px solid #fff;
}
#scoreSheetTable thead tr:first-child th[colspan="3"] {
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #fff;
  border-bottom: 1px solid #fff;
}
#scoreSheetTable thead tr:nth-child(2) th:nth-child(3n+1) {
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-right: 1px solid #fff;
}
#scoreSheetTable thead tr:nth-child(2) th:nth-child(3n+2) {
  border-left: 1px solid #fff;
  border-bottom: 2px solid #fff;
  border-right: 1px solid #fff;
}
#scoreSheetTable thead tr:nth-child(2) th:nth-child(3n+3) {
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-left: 1px solid #fff;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Aktueller Stich: begrenzte Breite und linksbÃƒÂ¼ndig starten Ã¢â€â‚¬Ã¢â€â‚¬ */
#current-trick {
  position: relative;
  grid-column: 1 / span 2 !important;
}
.trick-slots {
  display: flex;
  justify-content: flex-start;
  padding-left: 8px;
  gap: 16px;
  margin-bottom: 16px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Wrapper pro Spieler im aktuellen Stich Ã¢â€â‚¬Ã¢â€â‚¬ */
.trick-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 8px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ ÃƒÅ“berschrift ÃƒÂ¼ber jedem Slot: Name + (taken/bid) Ã¢â€â‚¬Ã¢â€â‚¬ */
.trick-player .trick-header {
  display: flex;
  justify-content: space-between;
  width: 200px;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Clear Background fÃƒÂ¼r spezielle Karten Ã¢â€â‚¬Ã¢â€â‚¬ */
#standings,
#stichPanels,
#current-trick,
#handSection {
  background: transparent !important;
  box-shadow: none      !important;
  border: none          !important;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Runde & Karten oben links Ã¢â€â‚¬Ã¢â€â‚¬ */
#roundInfo {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 1.5rem;
  z-index: 1001;
}
#roundInfo .round-number,
#roundInfo .hand-size {
  font-size: 2rem;
}
#roundInfo .dash {
  font-size: 2rem;
}
#roundInfo .trump-top {
  width: 60px;
  height: 90px;
  object-fit: contain;
  border: 1px solid #666;
  border-radius: 4px;
  background: #444;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Verberge alten Hand-Header & Trumpf-Container Ã¢â€â‚¬Ã¢â€â‚¬ */
#handSection .card-title,
#handSection #trumpContainer {
  display: none !important;
}
/* Handkarten etwas vergrÃƒÂ¶ÃƒÅ¸ern */
#hand .card-img {
  width: 70px;
  height: 105px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Kontrastanpassung fÃƒÂ¼r Rangliste und Stich-Panels Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
#standings,
#standings * {
  color: #fff !important;
}

#stichPanels,
#stichPanels * {
  color: #fff !important;
}

/* weiÃƒÅ¸e Rahmen bei Stich-Panels */
#stichPanels .player-trick-panel {
  border-color: #fff !important;
}

/* weiÃƒÅ¸e Linien zwischen Ranglisten-EintrÃƒÂ¤gen */
#standingsList li {
  border-bottom: 1px solid #fff;
}

/* optional: weiÃƒÅ¸e Platzhalter-Slots im aktuellen Stich */
.trick-slot {
  border-color: #fff !important;
}

/* Stelle sicher, dass alle WÃƒÂ¼rfel-Symbole auch korrekt kontrastieren */
#stichPanels .dice {
  color: #fff;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ WeiÃƒÅ¸er Text im Aktuellen Stich Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
#current-trick,
#current-trick * {
  color: #fff !important;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ WeiÃƒÅ¸er Text und Icons oben links (Runde/Karten und Trumpf) Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
#roundInfo,
#roundInfo * {
  color: #fff !important;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Trumpf oben links: kein Invert-Filter mehr Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
#roundInfo img.trump-top {
  filter: none !important;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ ÃƒÅ“berschriften-Unterstriche ÃƒÂ¼berall weiÃƒÅ¸ Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
.card-title {
  border-bottom-color: #fff !important;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Block der Wahrheit: Text weiÃƒÅ¸, Button-Schrift schwarz Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
#scoreSheet {
  color: #fff;
}

/* Tabellen-Inhalt */
#scoreSheet th,
#scoreSheet td {
  color: #fff;
}

/* ÃƒÅ“berschrift im Overlay */
#scoreSheet .card-title,
#scoreSheet .card-title * {
  color: #fff;
}

/* Gelber Toggle-Button und Minimizer-Button: Schrift schwarz */
#toggleScore,
#scoreSheet .minimize-btn {
  color: #222;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬ Spieler-Namen in den Stich-Panels automatisch mit Ellipsis beschneiden Ã¢â€â‚¬Ã¢â€â‚¬ */
#stichPanels .panel-header span:first-child {
  display: inline-block;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Eigene Position in der Rangliste hervorheben */
#standingsList li.self {
  background: rgba(250,200,0,0.2);
  border-left: 4px solid #fdd835;
  padding-left: 4px;
}
/* Header-Bar: fixed ganz oben, alle Elemente inline */
.header-bar {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  z-index: 1001;
}

/* Rundendaten inline in der Header-Bar */
#roundInfo {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 1.5rem;
}

/* Stell die Rangliste direkt neben der Trumpfkarte dar */
#standings {
  position: static;
  margin-left: 16px;
}

/* Schiebe den Button ganz ans Ende */
#toggleScore {
  margin-left: auto;
}
/* Inline-Rangliste: 2 Spalten Ãƒ  max. 3 EintrÃƒÂ¤ge, alle Namen sichtbar */
#standingsList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: auto;
  row-gap: 8px;
  column-gap: 16px;
}

/* Jedes Listenelement in der Inline-Liste zeigt seine Inhalte normal an */
#standingsList li {
  display: flex;
  align-items: center;
  color: #fff;
}

/* Name nimmt den verbleibenden Platz, damit Bar und Score daneben stehen */
#standingsList li .name {
  flex: 1;
}
/* Inline-Rangliste: Balken fÃƒÂ¼r PunkteabstÃƒÂ¤nde */
#standingsList li {
  display: flex;
  align-items: center;
}

/* Balken-Container */
#standingsList li .bar {
  display: block;
  width: 100px;
  height: 8px;
  border-radius: 4px;
  background: #444;
  overflow: hidden;
  margin: 0 8px;
  flex-shrink: 0;
}

/* Balken-FÃƒÂ¼llung */
#standingsList li .fill {
  display: block;
  height: 100%;
  transition: width 0.6s ease;
  background: limegreen;
}

/* Punktzahl */
#standingsList li .score {
  margin-left: 8px;
  white-space: nowrap;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ Hintergrund fÃƒÂ¼r die komplette Inline-Rangliste Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
.header-bar #standings {
  display: inline-block;
  width: max-content;
  background-color: rgba(255, 255, 255, 0.2) !important;
  padding: 8px !important;
  border-radius: 6px !important;
  margin-left: 16px;
}

/* Header-Bar: Elemente oben bÃƒÂ¼ndig, linke Spalte gestapelt */
.header-bar {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 8px 16px;
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  z-index: 1001;
}

/* Linke Gruppe: Runde oben, Button direkt darunter */
.info-group {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}

/* Optional: Button etwas schmaler, zentriert */
.info-group #toggleScore {
  width: max-content;
  margin: 0;
}

/* Rundendaten unverÃƒÂ¤ndert (static innerhalb info-group) */
.info-group #roundInfo {
  position: static;
}

/* Rangliste rechts unverÃƒÂ¤ndert */
.header-bar #standings {
  display: inline-block;
  width: max-content;
  margin-left: 32px;
}

/* Breitere Felder fÃƒÂ¼r Stiche je Spieler */
#stichPanels .player-trick-panel {
  width: 150px;
}
/* InstantReaction unter den Handkarten im Grid platzieren */

.gif-choice {
  height: 120px;
  width: auto;
  cursor: pointer;
}
.trick-slot {
  position: relative;
}

/* GIF-Overlay: mittig, 90% Breite, ohne Verzerrung */
.reaction-overlay {
  position: absolute;
  inset: 0;           /* top/right/bottom/left = 0 */
  margin: auto;       /* damit mit fester GrÃƒÂ¶ÃƒÅ¸e zentriert wird */
  max-width: 90%;
  max-height: 90%;
  width: auto;        /* Breite vom Bild Ã¢â€ â€™ automatisch */
  height: auto;       /* HÃƒÂ¶he entsprechend Ã¢â€ â€™ keine Verzerrung */
  pointer-events: none;
  z-index: 2;
}

.end-round-btn {
  display: none;
  font-size: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background: url('cards/end-round.png') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.end-round-btn.visible {
  display: block;
}
/* Login-Error unter dem Login-Button */
#login {
  position: relative;
}
.login-error-img {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: auto;
  pointer-events: none;
  z-index: 1001;
}

/* Popup-Bilder im Aktueller Stich-Feld */
#current-trick {
  position: relative;
}
.popup-trick-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: auto;
  pointer-events: none;
  z-index: 1001;
}

/* Handkarten in einer Zeile ohne Scrollen innerhalb des Felds */
#handSection {
  overflow: visible !important;
}
#hand {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  gap: 6px;
  width: max-content !important;
  overflow: visible !important;
}
/* Karten-Container & Overlay-Frame */
.card-container {
  display: inline-block;
  position: relative;
  margin: 0 4px;
  overflow: visible !important;
}
.card-container .frame-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.3);
  transform-origin: center center;
  pointer-events: none;
  width: 120%;
  height: 120%;
  background-repeat: no-repeat;
  background-size: contain;
  z-index: 1;
}

/* Overlay fÃƒÂ¼rs Runde-Beenden */
#endRoundOverlay .end-round-cards {
  display: flex;
  gap: 8px;
  justify-content: center;
}
#endRoundOverlay .end-round-card-img {
  width: 50px;
  height: 75px;
  object-fit: contain;
  border: 1px solid #666;
  border-radius: 4px;
  background: #444;
}
#endRoundOverlay .end-round-gif {
  display: block;
  margin: 12px auto 0;
  width: 150px;
  height: auto;
}

/* Statistik-Button */
#statsBtn {
  padding: 6px 12px;
  font-size: 1rem;
  cursor: pointer;
  background: #fdd835;
  border: none;
  border-radius: 4px;
  color: #222;
}
#statsBtn:hover {
  background: #e6c12a;
}

/* Statistik-Overlay */
#statsOverlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 24px;
  border-radius: 8px;
  z-index: 4000;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
}
#statsOverlay h2 {
  margin-top: 0;
  color: #fdd835;
}
#statsOverlay h3 {
  margin: 16px 0 4px;
  color: #fdd835;
}
#statsOverlay ul {
  list-style: none;
  padding-left: 1.2em;
  margin: 0 0 12px;
}
#statsOverlay ul li {
  margin: 4px 0;
}
/* Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ InstantReaction-Buttons & GIF-Dropdown in Zeile 5 des Grids Ã¢â€â‚¬Ã¢â€â‚¬Ã¢â€â‚¬ */
.instant-reactions {
  position: relative;
  grid-column: 1 / span 2;
  grid-row: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.reaction-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.8);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 1500;
}

.reaction-dropdown.hidden {
  display: none !important;
}

/* Hervorhebung fÃƒÂ¼r Ã¢â‚¬Å¾Spiel startenÃ¢â‚¬Å“ bei geladenem Spielstand */
#startGameBtn.load-previous {
  border: 2px solid red !important;
}
