/* Базовые стили */
@font-face {
  font-family: 'Bebas Neue Pro Semi Exp';
  src: url('_Fonts/BebasNeuePro-SemiExpMiddle.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;   
  overflow-x: auto; 
  overflow-y: auto;   
  background: linear-gradient(180deg, #756970, #B58E80, #EFA162);
  background-attachment: fixed;
  color: #ffffff;
  font-family: 'Bebas Neue', Arial, sans-serif; /* Единый шрифт */

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

/* ЕДИНОЕ ПРАВИЛО ДЛЯ .container */
.container {
  width: 98vw;           /* 98% от ширины экрана */
  max-width: 450px;      /* Максимум 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: 60px;
  padding: 20px;
  border-radius: 10px;
  border: 2px solid #F7E8DC;
  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;
  overflow: hidden;
  line-height: 1.5;
  text-align: center;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}



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

  font-family: 'Bebas Neue', Arial, sans-serif; /* Исправлено */
  font-size: 2.0rem;
  text-align: center;
  margin-bottom: 20px;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  line-height: 1.2;
  color: #fff; 
}

/* градиент только у введённого текста */
.nickname-input:not(:placeholder-shown) {
  background: linear-gradient(180deg, #F7E8DC, #FFFFFF);
  -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: #F7E8DC;
}

.nickname-input:focus {
  outline: none;
  border-color: #F7E8DC;
}

/* Для кнопок — только движение */
.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: #F7E8DC;
  color: #543D36;
}

.btn.secondary {
  background: #000000;
  border: none;
  color: #F7E8DC;
}

.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, #F7E8DC, #FFFFFF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 20px 0;
}

/* Подзаголовок */
.subtitle {
  font-family: 'Bebas Neue', Arial, sans-serif !important;
  font-size: 2.0rem;
  line-height: 1.4;
  background: linear-gradient(90deg, #F7E8DC, #FFFFFF);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

/* Описание (для текста доната) */
.description {
  font-family: 'Bebas Neue Pro Semi Exp', Arial, sans-serif !important;
  font-size: 20px !important;
  line-height: 1.35;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #F7E8DC, #FFFFFF) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

.description span {
  background: linear-gradient(90deg, #F7E8DC, #FFFFFF) !important;
  background-clip: text !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* Каждое предложение в абзаце */
.sentence {
  display: inline;
  font-family: inherit !important;
  color: inherit !important;
  background: none !important;
  -webkit-text-fill-color: inherit !important;
}

/* Вопрос */
.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;
}

.buttons-horizontal {
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.buttons-horizontal .btn:not(.btn-small) {
  flex: 1;
}

.btn-small {
  width: 60px;
  min-width: 60px;
  padding: 10px;
  flex: 0 0 60px;
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ ВЫБОРА ПОЛА ===== */
.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, #856D69, #745D5A) !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, #F7E8DC, #FFFFFF) !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, #856D69, #745D5A);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease, transform 0.3s ease;
  cursor: pointer;
  opacity: 0.2;
}

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

/* Выбранная аватарка - только меняем фон */
.avatar-wrapper.selected {
  background: linear-gradient(60deg, #F7E8DC, #FFFFFF) !important;
  box-shadow: 0 0 0px rgba(255, 135, 66, 0.8) !important;
  transition: all 0.5s ease, transform 0.3s ease !important;
  opacity: 1 !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: #F7E8DC !important;
  opacity: 1 !important;
  width: 8px !important;
  height: 8px !important;
}

.swiper-pagination-bullet-active {
  background: #F7E8DC !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;
}

/* Game Mode 6 - Map fullscreen styles */
.game-6-fullscreen {
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  overflow: hidden;
}

#game_6_map_container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.game-6-submit-btn {
  position: fixed !important;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  min-width: 200px;
  max-width: 90%;
}

.game-6-submit-btn:active {
  transform: translateX(-50%) scale(0.99);
}
