* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #121213;
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

.game-container {
  width: 100%;
  max-width: 700px;
  text-align: center;
}

h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.seo-text {
  max-width: 650px;
  margin: 0 auto 20px;
  color: #cfcfcf;
  font-size: 17px;
  line-height: 1.6;
}

.top-buttons,
.controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

button {
  background: #538d4e;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  background: #6aaa64;
}

button:focus {
  outline: none;
  box-shadow: none;
}

#hint-btn {
  background: #b59f3b;
}

#hint-btn:hover {
  background: #c9b458;
}

#delete-btn {
  background: #3a3a3c;
}

#delete-btn:hover {
  background: #565758;
}

.board {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 20px 0 25px;
  min-height: 70px;
  width: 100%;
  overflow: hidden;
}

.tile {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border: 2px solid #3a3a3c;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 8px;
  background: #121213;
  flex-shrink: 0;
}

.tile.filled {
  border-color: #565758;
  transform: none;
}



.tile.hint {
  background: #b59f3b;
  border-color: #b59f3b;
  color: white;
}

.tile.correct {
  background: #538d4e;
  border-color: #538d4e;
  color: white;
  animation: flip 0.4s;
}

.meaning-box {
  background: #1f1f20;
  border: 1px solid #2f2f31;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
}

.meaning-box h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #c9b458;
}

.meaning-box p {
  margin: 0;
  line-height: 1.6;
  font-size: 18px;
}

.message {
  min-height: 30px;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
}

.message.success {
  color: #6aaa64;
}

.message.error {
  color: #ff6b6b;
}

.keyboard-info {
  margin-top: 10px;
  color: #aaa;
  font-size: 14px;
}

.seo-box {
  max-width: 800px;
  margin-top: 40px;
  padding: 24px;
  background: #1b1b1d;
  border: 1px solid #2f2f31;
  border-radius: 16px;
}

.seo-box h2 {
  color: #c9b458;
  margin-top: 0;
  margin-bottom: 10px;
}

.seo-box p {
  color: #ddd;
  line-height: 1.7;
  font-size: 16px;
  margin-bottom: 22px;
}

.mobile-input {
  position: absolute;
  left: -9999px;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.shake {
  animation: shake 0.35s;
}



@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}


@keyframes flip {
  0% { transform: rotateX(0); }
  50% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}

@media (max-width: 600px) {
  body {
    padding: 16px 10px;
  }

  h1 {
    font-size: 28px;
  }

  .seo-text {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .board {
    gap: 5px;
    margin: 16px 0 22px;
  }

  .meaning-box p {
    font-size: 16px;
  }

  button {
    font-size: 15px;
    padding: 10px 16px;
  }

  .seo-box {
    padding: 18px;
  }

  .seo-box p {
    font-size: 15px;
  }
}