/* Поле чудес — ретро-стиль DOS-версии 90-х. VGA-палитра, пиксельный шрифт. */
:root {
  --cyan: #00a8a8;
  --cyan-dark: #007878;
  --ink: #101010;
  --gold: #ffe000;
  --cell: #c4c4c4;
  --cell-dark: #4a4a4a;
  --green: #089808;
  --bubble: #fbfb3a;
  --brick: #0000a8;
  --brick-line: #3a3aff;
  --text: #f4f4f4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cyan);
  color: var(--text);
  font-family: 'Handjet', 'Courier New', monospace;
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
}

#app { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; }
.screen { width: 100%; max-width: 920px; padding: 16px; }
.hidden { display: none !important; }

/* --- Экран старта --- */
#start { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 6vh; }
.logo {
  font-size: 64px; font-weight: 700; margin: 0; color: var(--gold);
  letter-spacing: 2px; text-shadow: 3px 3px 0 #a05a00, 0 0 2px #000;
}
.subtitle { font-size: 24px; margin: 0 0 6px; color: #d8fdfd; }
.players-setup { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 560px; }
.pslot {
  display: grid; grid-template-columns: 26px 1fr 1.1fr 0.9fr; gap: 8px; align-items: center;
  background: var(--cyan-dark); border: 3px solid #000; padding: 8px 10px;
}
.pslot .num { font-size: 26px; font-weight: 700; color: var(--gold); text-align: center; }
.start-row { display: flex; gap: 16px; align-items: center; margin-top: 6px; }
.hint { font-size: 20px; color: #ffd0d0; min-height: 22px; margin: 0; }
.records { margin-top: 8px; text-align: center; }
.records h3 { font-size: 22px; color: var(--gold); margin: 6px 0; }
.records-list { display: inline-block; text-align: left; font-size: 20px; margin: 0; }

input, select {
  font-family: inherit; font-size: 22px; background: #e8e8c0; color: #101010;
  border: 3px solid #000; padding: 4px 8px; image-rendering: pixelated;
}
label { font-size: 22px; display: inline-flex; align-items: center; gap: 8px; }

/* --- Кнопки --- */
.btn {
  font-family: inherit; font-size: 24px; font-weight: 700; cursor: pointer;
  background: #c4c4c4; color: #101010; border: 3px solid #000;
  box-shadow: inset -3px -3px 0 #7a7a7a, inset 3px 3px 0 #efefef; padding: 8px 20px;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { box-shadow: inset 3px 3px 0 #7a7a7a, inset -3px -3px 0 #efefef; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.5); }
.btn--gold { background: var(--gold); box-shadow: inset -3px -3px 0 #a07a00, inset 3px 3px 0 #fff7c0; }

/* --- Студия --- */
.studio {
  border: 14px solid var(--brick);
  border-image: repeating-linear-gradient(0deg, var(--brick) 0 12px, var(--brick-line) 12px 14px) 14;
  background: var(--cyan);
  padding: 14px; display: flex; flex-direction: column; gap: 12px; align-items: center;
}

/* --- Табло слова --- */
.board { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 50px; }
.cell {
  width: 40px; height: 48px; display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: #101010; background: var(--cell);
  box-shadow: inset -3px -3px 0 #6f6f6f, inset 3px 3px 0 #e8e8e8;
}
.cell--empty { background: var(--cell-dark); box-shadow: inset -3px -3px 0 #2a2a2a, inset 3px 3px 0 #5f5f5f; }
.cell--space { background: transparent; box-shadow: none; width: 18px; }
.cell--open { animation: pop 0.25s ease; }
@keyframes pop { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }

.round-label { font-size: 24px; color: var(--gold); text-align: center; }
.round-label .q { color: #eaffff; font-size: 22px; }

/* --- Середина: барабан + ведущий --- */
.middle { display: flex; gap: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }
.wheel { width: 300px; height: 300px; image-rendering: pixelated; }

/* --- Ведущий и реплика --- */
.host { position: relative; width: 150px; min-height: 150px; display: flex; flex-direction: column; align-items: center; }
.host .bubble {
  background: var(--bubble); border: 3px solid #000; color: #101010; font-size: 20px;
  padding: 8px 10px; min-height: 40px; width: 100%; line-height: 1.1;
  box-shadow: inset -3px -3px 0 #b0b000, inset 3px 3px 0 #ffffa0; margin-bottom: 8px;
}
.host .bubble.evt-correct, .host .bubble.evt-roundWin, .host .bubble.evt-gameWin, .host .bubble.evt-prize { color: #007000; }
.host .bubble.evt-wrong, .host .bubble.evt-bankrupt, .host .bubble.evt-wrongWord { color: #b00000; }
.host .figure { position: relative; width: 110px; height: 110px; }

/* --- Множитель --- */
.multiplier { font-size: 26px; color: var(--gold); font-weight: 700; }

/* --- Счёт игроков --- */
.scoreboard { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pcard {
  background: var(--cyan-dark); border: 3px solid #000; padding: 8px 10px; width: 180px;
  display: flex; gap: 10px; align-items: center;
}
.pcard.active { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold); }
.pcard .figure { width: 56px; height: 56px; position: relative; flex: 0 0 auto; }
.pcard .info { display: flex; flex-direction: column; }
.pcard .pname { font-size: 22px; font-weight: 700; }
.pcard .pname .tag { font-size: 16px; color: #bfe; }
.pcard .money {
  display: inline-block; background: var(--green); color: #042; font-weight: 700; font-size: 22px;
  padding: 0 8px; margin-top: 2px; box-shadow: inset -2px -2px 0 #045004, inset 2px 2px 0 #2ed42e;
}
.pcard .total { font-size: 16px; color: #cffcff; }

/* --- Управление --- */
.controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn--mute { align-self: flex-end; font-size: 16px; padding: 4px 12px; }
.countdown { font-size: 44px; font-weight: 700; color: var(--gold); text-shadow: 2px 2px 0 #a05a00; }

/* --- Клавиатура --- */
.keyboard { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 640px; padding: 6px; border: 3px solid transparent; }
.keyboard--active { border-color: var(--gold); animation: kbpulse 0.9s ease-in-out infinite alternate; }
@keyframes kbpulse { from { border-color: var(--gold); } to { border-color: #8a6a00; } }
.key {
  width: 34px; height: 40px; font-family: inherit; font-size: 22px; font-weight: 700;
  color: #101010; background: #c4c4c4; border: 2px solid #000; cursor: pointer;
  box-shadow: inset -2px -2px 0 #7a7a7a;
}
.key:hover:not(:disabled) { background: var(--gold); }
.key:disabled { cursor: default; }
.key--used { background: var(--cyan-dark); color: #0c9a9a; box-shadow: none; border-color: #0a7070; }

/* --- Оверлей --- */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 20, 40, 0.78);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10;
}
.banner {
  background: var(--cyan); border: 6px solid var(--gold); padding: 24px 28px; max-width: 560px;
  text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.banner h2 { font-size: 40px; margin: 0; color: var(--gold); text-shadow: 2px 2px 0 #a05a00; }
.banner p { font-size: 24px; margin: 0; }
.banner .answer { font-size: 30px; color: #eaffff; letter-spacing: 2px; }
.banner ol { font-size: 22px; text-align: left; }
.banner input { font-size: 26px; text-align: center; width: 100%; }

/* --- Адаптив --- */
@media (max-width: 620px) {
  .logo { font-size: 44px; }
  .cell { width: 30px; height: 38px; font-size: 26px; }
  .wheel { width: 240px; height: 240px; }
  .pslot { grid-template-columns: 22px 1fr; }
  .pcard { width: 150px; }
}
