/* Базовые стили */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;   
  overflow-x: auto; 
  overflow-y: auto;   
  background: #0d0b1a;
  color: #ffffff;
  font-family: 'Bebas Neue', Arial, sans-serif; /* Единый шрифт */

  display: flex;
  justify-content: center;  
  align-items: flex-start;   
}

/* ЕДИНОЕ ПРАВИЛО ДЛЯ .container */
.container {
  width: 95vw;           /* 90% от ширины экрана */
  max-width: 500px;      /* Максимум 500px на больших экранах */
  /* min-width убираем совсем */
  padding: 1vw;          /* Отступы тоже в процентах от экрана */
  text-align: center;
  box-sizing: border-box;
  margin-top: 10%;
  margin-left: auto;
  margin-right: auto;
}

/* Анимации появления (все элементы кроме кнопок) */
.container *:not(.btn) {
  opacity: 0;
  translate: 0 10px;
  animation: fadeIn 0.8s forwards;
  animation-fill-mode: both;
}

.input-field {
  width: 100%;
  min-height: 10px;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #7fe0ff;
  background: transparent;
  color: #ffffff;
  font-family: 'Bebas Neue', Arial, sans-serif; /* Исправлено */
  font-size: 1.2rem; /* Увеличен размер для Bebas Neue */
  resize: none;
  margin-bottom: 20px;
  box-sizing: border-box;
}



.nickname-input {
  width: 100%;
  padding: 15px;
  border-radius: 10px;
  border: 2px solid #7fe0ff;
  background: transparent;

  font-family: 'Bebas Neue', Arial, sans-serif; /* Исправлено */
  font-size: 2.0rem;
  text-align: center;
  margin-bottom: 20px;
  box-sizing: border-box;

  color: #fff; 
}

/* градиент только у введённого текста */
.nickname-input:not(:placeholder-shown) {
  background: linear-gradient(90deg, #b78cff, #7fe0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; 
}

/* плейсхолдер — полупрозрачный белый */
.nickname-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.input-field:focus {
  outline: none;
  border-color: #b78cff;
}

/* Для кнопок — только движение */
.btn {
  translate: 0 10px;
  animation: fadeInBtn 0.8s forwards;
  animation-fill-mode: both;

  font-family: 'Bebas Neue', Arial, sans-serif; /* Исправлено */
  font-weight: 400; /* Bebas Neue не нужен font-weight: 700 */
  font-size: 1.6rem;
  padding: 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.3s ease;
}

.btn:active {
  transform: scale(0.99);
}

.btn.primary {
  background: linear-gradient(90deg, #b78cff, #7fe0ff);
  color: #fff;
}

.btn.secondary {
  background: transparent;
  border: 2px solid #7fe0ff;
  color: #ffffff;
}

.btn:hover {
  opacity: 0.9;
}

/* Ключевые кадры */
@keyframes fadeIn {
  from { opacity: 0; translate: 0 10px; }
  to   { opacity: 1; translate: 0 0; }
}

@keyframes fadeInBtn {
  from { translate: 0 10px; }
  to   { translate: 0 0; }
}

/* Заголовок */
h1 {
  font-family: 'Bebas Neue', Arial, sans-serif; /* Исправлено */
  font-size: 3.5rem;
  background: linear-gradient(90deg, #b78cff, #7fe0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 20px 0;
}

/* Подзаголовок */
.subtitle {
  font-family: 'Bebas Neue', Arial, sans-serif; /* Исправлено */
  text-transform: capitalize;
  font-size: 2.0rem;
  line-height: 1.4;
  background: linear-gradient(90deg, #b78cff, #7fe0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

/* Вопрос */
.question {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #cccccc;
  font-family: 'Bebas Neue', Arial, sans-serif; /* Добавлено */
}

/* Кнопки контейнер */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ ВЫБОРА ПОЛА ===== */
.gender-select {
  display: flex !important;
  justify-content: center !important;
  gap: 40px !important;        
  margin: 20px 0 !important;
}

.gender-icon {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  background: linear-gradient(130deg, #b27aeb, #8ce0fa) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.5s ease, transform 0.3s ease !important;
  opacity: 1 !important;
}

.gender-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transition: opacity 0.5s ease !important;
}

/* Выбранная иконка пола - только меняем фон */
.gender-icon.selected {
  background: linear-gradient(60deg, #ff8742, #fff6d4) !important;
  box-shadow: 0 0 0px rgba(255, 135, 66, 0.6) !important;
  transition: all 0.5s ease, transform 0.3s ease !important;
}

/* ==== Страница Магинариум ==== */
.container.assoc-page {
  margin-top: -5%;
}

.assoc-swiper {
  max-width: 500px;
  margin: 0 auto 20px;
}

.assoc-slide {
  width: 280px;           
  max-width: 80vw;        
  height: 400px;          
  max-height: 60vh;       
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

.assoc-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ СЛАЙДШОУ АВАТАРОК ===== */
.page-title {
  text-align: center;
  font-size: 1.5rem;
  margin: 40px 0;
  color: #ffffff;
  font-family: 'Bebas Neue', Arial, sans-serif; /* Добавлено */
}

.mySwiper {
  width: 100%;
  max-width: 500px;
  padding: 20px 0;
  margin: 0 auto; /* Центрируем слайдер */
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  gap: 15px; 
  padding: 0px;
  width: 100%; 
  box-sizing: border-box;
  justify-items: center; /* Центрируем элементы в ячейках */
  justify-content: center; /* Центрируем всю сетку */
  margin: 0 auto; /* Центрируем контейнер сетки */
}

.avatar-wrapper {
  aspect-ratio: 1 / 1; 
  width: 100%;         
  border-radius: 50%;
  background: linear-gradient(130deg, #b27aeb, #8ce0fa);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease, transform 0.3s ease;
  cursor: pointer;
  opacity: 1;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
}

/* Выбранная аватарка - только меняем фон */
.avatar-wrapper.selected {
  background: linear-gradient(60deg, #ff8742, #fff6d4) !important;
  box-shadow: 0 0 0px rgba(255, 135, 66, 0.8) !important;
  transition: all 0.5s ease, transform 0.3s ease !important;
}

/* Hover эффекты только для широких экранов */
@media (min-width: 769px) {
  .avatar-wrapper:hover {
    transform: scale(0.9);
  }

  .gender-icon:hover {
    transform: scale(0.9);
  }
}

/* ИСПРАВЛЕННЫЕ СТИЛИ ПАГИНАЦИИ */
.swiper-pagination {
  position: relative !important;
  margin-bottom: 5px !important;
  margin-top: 15px !important; /* Добавили отступ сверху */
}

.swiper-pagination-bullet {
  background: #7fe0ff !important;
  opacity: 1 !important;
  width: 8px !important;
  height: 8px !important;
}

.swiper-pagination-bullet-active {
  background: #b78cff !important;
  opacity: 1 !important;
}

/* Адаптивность слайдшоу */
@media (max-width: 450px) {
  .avatar-grid {
    grid-template-columns: repeat(4, 70px);
    grid-template-rows: repeat(2, 70px);
    gap: 12px;
  }
  
  .avatar-wrapper {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 380px) {
  .avatar-grid {
    grid-template-columns: repeat(4, 60px);
    grid-template-rows: repeat(2, 60px);
    gap: 10px;
    padding: 15px;
  }
  
  .avatar-wrapper {
    width: 60px;
    height: 60px;
  }
  
  .page-title {
    font-size: 1.3rem;
    margin: 20px 0;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 320px) {
  .container {
    max-width: 95vw;
    padding: 15px;
  }
  
  .avatar-grid {
    grid-template-columns: repeat(4, 55px);
    grid-template-rows: repeat(2, 55px);
    gap: 8px;
    padding: 10px;
  }
  
  .avatar-wrapper {
    width: 55px;
    height: 55px;
  }
  
  .page-title {
    font-size: 1.2rem;
    margin: 15px 0;
  }
}

/* Служебные стили для окон */
.window {
  display: none; 
}

.window.active {
  display: block; 
}

/* Скрыть полосу прокрутки, оставить сам скролл */
body {
  scrollbar-width: none;   
}

body::-webkit-scrollbar {
  display: none;           
}

/* Дополнительные элементы с Bebas Neue */
.anon-input {
  font-family: 'Bebas Neue', Arial, sans-serif;
}

.custom-input {
  font-family: 'Bebas Neue', Arial, sans-serif;
}

.connect-btn {
  font-family: 'Bebas Neue', Arial, sans-serif;
}

/* Контейнер для звезд - полностью адаптивный */
.star-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 25px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 5% !important; /* Отступы в процентах */
    
    /* Используем gap в процентах от контейнера */
    gap: 2% !important;
}

/* Звездочки - полностью адаптивные без фиксированных размеров */
.star-container .star-btn {
    /* Размер звезды как часть контейнера (5 звезд + 4 промежутка = 100%) */
    /* (100% - 4*2%) / 5 = примерно 18.4% на звезду */
    width: 18% !important;
    
    /* Квадратные пропорции */
    aspect-ratio: 1 / 1 !important;
    
    /* Остальные стили */
    border: none !important;
    cursor: pointer !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    
    /* Плавные переходы */
    transition: transform 0.2s ease !important;
    
    /* Не позволяем звездам сжиматься или растягиваться */
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Hover эффект для широких экранов */
@media (min-width: 769px) {
    .star-container .star-btn:hover {
        transform: scale(1.1) !important;
    }
}

/* Для очень узких экранов - уменьшаем gap */
@media (max-width: 320px) {
    .star-container {
        gap: 1% !important;
        padding: 0 2% !important;
    }
    
    .star-container .star-btn {
        /* (100% - 4*1%) / 5 = 19.2% на звезду */
        width: 19% !important;
    }
}




/* Полноэкранная карта */
.game-6-window {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.game-6-map-container {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}


/* Кнопка поверх карты */
.map-overlay-button {
    position: absolute !important;
    bottom: 20px !important;
    left: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    margin: 0 !important;
}

/* Убеждаемся, что все элементы используют правильный шрифт */
* {
  font-family: 'Bebas Neue', Arial, sans-serif;
}