body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

#loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Dot grid animation - game theme */
.dot-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.dot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 120px;
  height: 120px;
}

.dot-cell {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7c3aed;
  animation: dot-pulse 2s ease-in-out infinite;
}

.dot-cell:nth-child(1)  { animation-delay: 0.00s; }
.dot-cell:nth-child(2)  { animation-delay: 0.08s; }
.dot-cell:nth-child(3)  { animation-delay: 0.16s; }
.dot-cell:nth-child(4)  { animation-delay: 0.24s; }
.dot-cell:nth-child(5)  { animation-delay: 0.32s; }
.dot-cell:nth-child(6)  { animation-delay: 0.08s; }
.dot-cell:nth-child(7)  { animation-delay: 0.16s; }
.dot-cell:nth-child(8)  { animation-delay: 0.24s; }
.dot-cell:nth-child(9)  { animation-delay: 0.32s; }
.dot-cell:nth-child(10) { animation-delay: 0.40s; }
.dot-cell:nth-child(11) { animation-delay: 0.16s; }
.dot-cell:nth-child(12) { animation-delay: 0.24s; }
.dot-cell:nth-child(13) { animation-delay: 0.32s; }
.dot-cell:nth-child(14) { animation-delay: 0.40s; }
.dot-cell:nth-child(15) { animation-delay: 0.48s; }
.dot-cell:nth-child(16) { animation-delay: 0.24s; }
.dot-cell:nth-child(17) { animation-delay: 0.32s; }
.dot-cell:nth-child(18) { animation-delay: 0.40s; }
.dot-cell:nth-child(19) { animation-delay: 0.48s; }
.dot-cell:nth-child(20) { animation-delay: 0.56s; }
.dot-cell:nth-child(21) { animation-delay: 0.32s; }
.dot-cell:nth-child(22) { animation-delay: 0.40s; }
.dot-cell:nth-child(23) { animation-delay: 0.48s; }
.dot-cell:nth-child(24) { animation-delay: 0.56s; }
.dot-cell:nth-child(25) { animation-delay: 0.64s; }

@keyframes dot-pulse {
  0%, 100% {
    transform: scale(0.3);
    opacity: 0.2;
    background: #7c3aed;
  }
  50% {
    transform: scale(1);
    opacity: 1;
    background: #a78bfa;
  }
}

.loading-text {
  margin-top: 32px;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  font-weight: 500;
}

.dots {
  display: inline-block;
  width: 20px;
}

.dot-text {
  animation: blink 1.4s infinite;
  animation-fill-mode: both;
}

.dot-text:nth-child(2) {
  animation-delay: 0.2s;
}

.dot-text:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}
