/* fonts and stuff, skidded from github */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=JetBrains+Mono:wght@300;400&display=swap');

/* main styles */
@import url(themes.css);
@import url(main.css);
@import url(nav.css);

/* custom font i found somewhere */
@font-face {
  font-family: "gg sans";
  font-style: normal;
  font-weight: 400;
  src: url(/assets/fonts/ggsans.woff2) format("woff2");
  font-display: swap;
}

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

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

/* trying to set font but it keeps overriding??? */
body, html, div, span, p, a, button, input {
  font-family: "JetBrains Mono", monospace;
  font-weight: 400;
}

body {
  background: var(--background);
  color: var(--text-color);
  min-height: 100vh;
  position: relative;
  text-align: center;
}

/* animated grid thingy */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -3;
  
  --grid-size: 42px;
  --grid-line: rgba(255, 255, 255, 0.08);
  --grid-glow: rgba(255, 255, 255, 0.03);
  
  background-image: 
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, var(--grid-glow), transparent 55%);
    
  background-size: 
    var(--grid-size) var(--grid-size),
    var(--grid-size) var(--grid-size),
    900px 900px;
    
  animation: driftGrid 14s linear infinite;
}

/* stars background, inspo from truffled */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.95) 1px, transparent 2px);
  background-size: 220px 220px, 340px 340px, 520px 520px;
  opacity: 0.55;
  animation: driftStars 40s linear infinite, twinkleStars 6s ease-in-out infinite;
}

/* animations from chatgpt */
@keyframes driftGrid {
  0% {
    background-position: 0 0, 0 0, 0 0;
  }
  100% {
    background-position: var(--grid-size) var(--grid-size), calc(var(--grid-size) * -1) var(--grid-size), 220px 120px;
  }
}

@keyframes driftStars {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: -220px 180px, 260px -320px, -520px 240px; }
}

@keyframes twinkleStars {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 0.70; }
}

/* online counter, shows how many people are playing right now - thank you claude */
.bottomStatus {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 14px;
  text-align: center;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.bottomStatus span:first-child {
  font-weight: 600;
  color: #a855f7;
}

/* performance mode for my ipads */
@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

.lowPowerMode body::before,
.lowPowerMode body::after,
.powerSaving body::before,
.powerSaving body::after {
  animation: none !important;
  background-image: none !important;
}

.lowPowerMode canvas,
.powerSaving canvas {
  display: none !important;
}

.lowPowerMode .glass-card,
.lowPowerMode .glass-panel,
.powerSaving .glass-card,
.powerSaving .glass-panel {
  backdrop-filter: none !important;
}

.lowPowerMode *,
.powerSaving * {
  transition: none !important;
  box-shadow: none !important;
}

.lowPowerMode body,
.powerSaving body {
  background: #0f0f16 !important;
}

/* mobile stuff idek */
@media (max-width: 900px) {
  body {
    background: linear-gradient(135deg, #3b0a3f 0%, #5b1a6e 40%, #3c1361 100%) !important;
  }
  
  body::before,
  body::after {
    opacity: 0.75 !important;
  }
  
  canvas {
    opacity: 0.9;
  }
}