body {
  background-color: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #000000);
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.telegram-container {
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}

.word-image {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  max-width: 100%;
  height: auto;
}

.image-container {
  position: relative;
  display: inline-block;
}

h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--tg-theme-text-color, #000000);
  margin-bottom: 1.5rem;
}

.card {
  background-color: var(--tg-theme-bg-color, #ffffff);
  color: var(--tg-theme-text-color, #000000);
  border: 1px solid var(--tg-theme-hint-color, #cccccc);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  margin: 2rem auto;
  max-width: 400px;
}

.card h1 {
  color: var(--tg-theme-text-color, #000000);
  margin-bottom: 1rem;
}

.card p {
  color: var(--tg-theme-hint-color, #666666);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Анимация загрузки */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--tg-theme-hint-color, #cccccc);
  border-radius: 50%;
  border-top-color: var(--tg-theme-button-color, #0088cc);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 576px) {
    h1 {
      font-size: 2rem;
    }

    .card {
      margin: 1rem;
      padding: 1.5rem;
    }

    .square-unit-btn {
        font-size: 14px;
    }
}