/* ==============  base.css  (общие стили всего mini‑app) ============== */
:root {
  --header-bg: #e53935; /* основной красный */
  --accent: #d32f2f; /* тёмно‑красный для hover/active */
  --inactive: rgba(255, 255, 255, 0.6);
  --header-h: 64px; /* высота шапки */
  --nav-h: 64px; /* высота нижней навигации */
  --radius: 16px; /* скругление блоков */
}

/* базовое обнуление */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* -------------------- каркас -------------------- */
body {
  font-family: "Inter", sans-serif;
  background: #fff;
  overflow: hidden; /* запрещаем скролл body + горизонт. полосу */
  min-height: 100vh; /* высота = экран */
}

/* ────────── фикс‑шапка ────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: var(--header-bg);
  color: #fff;

  /* скруглённые нижние углы */
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden; /* чтобы фон не «лез» за радиус */
}

.logo {
  height: 24px;
  margin: 0 8px 0 4px;
  object-fit: contain;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  overflow: hidden;
}
.name {
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.uid {
  font-size: 10px;
  color: #ffdede;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* ────────── прокручиваемый контент ────────── */
.content {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + 24px); /* 64 nav + 12 px отступ сверху/снизу */
  overflow-y: auto; /* вертикальный скролл только здесь */
  -webkit-overflow-scrolling: touch;
  padding: 24px 16px;
  max-width: 100%;
}

/* ────────── фикс‑навигация (нижняя) ────────── */
.nav-bar {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  height: var(--nav-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  background: var(--header-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
}
.nav-btn {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  padding: 8px 0;
  border-radius: var(--radius);
  opacity: var(--inactive);
  transition: opacity 0.2s;
}
.nav-btn.active {
  opacity: 1;
}
.nav-icon {
  width: 24px;
  height: 24px;
  /* Сделаем иконки белыми по умолчанию */
  filter: invert(1) brightness(2);
  transition: filter 0.2s ease;
}

/* Активная кнопка на белом фоне — иконка чёрная */
.nav-btn.active .nav-icon {
  filter: none;
}

.nav-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 0;
  background: #fff;
  border-radius: var(--radius);
  transition: left 0.25s ease, width 0.25s ease;
  z-index: -1;
}

/* ────────── белая подложка под nav ────────── */
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + 24px); /* nav + зазор сверху/снизу */
  background: #fff;
  z-index: 90; /* ниже nav, выше контента */
}

#snow-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
}
#garland-top {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 60px;
  z-index: 9998;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 600px) {
  #garland-top { height: 36px; }
}

/* ────────── Пасхалка ────────── */
.easter-egg-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.easter-egg-modal.show {
  display: flex;
  opacity: 1;
}

.easter-egg-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.easter-egg-image {
  width: 100%;
  height: auto;
  display: block;
}

.easter-egg-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.easter-egg-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Стили для логотипа */
.logo {
  height: 24px;
  margin: 0 8px 0 4px;
  object-fit: contain;
  cursor: pointer;
}
