* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: url('../background.jpg') center/cover fixed;
  color: #333;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  cursor: pointer;
}

/* Оверлей для осветления */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease;
  z-index: 1;
}

/* Заголовок KNP */
.content h1 {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A0522D;
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
  margin: 1vh 20px 20px;
  text-align: left;
  opacity: 0.95;
  font-family: 'Arial Black', sans-serif;
}

.content p {
  font-size: 0.7rem;
  color: #FFE4C4;
  text-align: left;
  max-width: 80%;
  margin: 0 0 50px 20px;
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

/* Кнопка темы */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.theme-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

/* FAB-меню */
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
}

.fab-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.fab-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  position: absolute;
  bottom: 80px;
  right: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.fab-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  z-index: 1;
}

.fab-item {
  background: rgba(255, 255, 255, 0.95);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.fab-item:hover {
  transform: scale(1.1);
}

.fab-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Темная тема */
body.dark-theme {
  color: #f5f5f5;
}

body.dark-theme .theme-toggle,
body.dark-theme .fab-main,
body.dark-theme .fab-item {
  background: rgba(30, 30, 30, 0.9);
  color: #f5f5f5;
}

body.dark-theme .overlay {
  background-color: black;
}

/* === ЭФФЕКТЫ HALO === */
.sun-flare {
  position: absolute;
  width: 70px;
  height: 70px;
  background: url('../assets/images/sun-flare.png') no-repeat center;
  background-size: contain;
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.8s ease, transform 1.5s ease;
}

.prediction-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(255,255,255,0.95);
  color: #333;
  padding: 30px 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  font-size: 1.4rem;
  font-weight: bold;
  text-align: center;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: none;
  max-width: 80%;
  word-wrap: break-word;
}

/* ===== КОМПАС ===== */
#kompas {
  width: 1px;
  height: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg); /* ← Сначала translate, потом rotate */
  transform-origin: center; /* ← Явно указываем центр вращения */
  transform-box: fill-box;
  transition: none;
  will-change: transform, width, opacity;
  image-rendering: -webkit-optimize-contrast;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
}