/* Login screen */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-primary);
}

.login-box {
  width: 360px;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.login-box .brand-mark {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  font-weight: 900;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #00955e);
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.4);
  margin-bottom: 16px;
}

.login-box h2 { margin: 0 0 6px; font-size: 20px; }
.login-box p { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }

.login-box input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  text-align: center;
}

.login-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}

.login-box button {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #00955e);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
}

.login-error { color: var(--red); font-size: 12px; min-height: 18px; margin: 4px 0; }

/* Player info sidebar */
.player-info {
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.player-info strong { font-size: 14px; }
.player-info small { color: var(--text-muted); font-size: 11px; }

.player-chat {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 420px;
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.player-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.player-chat-head strong {
  font-size: 13px;
  color: var(--text-primary);
}

.player-chat-head span {
  color: var(--text-muted);
  font-size: 10px;
}

.player-chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-empty {
  padding: 16px 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.chat-message {
  margin-bottom: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}

.chat-message.own {
  border-color: rgba(0, 168, 107, 0.45);
  background: rgba(0, 168, 107, 0.12);
}

.chat-message.pinned {
  border-color: rgba(245, 158, 11, 0.70);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.12) inset;
}

.chat-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 10px;
}

.chat-name {
  max-width: 120px;
  overflow: hidden;
  color: var(--text-primary);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chat-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.chat-text {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}

.player-chat-form {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 6px;
  margin-top: 10px;
}

.player-chat-form input {
  min-width: 0;
  height: 36px;
  padding: 8px 10px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}

.player-chat-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
  outline: none;
}

.player-chat-form button {
  height: 36px;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.player-chat-form button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.logout-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
}

.logout-btn:hover { color: #fff; background: var(--red); border-color: var(--red); }

/* Compact history table */
#wagerRows td { font-size: 11px; padding: 6px 8px; }
#wagerRows th { font-size: 9px; padding: 6px 8px; }

/* Locked / dimmed odds card */
.wager-odds-card.locked {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.5);
  position: relative;
}
.wager-odds-card.locked::after {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  z-index: 1;
}
.wager-odds-half.locked-section h4 {
  color: #666;
}
.wager-odds-half.locked-section h4::after {
  content: " (Đã khóa)";
  font-size: 11px;
  color: #f59e0b;
}

/* Bet section spacing */
.wager-bet-section button[type="submit"] {
  margin-top: 12px;
}

/* Bet slip item */
.bet-slip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a2332;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.bsi-desc { flex: 1; color: #e2e8f0; }
.bsi-qty { display: flex; align-items: center; gap: 4px; }
.bsi-total { text-align: right; font-weight: 600; color: #22c55e; min-width: 80px; }
.qty-btn {
  width: 24px; height: 24px; border: none; border-radius: 4px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: #334155; color: #e2e8f0; display: inline-flex;
  align-items: center; justify-content: center;
}
.qty-btn:hover { background: #475569; }
.qty-val { min-width: 24px; text-align: center; font-weight: 700; color: #f59e0b; }

/* Card selected badge */
.woc-qty {
  position: absolute; top: -6px; right: -6px;
  background: #f59e0b; color: #000;
  font-size: 10px; font-weight: 700;
  padding: 1px 5px; border-radius: 6px;
  display: none;
}
.wager-odds-card.selected[data-qty] .woc-qty {
  display: block;
  content: attr(data-qty);
}
