/* ===== Duraka lobby stili ===== */

.hidden {
  display: none !important;
}

/* ===== Auth tabi ===== */
.auth-section, .lobby-section, .room-section, .game-section {
  margin-top: 1rem;
}

.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(109, 74, 191, 0.2);
  margin-bottom: 1.5rem;
}

.auth-tab {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 15px;
  cursor: pointer;
  color: #8878b0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s ease;
}

.auth-tab:hover { color: #2d1e60; }
.auth-tab.active {
  color: #2d1e60;
  border-bottom-color: #6d4abf;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}

.auth-form input {
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid rgba(109, 74, 191, 0.25);
  border-radius: 8px;
  font-family: inherit;
  background: #fff;
  color: #1e1a2e;
  transition: border-color 0.2s ease;
}

.auth-form input:focus {
  outline: none;
  border-color: #6d4abf;
}

/* ===== Pogas ===== */
.btn-primary {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  background: #6d4abf;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary:hover { background: #5a3aaa; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: #b0a0d8; cursor: not-allowed; transform: none; }

.btn-secondary {
  padding: 8px 14px;
  font-size: 13px;
  background: transparent;
  color: #7070a0;
  border: 1px solid rgba(109, 74, 191, 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-secondary:hover { border-color: #6d4abf; color: #2d1e60; }

.auth-msg {
  font-size: 13px;
  min-height: 18px;
  margin: 0;
}

/* ===== Lobby izvēles ekrāns ===== */
.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ede9ff;
  color: #2d1e60;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  font-size: 15px;
  border: 1px solid rgba(109, 74, 191, 0.2);
}

.lobby-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 1rem;
}

.lobby-options .lobby-card:last-child {
  grid-column: 1 / -1;
}

.lobby-card { padding: 1.5rem; }
.lobby-card h3 { font-size: 17px; font-weight: 500; margin-bottom: 0.5rem; }
.lobby-card p { margin-bottom: 1rem; }

.lobby-card input {
  width: 100%;
  padding: 10px 12px;
  font-size: 18px;
  border: 1px solid rgba(109, 74, 191, 0.25);
  border-radius: 6px;
  margin-bottom: 12px;
  font-family: monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
  background: #fff;
  color: #1e1a2e;
}

.lobby-card .btn-primary { width: 100%; }

/* ===== Kavas izvēle ===== */
.settings-row {
  margin-bottom: 14px;
}

.settings-row label {
  display: block;
  font-size: 13px;
  color: #8878b0;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.deck-choice {
  display: flex;
  gap: 6px;
}

.deck-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
  color: #5a4a80;
  border: 1px solid rgba(109, 74, 191, 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.deck-btn:hover { border-color: #6d4abf; }
.deck-btn.active {
  background: #6d4abf;
  color: #fff;
  border-color: #6d4abf;
}

/* ===== Toggle slēdzis ===== */
.kg-mode-toggle { user-select: none; }
.kg-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.kg-toggle-row input[type="checkbox"] { display: none; }
.kg-toggle-track {
  flex-shrink: 0;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #c0b0d8;
  position: relative;
  transition: background 0.2s;
  margin-top: 1px;
}
.kg-toggle-row input:checked + .kg-toggle-track { background: #6d4abf; }
.kg-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.kg-toggle-row input:checked + .kg-toggle-track .kg-toggle-knob { transform: translateX(16px); }
.kg-toggle-label { display: flex; flex-direction: column; gap: 2px; }
.kg-toggle-name { font-size: 13px; font-weight: 600; color: #2d1e60; }
.kg-toggle-desc { font-size: 11px; color: #9080b8; line-height: 1.4; }

.settings-hint {
  font-size: 11px;
  color: #9080b8;
  margin: -8px 0 8px;
  line-height: 1.4;
}

/* ===== Lobija telpa ===== */
.room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #e6f4ee 0%, #d0e8de 100%);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid #b0d8c5;
}

.room-code {
  font-size: 36px;
  font-weight: 600;
  font-family: monospace;
  letter-spacing: 0.15em;
  margin: 0;
  color: #1a1a1a;
}

.room-info {
  background: rgba(109, 74, 191, 0.06);
  border-left: 3px solid #6d4abf;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.hint-text {
  font-size: 14px;
  color: #5a4a80;
  margin: 0;
  line-height: 1.5;
}

/* ===== Leaderboard tabula ===== */
.leaderboard-container {
  background: #fff;
  border: 1px solid rgba(109, 74, 191, 0.18);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.leaderboard-container h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: #2d1e60;
}

.leaderboard-sub {
  font-size: 12px;
  color: #8878b0;
  font-weight: 400;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.leaderboard-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 500;
  color: #8878b0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(109, 74, 191, 0.15);
}

.leaderboard-table th:nth-child(3),
.leaderboard-table th:nth-child(4) {
  text-align: center;
}

.leaderboard-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(109, 74, 191, 0.08);
  color: #1e1a2e;
}

.leaderboard-table td:nth-child(3),
.leaderboard-table td:nth-child(4) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table .rank-1 {
  background: #fff8e6;
  font-weight: 600;
}

.leaderboard-table .rank-1 td:first-child::before {
  content: '🥇 ';
}

.leaderboard-table .rank-2 td:first-child::before {
  content: '🥈 ';
}

.leaderboard-table .rank-3 td:first-child::before {
  content: '🥉 ';
}

.leaderboard-table .is-you {
  background: #eee8ff;
}

/* ===== Spēlētāju saraksts ===== */
.players-list h3 {
  font-size: 14px;
  font-weight: 500;
  color: #8878b0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.player-count {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: #a090c8;
}

.players-list ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.players-list li {
  background: #fff;
  border: 1px solid rgba(109, 74, 191, 0.18);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1e1a2e;
}

.player-name { font-weight: 500; font-size: 15px; flex: 1; }

.player-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.player-badge.host { background: #fff3d0; color: #8a6d1a; }
.player-badge.you { background: #e8f0ff; color: #2950a0; }

.room-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.room-actions .btn-primary {
  padding: 14px 28px;
  font-size: 16px;
}
