body { background: #0b1f17; color: #f0f0f0; font-family: 'Manrope', sans-serif; margin: 0; }
.hidden { display: none !important; }

.screen { min-height: 100vh; }

.lobby-box {
  background: #122b20;
  padding: 24px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  margin: 20px auto;
}
.lobby-box input, .lobby-box button {
  padding: 10px;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
}
.lobby-box button { background: #c9a227; font-weight: bold; cursor: pointer; }
.or { text-align: center; opacity: 0.7; font-size: 13px; }

.sj-topbar {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  background: #093a22;
  font-size: 14px;
}
.sj-waiting {
  text-align: center;
  padding: 30px 20px;
}
.sj-waiting button {
  background: #c9a227;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

.sj-opponents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 14px;
}
.sj-opponent {
  background: #122b20;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
  min-width: 140px;
}
.sj-opponent.active-turn { outline: 2px solid #c9a227; }
.sj-opponent .name { font-weight: bold; margin-bottom: 6px; }
.sj-opponent .row { display: flex; justify-content: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

.sj-center { display: flex; justify-content: center; padding: 10px; }
.sj-stacks { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.sj-card {
  width: 54px;
  height: 78px;
  background: #378ADD;
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 24px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  cursor: pointer;
  user-select: none;
  position: relative;
}
.sj-card.range-low { background: #378ADD; }   /* 1-4: Blau */
.sj-card.range-mid { background: #639922; }   /* 5-8: Gruen */
.sj-card.range-high { background: #D85A30; }  /* 9-12: Koralle/Rot */
.sj-card.wild { background: #C9A227; color: #ffffff; }
.sj-card.empty { background: rgba(255,255,255,0.06); color: #6a7d73; box-shadow: none; cursor: default; }
.sj-card.selected { outline: 3px solid #7fd9a8; transform: translateY(-4px); }
.sj-card.small { width: 42px; height: 60px; font-size: 17px; }
.sj-card .needed-label {
  position: absolute;
  bottom: -18px;
  font-size: 10px;
  font-family: 'Manrope', sans-serif;
  color: #9fb3a8;
  white-space: nowrap;
}

.sj-my-area {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 30px;
  padding: 20px 16px 90px;
  flex-wrap: wrap;
}
.sj-label { font-size: 11px; color: #9fb3a8; text-align: center; margin-bottom: 6px; font-family: 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; }
.sj-slot { display: flex; justify-content: center; }
.sj-hand { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 420px; }
.sj-discard-row { display: flex; gap: 8px; }

.sj-win-banner {
  text-align: center;
  background: #c9a227;
  color: #16110a;
  font-weight: bold;
  padding: 14px;
  margin: 10px auto;
  max-width: 400px;
  border-radius: 10px;
  font-size: 16px;
}

.sj-error { text-align: center; color: #ff8080; min-height: 20px; font-size: 13px; }

#passEmptyHandBtn {
  background: #c9a227;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

/* Chat (gleich wie im Skat-Spiel) */
.chat-panel { position: fixed; bottom: 0; right: 20px; width: 280px; z-index: 60; }
.chat-toggle { background: #0f5c37; color: #f0f0f0; padding: 10px 16px; border-radius: 8px 8px 0 0; cursor: pointer; font-size: 14px; font-weight: bold; }
.chat-toggle:hover { background: #146342; }
.chat-body { background: #093a22; border: 1px solid rgba(255,255,255,0.1); border-bottom: none; display: flex; flex-direction: column; height: 260px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px; font-size: 13px; color: #e8e8e8; }
.chat-messages .msg { margin-bottom: 6px; line-height: 1.4; }
.chat-messages .msg .who { color: #d4af37; font-weight: bold; margin-right: 4px; }
.chat-input-row { display: flex; border-top: 1px solid rgba(255,255,255,0.1); }
.chat-input-row input { flex: 1; padding: 10px; border: none; background: #0b2e1c; color: #f0f0f0; font-size: 13px; }
.chat-input-row button { background: #d4af37; border: none; padding: 0 14px; font-weight: bold; cursor: pointer; font-size: 13px; }
.chat-quick-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-top: 1px solid rgba(255,255,255,0.08); }
.quick-btn { background: rgba(255,255,255,0.08); border: none; color: #e8e8e8; padding: 4px 9px; border-radius: 12px; font-size: 11px; cursor: pointer; }
.quick-btn:hover { background: #d4af37; color: #16110a; }

@media (max-width: 640px) {
  .sj-card { width: 44px; height: 64px; font-size: 17px; }
  .sj-card.small { width: 36px; height: 52px; font-size: 13px; }
  .sj-my-area { gap: 14px; padding: 14px 8px 100px; }
  .sj-hand { max-width: 300px; }
  .chat-panel { right: 8px; width: calc(100vw - 16px); max-width: 300px; }
  .chat-body { height: 190px; }
}
