:root {
  --bg: #ffffff;
  --text: #111;
  --muted: #555;
  --cell: #ddd;
  --gray: #e9e9e9;
  --yellow: #f3c64b;
  --green: #4caf50;
  --key: #efefef;
  --dark-gray: #787c7e; 
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, Arial, sans-serif;
}

.wrap { max-width: 780px; margin: 24px auto; padding: 0 16px 40px; }
h1 { margin: 0 0 8px; }
.muted { color: var(--muted); margin-bottom: 16px; }

.board { display: grid; grid-template-rows: repeat(6, 1fr); gap: 8px; margin: 14px 0 16px; }
.row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.cell {
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid var(--cell);
  border-radius: 10px;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  user-select: none;
}

.gray { background: var(--gray); border-color: var(--gray); }
.yellow { background: var(--yellow); border-color: var(--yellow); }
.green { background: var(--green); border-color: var(--green); }

.controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input {
  font-size: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid var(--cell);
  width: 160px;
  text-transform: lowercase;
}
button, .import-label {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  background: #eee;
  color: #111;
}
button.primary { background: #111; color: #fff; }
button.danger { background: #ffdddd; }
.msg { margin-top: 10px; min-height: 24px; }

.kbd-wrap { margin-top: 14px; }
.keyboard { display: grid; gap: 8px; }
.krow { display: grid; grid-auto-flow: column; gap: 6px; justify-content: center; }
.key {
  min-width: 36px;
  padding: 10px 10px;
  border-radius: 10px;
  background: var(--key);
  border: 0;
  font-weight: 700;
  text-transform: uppercase;
}
.key.wide { min-width: 70px; }

.key.gray { background: var(--gray); }
.key.yellow { background: var(--yellow); }
.key.green { background: var(--green); }
.key.darkgray { background: var(--dark-gray); color: #fff;}

.stats {
  margin-top: 18px;
  padding: 12px;
  border: 2px solid #eee;
  border-radius: 12px;
}
.stats-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.stats-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.import-label { display: inline-flex; align-items: center; gap: 8px; }
