body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #000;
  animation: Gradient 16s ease infinite;
  font-family: 'Roboto', sans-serif;
}

@keyframes Gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  text-align: center;
  margin-top: 20px;
}

.game-board {
  display: flex;
  flex-wrap: wrap;
  margin: 10px auto;
  min-height: 200px;
}

.row {
  display: flex;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  animation: slideIn 0.5s forwards ease-out;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.square {
  margin: 2.7px;
  background: linear-gradient(145deg, #1f1f1f, #2b2b2b);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 0 0 4px #555555;
}

.square.active {
  background-color: #ff9a9e;
  border-radius: 50%;
}

.neon-circle {
  width: 60%;
  height: 45%;
  border-radius: 50% / 50%;
  border: 4px solid white;
  box-shadow:
    0 0 30px rgba(0, 255, 153, 1),
    0 0 60px rgba(0, 255, 204, 0.9),
    0 0 90px rgba(0, 255, 204, 0.8),
    0 0 120px rgba(0, 255, 204, 0.7);
  animation: appear 1s ease forwards;
  opacity: 0;
  background-color: transparent;
}

.play-button {
  background-color: #1f1f1f;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px 30px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 200px;
  margin: 10px;
}
.reset-button {
  background-color: #2515d8;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px 30px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 200px;
  margin: 10px;
}
.back-button {
  background-color: #dc0c0c;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 15px 30px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 200px;
  margin: 10px;
}

button:hover,
button:active {
  background-color: #008B8B;
}

.play-button {
  margin-bottom: 3px;
}

select {
  padding: 10px 20px;
  font-size: 18px;
  background-color: #1f1f1f;
  color: white;
  border: none;
  border-radius: 10px;
  margin: 10px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

select:hover {
  background-color: #008B8B;
}

label {
  font-size: 18px;
}


header {
  position: fixed;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 10px 20px;
  background-color: #333;
  color: #fff;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  font-size: 24px;
}

@media (max-width: 768px) {
  .tab {
    height: 70px;
  }

  .tab button {
    margin: 0 5px;
    padding: 10px 15px;
    font-size: 14px;
  }

  .tab button img {
    max-width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .tab {
    height: 70px;
  }

  .tab button {
    margin: 0 3px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .tab button img {
    max-width: 28px;
    height: 28px;
  }
}

button, select, input, textarea, a, * {
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
  outline: none;
  -webkit-touch-callout: none;
}
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0b1220;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preloader-img {
  max-width: 180px;
  max-height: 180px;
  margin-bottom: 52px;
  display: block;
}

.preloader-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.2); /* полупрозрачный круг */
  border-top: 4px solid #18a0fb;          /* основной цвет */
  box-shadow: 0 4px 24px #18a0fb33;
  animation: spin 0.85s linear infinite;   /* чуть быстрее */
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}