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

:root {
  --bg-dark: #191924;
  --card-dark: #1e1e2e;
  --border-dark: #334155;
  --purple: #8b5cf6;
  --purple-hover: #7c3aed;
  --gray: #9ca3af;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: #1a1a2e;
  background: #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Верхняя панель */
.topbar {
  background: var(--bg-dark);
  color: #fff;
  text-align: center;
  padding: 16px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 500;
}

/* Блок поздравления с днём рождения */
.birthday {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(219, 39, 119, 0.14));
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 12px;
  padding: 12px 18px;
}

.birthday__icon {
  font-size: 34px;
  line-height: 1;
  flex-shrink: 0;
}

.birthday__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.birthday__title {
  color: var(--purple);
  font-size: 17px;
  font-weight: 700;
}

.birthday__subtitle {
  color: #cbd5e1;
  font-size: 12.5px;
  line-height: 1.5;
}

.topbar__subtitle {
  color: var(--gray);
  font-size: 12px;
  margin: 10px 0 0;
}

#map {
  flex: 1;
  width: 100%;
}

/* Тёмный фон контейнера карты, чтобы по краям не было серых зон
   (там, где нет тайлов), — сливается с затемняющей маской */
.leaflet-container {
  background: #0f111a;
}

/* Прячем блок атрибуции Leaflet (флажок и водяные знаки) */
.leaflet-control-attribution {
  display: none !important;
}

/* Стилизация зум-контролов под тёмный минимализм */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
}

.leaflet-control-zoom a {
  width: 30px;
  height: 30px;
  line-height: 30px;
  color: #333;
  border: 1px solid #ddd;
  font-size: 18px;
  transition: background 0.1s;
}

.leaflet-control-zoom a:hover {
  background: #f3f4f6;
  color: #000;
}

/* Круглые цветные маркеры с инициалами */
.city-marker {
  position: relative;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: transform 0.15s ease;
  z-index: 0;
}

/* Расходящееся вдаль кольцо (постоянная пульсация каждые ~3.5 c) */
.city-marker::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--mc, #8b5cf6);
  z-index: -1;
  animation: marker-ring 3.5s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes marker-ring {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  70% {
    transform: scale(2.8);
    opacity: 0;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* Увеличение иконки при наведении */
.city-marker:hover {
  transform: scale(1.25);
  z-index: 1000;
}

/* Во время проигрывания аудио кольцо расходится чаще и заметнее */
.city-marker.pulsing::before {
  animation-duration: 1.4s;
  animation-delay: 0s;
  border-width: 3px;
}

.hidden {
  display: none !important;
}

/* Оверлей с модальной карточкой поздравления */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 26, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fade 0.25s ease;
}

.overlay.hidden {
  display: none;
}

/* Карточка в стиле присланного макета */
.modal-card {
  position: relative;
  width: min(92vw, 400px);
  background: #1b1a2b;
  padding: 30px 24px 20px;
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: pop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Кнопка закрытия */
.close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #fff;
}

.close-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
  stroke: currentColor;
}

/* Заголовок и локация */
.user-header {
  text-align: left;
  width: 100%;
  margin-bottom: 16px;
}

.user-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
}

.user-location {
  font-size: 14px;
  color: #a1a1aa;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-location svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Блок с цитатой */
.message-box {
  width: 100%;
  background: #25243a;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
}

.quote-icon {
  color: #6b6b8b;
  font-size: 18px;
  font-weight: 900;
  font-family: serif;
  line-height: 1;
  margin-top: 2px;
}

.message-text {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  color: #eee;
}

/* Аватар с инициалами или фото */
.avatar-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 24px;
  border: 3px solid #2f2e47;
  margin-bottom: 24px;
}

.avatar-circle--photo {
  background-size: cover;
  background-position: center;
  color: transparent;
}

/* Градиентная кнопка прослушивания */
.play-btn {
  width: 100%;
  padding: 14px 0;
  border-radius: 30px;
  border: none;
  background: linear-gradient(90deg, #5f6af5, #8964f7);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 8px;
}

.play-btn:hover {
  opacity: 0.9;
}

.play-btn:active {
  transform: scale(0.98);
}

.play-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Подсказка внизу */
.helper-text {
  font-size: 11px;
  color: #5c5b74;
  margin: 0;
  text-align: center;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
