html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
  overflow-x: hidden;
}

/* Звёздный фон */
.star-background {
  position: fixed;
  inset: 0;
  background: url('/static/img/stars1.png') repeat;
  background-size: 1000px;
  animation: moveStars 120s linear infinite;
  z-index: -1;
}
@keyframes moveStars {
  0% { background-position: 0 0; }
  100% { background-position: -2000px 2000px; }
}

/* Контейнер */
.meditation-container {
  max-width: 700px;
  margin: 80px auto 100px;
  padding: 40px;
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  box-shadow: 0 0 20px #ffcc66;
  backdrop-filter: blur(6px);
  text-align: center;
}

.med-title {
  font-size: 2.2em;
  color: #ffcc66;
  margin-bottom: 25px;
  text-shadow: 0 0 8px rgba(255,204,102,0.5);
}

/* видео-сфера */
.ahura-video-shell {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.ahura-frame {
    position: relative;
    width: 420px;
    height: 420px;
    background: #000;
    border-radius: 32px;
    overflow: hidden;

    box-shadow:
        0 0 20px rgba(90, 190, 255, .6),
        0 0 36px rgba(255, 170, 80, .45);

    cursor: pointer;
}

.ahura-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
}

/* Подсветка при речи */
.ahura-video-shell.speaking .ahura-frame {
  box-shadow:
    0 0 28px rgba(120,200,255,1),
    0 0 56px rgba(255,180,110,1);
}

.video-hint {
  color: #ddd;
  font-size: 1em;
  margin-top: -10px;
  margin-bottom: 30px;
  opacity: 0.85;
}

/* Поле имени */
input[type="text"] {
  margin-top: 20px;
  padding: 10px;
  font-size: 1.1em;
  width: 80%;
  border-radius: 12px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: white;
  text-align: center;
}

/* Аватар */
.avatar-upload {
  margin-top: 30px;
  color: #ddd;
}
.avatar-upload input[type="file"] {
  margin-top: 10px;
  color: #fff;
  background: rgba(255,255,255,0.08);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #888;
}

#avatarPreview {
  margin-top: 15px;
  max-width: 140px;
  border-radius: 50%;
}

/* Кнопки */
.save-btn,
.copy-button,
.continue-button {
  margin-top: 20px;
  padding: 12px 24px;
  background: #ffcc66;
  border: none;
  border-radius: 10px;
  color: #000;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
}

.save-btn:hover,
.copy-button:hover,
.continue-button:hover {
  background: #ffdb99;
  box-shadow: 0 0 10px #ffcc66;
}

/* Ошибки */
.error-message {
  margin-top: 10px;
  color: #ff7777;
}

/* ─────────────────────────────────────────────
   📱 MOBILE APP MODE — БЕЗ СДВИГОВ
   ───────────────────────────────────────────── */
@media screen and (max-width: 768px) {

  html, body {
    height: 100%;
    overflow: hidden; /* внешний скролл убираем */
  }

  /* Центрируем как приложение */
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .meditation-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    overflow-y: auto;   /* скролл ВНУТРИ контейнера */
    padding: 24px 18px 60px;
    margin: 0;

    border-radius: 0;   /* режим app */
    backdrop-filter: blur(4px);

    box-shadow:
      0 0 22px rgba(90, 190, 255, .9),
      0 0 44px rgba(255, 170, 80, .7);
  }

  .med-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
  }

  .ahura-frame {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: 22px;
    margin: 0 auto;

    box-shadow:
      0 0 26px rgba(120,200,255,1),
      0 0 52px rgba(255,180,110,.85);

    transform: translateZ(0);
  }

  input[type="text"] {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
  }

  /* 🔒 Резерв под аватар */
  .avatar-upload {
    min-height: 170px;
  }

  #avatarPreview {
    max-width: 110px;
    margin: 15px auto 0;
    display: block;
  }

  .save-btn,
  .copy-button,
  .continue-button {
    width: 100%;
    font-size: 1rem;
    padding: 14px;
  }

  .star-background {
    animation: moveStars 240s linear infinite;
  }

}