body { background: var(--bg-deep); color: var(--text); font-family: 'Manrope', sans-serif; margin: 0; }
.hidden { display: none !important; }
.screen { min-height: 100vh; }

.lobby-box {
  background: var(--bg-panel);
  border: 3px solid var(--line);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  margin: 20px auto;
}
.lobby-box input, .lobby-box button {
  padding: 10px;
  border: 2px solid var(--line);
  font-size: 15px;
  font-family: 'Manrope', sans-serif;
  background: var(--bg-panel-raised);
  color: var(--text);
}
.lobby-box button { background: var(--gold); color: var(--on-accent); font-weight: 800; cursor: pointer; text-transform: uppercase; }
.or { text-align: center; opacity: 0.7; font-size: 13px; }

.dk-topbar {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-panel);
  border-bottom: 3px solid var(--line);
  font-size: 14px;
  font-weight: 700;
}

.dk-waiting { text-align: center; padding: 30px 20px; }
.dk-waiting button {
  background: var(--gold);
  color: var(--on-accent);
  border: 2px solid var(--line);
  padding: 10px 20px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  margin: 6px;
}

.dk-team-label {
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  padding: 6px;
}

.dk-opponents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 14px;
}
.dk-opponent {
  background: var(--bg-panel);
  border: 2px solid var(--line);
  padding: 10px 14px;
  font-size: 13px;
  text-align: center;
  min-width: 120px;
}

.dk-trick-area {
  min-height: 130px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dk-card {
  width: 60px;
  height: 88px;
  background: #ffffff;
  border: 3px solid #111111;
  color: #111111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}
.dk-card.red { color: #d81e1e; }
.dk-card.trump { box-shadow: 0 0 0 3px var(--gold) inset; }
.dk-card.disabled { opacity: 0.35; cursor: not-allowed; }
.dk-card .suit-sym { font-size: 22px; margin-top: 2px; }

.dk-panel {
  background: var(--bg-panel);
  border: 3px solid var(--gold);
  margin: 10px auto;
  padding: 18px;
  max-width: 460px;
  text-align: center;
}
.dk-panel button {
  background: var(--gold);
  color: var(--on-accent);
  border: 2px solid var(--line);
  padding: 10px 18px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  margin: 6px 4px 0;
}

.dk-myhand-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 14px;
  flex-wrap: wrap;
  gap: 6px;
}
.dk-myhand { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 900px; }

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

/* Chat */
.chat-panel { position: fixed; bottom: 0; right: 20px; width: 280px; z-index: 60; }
.chat-toggle { background: var(--bg-panel); border: 2px solid var(--line); border-bottom: none; color: var(--text); padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 700; }
.chat-body { background: var(--bg-panel); border: 2px solid var(--line); display: flex; flex-direction: column; height: 260px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px; font-size: 13px; }
.chat-messages .msg { margin-bottom: 6px; line-height: 1.4; }
.chat-messages .msg .who { color: var(--gold); font-weight: 700; margin-right: 4px; }
.chat-input-row { display: flex; border-top: 2px solid var(--line); }
.chat-input-row input { flex: 1; padding: 10px; border: none; background: var(--bg-panel-raised); color: var(--text); font-size: 13px; }
.chat-input-row button { background: var(--gold); color: var(--on-accent); border: none; padding: 0 14px; font-weight: 800; cursor: pointer; font-size: 13px; }
.chat-quick-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-top: 2px solid var(--line); }
.quick-btn { background: var(--bg-panel-raised); border: 1px solid var(--line); color: var(--text); padding: 4px 9px; font-size: 11px; cursor: pointer; }
.quick-btn:hover { background: var(--gold); color: var(--on-accent); }

@media (max-width: 640px) {
  .dk-card { width: 48px; height: 72px; font-size: 14px; }
  .dk-myhand-wrap { padding: 10px 6px 12px; }
  .chat-panel { right: 8px; width: calc(100vw - 16px); max-width: 300px; }
  .chat-body { height: 190px; }
}
