/* ===== AR РАДУГА - БАЗОВЫЕ СТИЛИ ===== */

/* Сброс стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Основные стили */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Главный контейнер */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* AR сцена */
#ar-scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* A-Frame сцена */
#ar-scene a-scene {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Информационная панель */
#info {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 80%; /* Уменьшаем ширину вдвое */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1001; /* Поверх AR сцены */
}

#info h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 600;
}

#info p {
  font-size: 1rem;
  margin-bottom: 8px;
  opacity: 0.9;
}

#info small {
  font-size: 0.8rem;
  opacity: 0.7;
  font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
  #ar-scene {
    margin: 10px;
    border-radius: 15px;
  }
  
  #info {
    top: 10px;
    left: 10px;
    width: calc(50% - 15px); /* Адаптивная ширина для мобильных */
    padding: 15px;
  }
  
  #info h1 {
    font-size: 1.5rem;
  }
  
  #info p {
    font-size: 0.9rem;
  }
}

/* AR.js и A-Frame стили */
a-scene {
  width: 100%;
  height: 100%;
}

/* Скрыть A-Frame UI элементы */
.a-enter-vr,
.a-enter-ar,
.a-enter-vr-button,
.a-enter-ar-button {
  display: none !important;
}

/* Скрыть loading screen A-Frame */
.a-loader-title,
.a-loader {
  display: none !important;
}

/* AR canvas стили */
#ar-scene canvas {
  border-radius: 20px;
}

/* Адаптация информационной панели для AR */
#info {
  backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.2);
}

/* 2D Компас стили */
.compass-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

/* Компас как overlay поверх AR */
#compass-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none; /* Не блокирует взаимодействие с AR */
  z-index: 1002; /* Поверх всего */
  display: flex;
  align-items: center;
  justify-content: center;
}

.compass {
  position: relative;
  width: 200px;
  height: 200px;
  border: 3px solid #4ecdc4;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.compass-ring {
  position: absolute;
  width: 100%;
  height: 100%;
}

.compass-direction {
  position: absolute;
  font-weight: bold;
  font-size: 1.2rem;
  color: #4ecdc4;
}

.compass-n {
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-e {
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.compass-s {
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-w {
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

/* Стрелка направления устройства (поворачивается с гироскопом) */
.compass-device-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  transition: transform 0.1s ease;
  z-index: 2;
}

.arrow-head {
  font-size: 1.5rem;
  color: #4ecdc4;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
  margin-bottom: -5px;
}

.arrow-tail {
  font-size: 1rem;
  color: #4ecdc4;
  font-weight: bold;
  text-align: center;
  line-height: 1;
}

/* Иконка радуги (фиксированная позиция) */
.compass-rainbow-icon {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  transform-origin: center;
  font-size: 2rem;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.compass-center {
  text-align: center;
  color: white;
  z-index: 1;
}

.compass-center span {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

.compass-center small {
  font-size: 0.8rem;
  opacity: 0.8;
}

.compass-instruction {
  text-align: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  margin-bottom: 10px;
}

.compass-help {
  text-align: center;
  color: #4ecdc4;
  font-size: 0.9rem;
  font-weight: 400;
  background: rgba(78, 205, 196, 0.1);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Адаптивность компаса */
@media (max-width: 768px) {
  .compass {
    width: 150px;
    height: 150px;
  }
  
  .arrow-head {
    font-size: 1.2rem;
  }
  
  .arrow-tail {
    font-size: 0.8rem;
  }
  
  .compass-rainbow-icon {
    font-size: 1.5rem;
  }
  
  .compass-instruction {
    font-size: 1rem;
    padding: 10px;
  }
  
  .compass-help {
    font-size: 0.8rem;
    padding: 8px;
  }
}
