html.wordle-locked, html.wordle-locked body { overflow: hidden; }

.wordle-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(10, 10, 10, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.5s ease;
  touch-action: manipulation; /* disables double-tap zoom */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.wordle-overlay.wordle-hide { opacity: 0; pointer-events: none; }

.wordle-panel {
  width: 100%;
  max-width: 400px;
  margin: auto;
  text-align: center;
}
.wordle-title { font-size: 1.4rem; margin-bottom: 4px; }
.wordle-sub { font-size: 0.9rem; color: var(--secondary-text-color); margin-bottom: 14px; }

.wordle-board { display: grid; gap: 6px; margin: 0 auto 10px; width: min(300px, 80vw); }
.wordle-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wordle-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  font-size: 1.6rem; font-weight: 700; text-transform: uppercase; line-height: 1;
}
.wordle-cell.wordle-filled { border-color: #666; }
.wordle-correct { background: #2f8f4e !important; border-color: #2f8f4e !important; color: #fff; }
.wordle-present { background: #b08d1f !important; border-color: #b08d1f !important; color: #fff; }
.wordle-absent  { background: #3a3a3c !important; border-color: #3a3a3c !important; color: #fff; }

.wordle-message { min-height: 1.6em; margin-bottom: 8px; font-size: 0.95rem; }

.wordle-keyboard { display: grid; gap: 6px; }
.wordle-key-row { display: flex; justify-content: center; gap: 5px; }
.wordle-key {
  flex: 1; max-width: 38px; height: 48px;
  border: 0; border-radius: 4px;
  background: #818384; color: #fff;
  font: inherit; font-size: 0.9rem; font-weight: 600; text-transform: uppercase;
  cursor: pointer; padding: 0;
  touch-action: manipulation;
}
.wordle-key-wide { flex: 1.6; max-width: 62px; font-size: 0.75rem; }
.wordle-key.wordle-correct, .wordle-key.wordle-present, .wordle-key.wordle-absent { border: 0; }
.wordle-key.wordle-absent { background: #3a3a3c !important; opacity: 0.7; }

.wordle-retry {
  margin-top: 14px; padding: 10px 22px; border: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}

.wordle-shake { animation: wordle-shake 0.4s; }
@keyframes wordle-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
