html,body { height:100%; margin:0; }
body {
  font-family: sans-serif;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 110px;
  box-sizing: border-box;
  background: #fafafa;
}
.topbar {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}
.topbar-icon {
  height: 40px;
  width: 145px;
  cursor: pointer;
}
.game-wrapper {
  transform-origin: top center;
  padding: 14px
}
.game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.theme {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 10px;
}
.theme-top {
  background: lightblue;
  height: 25%;
  padding: 10px;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  color: black;
  border-radius: 10px 10px 0 0;
}
.theme-bottom {
  background: white;
  height: 75%;
  padding: 10px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  color: black;
  border: 1px solid #d3d3d3;
  border-top: none;
  border-radius: 0 0 10px 10px;
}
.found-count { margin: 4px 0; }
.current-word { font-size: 24px; text-align: center; min-height:28px; }
.current-word.error { font-size: 20px; color: rgb(3, 3, 3); }
.grid, .letter {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.grid {
  position: relative;
  display: inline-block;
  padding: 12px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  touch-action: none;
}
.row { display: flex; }
.letter {
  width: 40px; height: 40px; margin: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: black;
  position: relative; user-select: none; z-index: 1;
}
.letter-event-area {
  width: 26px; height: 26px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: none;
}
.letter.hint-highlight::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
  border: 2px dashed lightblue;
  background: transparent;
}
.letter.selected::after,
.letter.found-blue::after,
.letter.found-yellow::after {
  content: "";
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}
.letter.selected::after { background: #DBD8C7; }
.letter.found-blue::after { background: #B8DEEC; }
.letter.found-yellow::after { background: #F1D046; }

.hint-button {
  background: white; color: black; border: 1px solid #333;
  border-radius: 20px; padding: 10px 20px; cursor: pointer; font-size: 16px;
}
.inverted { background: black; color: white; }
.controls {
  display: flex;
  align-items: center;
  gap: 40px;
  justify-content: center;
  margin-top: 25px;
}
svg.edges {
  position: absolute;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.current-word.success-theme { color: #B8DEEC; }
.current-word.success-spangram { color: #F1D046; }
@media (max-width: 768px) {
  body { padding: 60px 20px 20px; }
}
