.hidden { display: none !important; }

/* ===== Sākuma ekrāns ===== */

.f7-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0 1.5rem;
  gap: 0.5rem;
}

.f7-hero-card {
  width: 72px;
  height: 100px;
  background: linear-gradient(145deg, #1a3a2a, #0d2018);
  border: 3px solid #3a8a5a;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 900;
  color: #5dde8a;
  box-shadow: 0 8px 32px rgba(93,222,138,0.25), inset 0 1px 0 rgba(255,255,255,0.1);
}

.f7-h1 {
  font-size: 2.4rem;
  font-weight: 900;
  color: #2d1e60;
  margin: 0;
  letter-spacing: 0.04em;
}

.f7-desc {
  font-size: 13px;
  color: #7070a0;
  text-align: center;
  margin: 0;
  line-height: 1.6;
}

.f7-lbl {
  font-size: 11px;
  color: #a090c8;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 0.5rem;
}

.f7-mrow {
  display: flex;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.f7-mbt {
  flex: 1;
  padding: 10px;
  border: 1.5px solid rgba(109,74,191,0.2);
  border-radius: 10px;
  background: rgba(109,74,191,0.04);
  font-size: 14px;
  font-weight: 600;
  color: #7070a0;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
}
.f7-mbt.sel {
  border-color: #6d4abf;
  background: rgba(109,74,191,0.12);
  color: #6d4abf;
}

.f7-rules {
  margin-top: 1.25rem;
}
.f7-rules summary {
  font-size: 12px;
  color: #9080b8;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
  padding: 4px 0;
  user-select: none;
  list-style: none;
}
.f7-rules summary::-webkit-details-marker { display: none; }
.f7-rules summary:hover { color: #6d4abf; }
.f7-rules-body {
  padding: 0.75rem 0.25rem;
  font-size: 13px;
  color: #5a4a80;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.f7-rules-body p { margin: 0; }

/* ===== Score josla ===== */

.f7-scorebar {
  display: flex;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.f7-sci {
  flex: 1;
  background: rgba(109,74,191,0.05);
  border: 1px solid rgba(109,74,191,0.18);
  border-radius: 10px;
  padding: 7px 10px 4px;
  overflow: hidden;
}

.f7-sci-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.f7-sci-top span { font-size: 11px; color: #8878b0; }
.f7-sci-top strong { font-size: 17px; font-weight: 700; color: #2d1e60; }

.f7-sci-bar {
  height: 3px;
  background: rgba(109,74,191,0.12);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}
.f7-sci-fill {
  height: 100%;
  background: #6d4abf;
  border-radius: 2px;
  transition: width 0.5s ease;
}
.f7-sci.winning { border-color: rgba(74,222,128,0.5); }
.f7-sci.winning .f7-sci-fill { background: #22c55e; }

/* ===== Info row ===== */

.f7-inforow {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #a090c8;
  margin-bottom: 0.75rem;
}
.f7-inforow b { color: #2d1e60; }

/* ===== Spēlētāji ===== */

#f7-players {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.f7-player {
  border: 1.5px solid rgba(109,74,191,0.18);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(109,74,191,0.03);
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.f7-player.human {
  border-color: rgba(109,74,191,0.3);
  background: rgba(109,74,191,0.05);
}
.f7-player.cur {
  border-color: #6d4abf;
  box-shadow: 0 0 0 3px rgba(109,74,191,0.13);
}
.f7-player.busted {
  opacity: 0.45;
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.03);
}
.f7-player.stayed {
  opacity: 0.65;
  border-color: rgba(74,222,128,0.35);
}

.f7-ph {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.f7-pname { font-size: 13px; font-weight: 600; color: #2d1e60; }
.f7-pst   { font-size: 12px; color: #8878b0; }

/* Modifier/action area */
.f7-mods {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

/* Number cards row */
.f7-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.f7-empty { font-size: 12px; color: #c0b0e0; }

/* ===== Kartes ===== */

.f7c-num {
  width: 40px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(155deg, #1c3d2c, #0e2018);
  border: 2px solid #3a7a4a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #7be89a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.f7c-num.zero {
  color: #8888aa;
  border-color: #4a4a6a;
  background: linear-gradient(155deg, #1a1a2e, #0d0d1e);
}

.f7c-mod {
  width: 40px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(155deg, #5a3510, #3a2008);
  border: 2px solid #c87a30;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #f0a060;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.f7c-act {
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 9px;
  flex-shrink: 0;
  white-space: nowrap;
}
.f7c-act.freeze {
  background: linear-gradient(135deg, #1a4a5a, #0d2a38);
  border: 1.5px solid #4ab8d8;
  color: #7de0f8;
}
.f7c-act.flip_three {
  background: linear-gradient(135deg, #3a4a10, #1c2a08);
  border: 1.5px solid #8ab830;
  color: #c0e060;
}
.f7c-act.second_chance {
  background: linear-gradient(135deg, #5a1a3a, #3a0d28);
  border: 1.5px solid #e070a0;
  color: #f0a0c0;
}

/* ===== Hit / Stay pogas ===== */

.f7-hs {
  display: flex;
  gap: 10px;
  margin-bottom: 0.75rem;
}
.f7-hit, .f7-sty {
  flex: 1;
  padding: 15px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: all 0.16s;
}
.f7-hit {
  background: #6d4abf;
  color: #fff;
}
.f7-hit:hover { background: #7d5acf; transform: translateY(-1px); }
.f7-sty {
  background: rgba(74,222,128,0.12);
  color: #166534;
  border: 2px solid rgba(74,222,128,0.4);
}
.f7-sty:hover { background: rgba(74,222,128,0.22); transform: translateY(-1px); }

/* ===== Mērķa izvēle ===== */

.f7-tpick {
  background: rgba(109,74,191,0.07);
  border: 1.5px solid rgba(109,74,191,0.28);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 0.75rem;
}
.f7-tpick-lbl {
  font-size: 13px;
  color: #6d4abf;
  font-weight: 600;
  margin: 0 0 10px;
}
.f7-trow { display: flex; gap: 8px; flex-wrap: wrap; }
.f7-tbtn {
  padding: 10px 16px;
  border: 1.5px solid rgba(109,74,191,0.28);
  border-radius: 10px;
  background: rgba(109,74,191,0.07);
  color: #2d1e60;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.f7-tbtn:hover {
  border-color: #6d4abf;
  background: rgba(109,74,191,0.16);
}

/* ===== Log ===== */

.f7-log {
  border: 1px solid rgba(109,74,191,0.12);
  border-radius: 10px;
  padding: 10px;
  max-height: 160px;
  overflow-y: auto;
  font-size: 11.5px;
  color: #7070a0;
  font-family: 'Courier New', monospace;
}
.f7-log-row {
  padding: 2px 0;
  border-bottom: 1px solid rgba(109,74,191,0.06);
  line-height: 1.5;
}
.f7-log-row:last-child { border-bottom: none; }

/* ===== Beigu ekrāns ===== */

.f7-endbox {
  background: rgba(109,74,191,0.05);
  border: 1px solid rgba(109,74,191,0.2);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: 1rem;
}
.f7-winner {
  font-size: 28px;
  font-weight: 800;
  color: #2d1e60;
  margin-bottom: 1.5rem;
}
.f7-end-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(109,74,191,0.1);
  font-size: 15px;
}
.f7-end-row:last-child { border-bottom: none; }
.f7-end-row span { color: #7070a0; }
.f7-end-row strong { color: #2d1e60; font-weight: 700; }
.f7-end-row.top strong { color: #6d4abf; font-size: 17px; }

/* ===== Auth / Lobby ===== */

.auth-tabs {
  display: flex;
  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;
  font-family: inherit; transition: all 0.2s;
}
.auth-tab.active { color: #2d1e60; border-bottom-color: #6d4abf; font-weight: 500; }
.auth-tab:hover { color: #2d1e60; }

.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;
}
.auth-form input:focus { outline: none; border-color: #6d4abf; }
.auth-msg { font-size: 13px; min-height: 18px; margin: 0; }

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

.lobby-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 0.75rem; }
.lobby-options .lobby-card:last-child { grid-column: 1 / -1; }
.lobby-card { padding: 1.25rem; }
.lobby-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 0.3rem; color: #2d1e60; }
.lobby-card .card-sub { margin-bottom: 0.75rem; }

.players-list { list-style: none; padding: 0; margin: 0 0 0.75rem; 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: 8px 12px;
  display: flex; align-items: center; gap: 8px;
}
.player-name { font-weight: 500; font-size: 14px; flex: 1; }
.player-badge { font-size: 11px; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.player-badge.host { background: #fff3d0; color: #8a6d1a; }
.player-badge.you  { background: #e8f0ff; color: #2950a0; }

.lb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb-table th { color: #8878b0; font-weight: 500; padding: 4px 8px; text-align: left; border-bottom: 1px solid rgba(109,74,191,0.15); }
.lb-table td { padding: 5px 8px; border-bottom: 1px solid rgba(109,74,191,0.08); }
.lb-table tr.is-you td { color: #6d4abf; font-weight: 600; }

/* ===== Vētra mode ===== */

.f7c-num.bust {
  border-color: #ef4444;
  background: linear-gradient(155deg, #3d1010, #200808);
  color: #f87171;
  box-shadow: 0 2px 12px rgba(239,68,68,0.4), 0 0 18px rgba(239,68,68,0.12);
}

.f7c-storm {
  width: 40px;
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(155deg, #0a1428, #05080f);
  border: 2px solid #4ab8d8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 12px rgba(74,184,216,0.35), 0 0 18px rgba(74,184,216,0.12);
  flex-shrink: 0;
}

.f7-mode-desc {
  font-size: 12px;
  color: #3a8aa8;
  background: rgba(74,184,216,0.06);
  border: 1px solid rgba(74,184,216,0.22);
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.f7-mode-badge {
  color: #4ab8d8;
  font-weight: 700;
  font-size: 12px;
}
