* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #2a2a2a;
  color: #eee;
  min-height: 100vh;
  overflow: hidden;
  touch-action: none;
  position: fixed;
  width: 100%;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  padding: 20px;
  touch-action: none;
}

.grid-wrapper {
  position: relative;
  display: inline-block;
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  touch-action: none;
}

h1 {
  margin-bottom: 30px;
  color: #4ecca3;
  font-size: 32px;
  letter-spacing: 8px;
}

.info {
  margin-bottom: 20px;
  font-size: 32px;
  color: #eee;
  text-transform: uppercase;
}

.grid {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.row {
  display: flex;
  justify-content: center;
}

.cell {
  width: 60px;
  height: 60px;
  margin: 4px;
  padding: 8px;
  font-size: 24px;
  font-weight: normal;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #eee;
  cursor: pointer;
  text-transform: uppercase;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cell::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: transparent;
}

.cell span {
  pointer-events: auto;
  padding: 10px;
  display: block;
  position: relative;
  z-index: 1;
}

.cell.selected::before {
  background: #575352;
}

.cell.selected {
  color: #ccc;
}

.cell.found::before {
  background: #007bff;
}

.cell.found {
  color: #fff;
}

.cell.spangram::before {
  background: #f4d03f;
}

.cell.spangram {
  color: #1a1a1a;
}

.lines {
  position: absolute;
  top: 20px;
  left: 20px;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 600px) {
  h1 {
    font-size: 24px;
    letter-spacing: 4px;
  }

  .info {
    font-size: 24px;
  }

  .grid-wrapper {
    padding: 10px;
    transform: scale(0.83);
    transform-origin: center;
  }

  .lines {
    top: 10px;
    left: 10px;
  }
}

.hint-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.hint-progress {
  display: flex;
  gap: 8px;
}

.progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #4ecca3;
  background: transparent;
  transition: background 0.2s;
}

.progress-dot.filled {
  background: #4ecca3;
}

.hint-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hint-count {
  font-size: 20px;
  font-weight: bold;
  color: #4ecca3;
}

.hint-button {
  padding: 8px 16px;
  background: #4ecca3;
  color: #1a1a2e;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.hint-button:hover {
  background: #5fddba;
  transform: translateY(-2px);
}

.hint-button.disabled {
  background: #2a2a2a;
  color: #666;
  cursor: default;  /* Normal cursor instead of not-allowed */
}

.hint-button.disabled:hover {
  background: #2a2a2a;  /* No hover effect */
  transform: none;  /* No lift effect */
}

.hint-progress.flash {
  animation: hint-flash 0.5s ease-out;
}

.hint-count.flash {
  animation: hint-flash 0.5s ease-out;
}

@keyframes hint-flash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(2); }
}

.cell.hinted::before {
  border: 3px dashed #007bff;
  background: transparent;
  animation: hint-pulse 1s ease-in-out infinite;
}

@keyframes hint-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
