

  body {
    font-family: sans-serif;
    background: #ccc;
    padding: 40px 20px;
    text-align: center;
    color: #222;
    min-height: 100vh;
    margin: 0;
  }
  .game-container {
    background: white;
    padding: 30px 40px 40px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    margin: 20px auto;
  }
  .title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: nowrap; /* запрет на перенос строк */
}

  .cell {
    width: 50px;
    height: 60px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    border-radius: 8px;
    user-select: none;
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
    border: 2px solid #ccc;
    transition: background-color 0.3s ease;
  }
  .cell.revealed {
    background: #c7f0c7;
    border-color: #6bb46d;
    font-weight: bold;
    color: #2f5d2f;
  }

  /* Мерцание зелёное */
  .flash-success {
    animation: flashGreen 1500ms ease forwards;
  }
  @keyframes flashGreen {
    0%, 100% { background-color: #c7f0c7; }
    50% { background-color: #7be07b; }
  }

  /* Мерцание красное */
  .flash-error {
    animation: flashRed 1500ms ease forwards;
  }
  @keyframes flashRed {
    0%, 100% { background-color: white; }
    50% { background-color: #f8baba; }
  }

  input[type="text"] {
    font-size: 22px;
    padding: 10px;
    text-align: center;
    margin-bottom: 15px;
    width: 80px;
    border: 3px solid #6b8db4;
    border-radius: 6px;
    outline-color: #4a72b0;
	
  }
  .message {
    font-size: 22px;
    margin-top: 15px;
    min-height: 24px;
    font-weight: 500;
  }
  .message.success {
    color: #2d862d;
    font-weight: 700;
  }
  
  
.message.error {
  color: #fff;
  background-color: #c0392b;
  border: 3px solid #922b21;
  border-radius: 10px;
  padding: 15px 20px;
  margin-top: 20px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0 10px rgba(192, 57, 43, 0.6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

.word-shake {
  animation: shake 0.5s ease;
}










.word-shake {
  animation: wordShake 1s ease-in-out;
}

@keyframes wordShake {
  0% { transform: scale(1) translateX(0); }
  20% { transform: scale(1.05) translateX(-4px); }
  40% { transform: scale(1.05) translateX(4px); }
  60% { transform: scale(1.05) translateX(-3px); }
  80% { transform: scale(1.05) translateX(3px); }
  100% { transform: scale(1) translateX(0); }
}



.big-message {
  font-size: 1.5em;
  padding: 10px;
  background-color: #ffe6e6;
  border: 2px solid #c0392b;
  border-radius: 10px;
  margin-top: 15px;
}


.big-message-green {
  font-size: 1.5em;
  padding: 10px;
  background-color: #e6ffe6; /* нежно-зелёный */
  border: 2px solid #a3d9a5;
  border-radius: 10px;
  margin-top: 15px;
}







  #guessSection {
    margin-top: 20px;
    display: none;
  }
  button {
    font-size: 22px;
    padding: 15px 30px;
    margin: 5px;
    cursor: pointer;
    background: #4a72b0;
    color: white;
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }
  button:hover:not(:disabled) {
    background: #365a8c;
  }
  button:disabled {
    background: #9bb7d4;
    cursor: default;
  }
  button.error-flash {
    background: #c0392b !important;
    animation: flashRedBtn 1.5s forwards;
  }
  
#wordGuessInput {
  width: 20ch;
  font-size: 22px; /* для соответствия стилю кнопки */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}



  @keyframes flashRedBtn {
    0% { background-color: #c0392b; }
    100% { background-color: #4a72b0; }
  }
  #attempts {
    font-size: 22px;
    margin: 10px 0 50px 0;
    font-weight: 600;
    color: #aaa;
  }

  /* Спиннер */
  .spinner {
    border: 3px solid #f3f3f3; /* светлый фон */
    border-top: 3px solid #4a72b0; /* цвет вращающегося сегмента */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
  }
  @keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
  }

  /* --- Адаптивность --- */
  @media (max-width: 480px) {
    .cell {
      width: 40px;
      height: 50px;
      font-size: 22px;
      border-width: 1.5px;
    }
    input[type="text"] {
      font-size: 20px;
      padding: 8px;
      width: 60px;
    }
    button {
      font-size: 16px;
      padding: 8px 16px;
      margin: 4px;
    }
    .title {
      font-size: 20px;
      margin-bottom: 16px;
    }
  }
  
  
  
.cell img.cell-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}




html, body {
  height: 100%;
  margin: 0;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 20px;
  /* Можешь добавить фон или отступы по желанию */
}




footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  

  color: white;
  text-align: center;
  padding: 15px 0;
  margin: 5px 0;
  z-index: 1000;
}

footer a,
footer b {
  color: white;
  text-decoration: none; /* убирает подчёркивание (по желанию) */
}

