:root {
  --bg:#f6f7fb;
  --panel:#ffffff;
  --green:#67c23a;
  --yellow:#ffd166;
  --text:#222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, Arial;
  background: linear-gradient(180deg, var(--bg), #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

header { text-align: center; }

main {
  display: flex;
  gap: 20px;
  max-width: 1000px;
  width: 100%;
}

#game {
  flex: 1;
  background: var(--panel);
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.info {
  width: 320px;
  background: var(--panel);
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.cell {
  height: 56px;
  border-radius: 8px;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  background: white;
}

.cell.filled { border-color: #bbb; }
.cell.correct { background: var(--green); color: white; border-color: var(--green); }
.cell.present { background: var(--yellow); color: #111; }
.cell.absent { background: #ddd; color: #444; }

.keyboard {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.key {
  padding: 10px;
  border-radius: 6px;
  background: #eee;
  border: 0;
  font-weight: 600;
  cursor: pointer;
}

.key.wide {
  grid-column: span 2;
}

.controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.message {
  min-height: 1.4em;
  margin-top: 8px;
  font-weight: 600;
}

@media (max-width: 800px) {
  main { flex-direction: column; }
  .info { width: 100%; }
  .cell { height: 48px; font-size: 20px; }
}
