* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
#app {
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
h1 {
  font-size: 24px;
  color: #f0c040;
  letter-spacing: 2px;
}
#daily-date {
  font-size: 13px;
  color: #8888aa;
  text-align: center;
  margin-top: -8px;
  margin-bottom: 4px;
}
.mode-toggle {
  padding: 3px 10px;
  font-size: 12px;
  background: #333355;
  color: #aaaacc;
  border: 1px solid #4a4a8a;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}
.mode-toggle:hover {
  background: #444477;
}
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 0;
  color: #8888aa;
  font-size: 14px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #2a2a4a;
  border-top-color: #f0c040;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
#how-to-play {
  width: 100%;
  max-width: 400px;
  background: #222244;
  border-radius: 8px;
  padding: 8px 12px;
}
#how-to-play summary {
  cursor: pointer;
  font-size: 14px;
  color: #aaaacc;
  font-weight: 600;
}
.instructions {
  font-size: 13px;
  color: #ccccdd;
  line-height: 1.6;
  padding-top: 6px;
}
.instructions strong { color: #f0c040; }
.instructions em { color: #88cc88; font-style: normal; }
#live-preview {
  height: 20px;
  font-size: 13px;
  color: #8888aa;
  text-align: center;
}
#live-preview.valid { color: #88cc88; }
#live-preview.invalid { color: #cc8844; }
#live-preview.unavailable { color: #cc4444; }
#ring-container {
  width: 100%;
  max-width: 400px;
}
.ring-svg {
  display: block;
  width: 100%;
  height: auto;
}
.ring-tile {
  fill: #2a2a4a;
  stroke: #4a4a8a;
  stroke-width: 2;
  pointer-events: none;
}
.ring-tile.tapped {
  fill: #1a1a2a;
  stroke: #2a2a4a;
  opacity: 0.3;
}
.ring-letter.tapped {
  fill: #444466;
  opacity: 0.4;
}
.ring-letter {
  fill: #ffffff;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  pointer-events: none;
  user-select: none;
}
.ring-value {
  fill: #cccccc;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  pointer-events: none;
  user-select: none;
}
#input-area {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 300px;
}
#word-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 18px;
  font-family: 'Courier New', monospace;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: #2a2a4a;
  color: #ffffff;
  border: 2px solid #4a4a8a;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}
#word-input:focus {
  border-color: #f0c040;
}
#word-input:disabled {
  opacity: 0.5;
}
#word-input.error-shake {
  animation: shake 0.3s ease-in-out;
  border-color: #e04040;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.backspace-btn {
  padding: 10px 14px;
  font-size: 18px;
  line-height: 1;
  background: #3a3a5a;
  color: #cccccc;
  border: 2px solid #4a4a8a;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.backspace-btn:hover {
  background: #5a5a7a;
}
.backspace-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
#submit-btn {
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  background: #f0c040;
  color: #1a1a2e;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
#submit-btn:hover {
  background: #f5d060;
}
.score-panel {
  text-align: center;
  line-height: 1.6;
}
.score-total {
  font-size: 22px;
  color: #f0c040;
}
.score-goal {
  font-size: 13px;
  color: #88cc88;
  margin-bottom: 2px;
}
.score-grade {
  font-size: 18px;
  color: #f0c040;
  margin: 4px 0;
}
.score-round {
  font-size: 14px;
  color: #8888aa;
}
.score-words {
  font-size: 14px;
  color: #aaaacc;
  margin-top: 4px;
}
.word-entry {
  display: inline-block;
}
.word-entry em {
  color: #f0c040;
  font-style: normal;
  font-size: 12px;
}
.game-over {
  margin-top: 8px;
  font-size: 16px;
  color: #e04040;
  font-weight: 700;
}
.share-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #4a8a4a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.share-btn:hover {
  background: #5aaa5a;
}
#share-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.restart-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #8a5a4a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.restart-btn:hover {
  background: #aa7a6a;
}
#hint-container {
}
.hint-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #5a5a8a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.hint-btn:hover {
  background: #7a7aaa;
}
details {
  width: 100%;
  max-width: 400px;
}
summary {
  cursor: pointer;
  font-size: 13px;
  color: #666;
  padding: 4px 0;
}
.debug-panel {
  background: #111122;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: #88cc88;
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
