* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #0b0b0f;
  color: #f2f2f6;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

.wrap { width: min(760px, 92vw); padding: 24px 0; }

.top h1 { margin: 0; letter-spacing: 0.5px; }
.sub { margin: 8px 0 18px; color: #b8b8c7; }

.card {
  background: #141420;
  border: 1px solid #25253a;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.quote {
  font-size: 1.08rem;
  line-height: 1.55;
  color: #eaeaf3;
  margin-bottom: 12px;
}

.grid {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.cell {
  min-height: 46px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid #2a2a40;
  background: #10101a;
  display: grid;
  place-items: center;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell.green { background: #1f6f3e; border-color: #1f6f3e; }
.cell.yellow { background: #8a6a14; border-color: #8a6a14; }
.cell.gray { background: #2a2a2f; border-color: #2a2a2f; }

.controls {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid #2a2a40;
  background: #0f0f18;
  color: #f2f2f6;
  padding: 12px 12px;
  font-size: 1rem;
  outline: none;
}

button {
  border: 0;
  border-radius: 12px;
  background: #2f6fed;
  color: white;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
}

button:active { transform: translateY(1px); }

.meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: #b8b8c7;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.link {
  background: transparent;
  color: #b8b8c7;
  border: 1px solid #2a2a40;
}

.message {
  margin-top: 12px;
  min-height: 24px;
  color: #d7d7e5;
}
.modal.hidden { display: none; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 999;
}

.modalCard {
  width: min(520px, 96vw);
  background: #141420;
  border: 1px solid #25253a;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}

.modalTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modalTop h2 { margin: 0; }

.iconBtn {
  background: transparent;
  border: 1px solid #2a2a40;
  color: #b8b8c7;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.modalAnswer {
  margin: 10px 0 8px;
  color: #d7d7e5;
}

.modalGrid {
  margin: 8px 0 12px;
  background: #0f0f18;
  border: 1px solid #2a2a40;
  border-radius: 12px;
  padding: 10px;
  overflow-x: auto;
  color: #f2f2f6;
}

.modalBtns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.shareStatus {
  margin-top: 10px;
  color: #b8b8c7;
  min-height: 18px;
}
.bankWrap {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #25253a;
}

.bankTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.bankLabel {
  color: #b8b8c7;
  font-weight: 700;
}

.small {
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 700;
}

.wordBank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bankWord {
  border: 1px solid #2a2a40;
  background: #0f0f18;
  color: #f2f2f6;
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

/* Currently selected bank word (active guess) */
.bankWord.used {
  opacity: 1;
  color: #ffffff;
  border-color: #ffffff;
  background: #0f0f18;
}

.bankWord:hover {
  transform: translateY(-1px);
}

.bankWord.green { background: #1f6f3e; border-color: #1f6f3e; }
.bankWord.yellow { background: #8a6a14; border-color: #8a6a14; }
.bankWord.gray { background: #2a2a2f; border-color: #2a2a2f; }

.metaBtns { display: flex; gap: 10px; }

.foot { margin-top: 14px; color: #777790; }
code { color: #b8b8c7; }
