* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; overflow: hidden; background: #0a0a0a; }

:root {
  --gold: #d4a017;
  --gold-light: #f0c040;
  --ember: #e8731a;
  --blood: #8b0000;
  --ghost: #e0d8c8;
  --dark1: #0a0a0a;
  --dark2: #1a1a1a;
  --dark3: #2a2a2a;
}

@keyframes pulse-ember {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes fog-drift {
  0% { transform: translateX(-10%) translateY(0); opacity: 0.03; }
  50% { transform: translateX(10%) translateY(-5%); opacity: 0.08; }
  100% { transform: translateX(-10%) translateY(0); opacity: 0.03; }
}

@keyframes glow-pulse {
  0%, 100% { text-shadow: 0 0 10px rgba(212,160,23,0.5), 0 0 20px rgba(212,160,23,0.3); }
  50% { text-shadow: 0 0 20px rgba(212,160,23,0.8), 0 0 40px rgba(212,160,23,0.5), 0 0 60px rgba(232,115,26,0.3); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slide-down {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

@keyframes invasion-slide {
  0% { transform: translateX(110%); opacity: 0; }
  15% { transform: translateX(0); opacity: 1; }
  85% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(110%); opacity: 0; }
}

@keyframes praise-sun {
  0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
  25% { transform: scale(1.5) rotate(10deg); filter: brightness(2); }
  50% { transform: scale(2) rotate(0deg); filter: brightness(3); }
  75% { transform: scale(1.5) rotate(-10deg); filter: brightness(2); }
  100% { transform: scale(1) rotate(0deg); filter: brightness(1); }
}

@keyframes bonfire-flicker {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(240,192,64,0.6)); }
  25% { filter: drop-shadow(0 0 10px rgba(232,115,26,0.8)); }
  50% { filter: drop-shadow(0 0 14px rgba(240,192,64,0.9)); }
  75% { filter: drop-shadow(0 0 8px rgba(232,115,26,0.7)); }
}

@keyframes particle-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.4; }
  100% { transform: translateY(-200px) translateX(30px); opacity: 0; }
}

.cinzel { font-family: 'Cinzel', serif; }
.crimson { font-family: 'Crimson Pro', serif; }

.gold-glow {
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(212,160,23,0.5), 0 0 20px rgba(212,160,23,0.3);
}

.gold-glow-animate {
  animation: glow-pulse 3s ease-in-out infinite;
}

.ember-marker {
  animation: pulse-ember 2s ease-in-out infinite;
}

.leaflet-container {
  background: #0a0a0a !important;
}

.leaflet-control-zoom {
  border: 1px solid rgba(212,160,23,0.3) !important;
  background: rgba(26,26,26,0.9) !important;
}

.leaflet-control-zoom a {
  color: var(--gold) !important;
  background: rgba(26,26,26,0.9) !important;
  border-color: rgba(212,160,23,0.2) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(42,42,42,0.9) !important;
}

.ornate-border {
  border: 2px solid rgba(212,160,23,0.4);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 0 15px rgba(212,160,23,0.1);
  position: relative;
}

.ornate-border::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(212,160,23,0.15);
  pointer-events: none;
}

.souls-btn {
  background: linear-gradient(180deg, rgba(212,160,23,0.2) 0%, rgba(139,0,0,0.1) 100%);
  border: 2px solid rgba(212,160,23,0.6);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 8px rgba(212,160,23,0.4);
}

.souls-btn:hover {
  background: linear-gradient(180deg, rgba(212,160,23,0.35) 0%, rgba(139,0,0,0.2) 100%);
  border-color: var(--gold-light);
  box-shadow: 0 0 20px rgba(212,160,23,0.3), inset 0 0 10px rgba(212,160,23,0.1);
}

.souls-btn:active {
  transform: scale(0.97);
}

.dark-overlay {
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fog-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(212,160,23,0.02) 0%, transparent 70%);
  animation: fog-drift 15s ease-in-out infinite;
  pointer-events: none;
}

.message-marker-icon {
  width: 20px !important;
  height: 20px !important;
  margin-left: -10px !important;
  margin-top: -10px !important;
}

.bloodstain-marker-icon {
  width: 16px !important;
  height: 16px !important;
  margin-left: -8px !important;
  margin-top: -8px !important;
}

.leaflet-popup-content-wrapper {
  background: rgba(26,26,26,0.95) !important;
  border: 1px solid rgba(212,160,23,0.4) !important;
  border-radius: 4px !important;
  color: var(--ghost) !important;
}

.leaflet-popup-tip {
  background: rgba(26,26,26,0.95) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,160,23,0.5); }

.select-souls {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4a017' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}