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

body {
    font-family: Arial, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Iframe embedding adjustments */
body.iframe-embed {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

#canvas-wrapper {
  width: 100vw;
  height: 100vh;
  overflow: auto;
  position: relative;
}

canvas {
  background: black;
  display: block;
  cursor: default;
  position: absolute;
  top: 0;
  left: 0;
}

#starCanvas {
  z-index: 100;
}

#topCanvas {
  background: transparent;
  z-index: 200;
  display: none; /* Hidden by default to not block DOM interactions */
}

#supporters-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

/* Supporter dot base styles */
.supporter-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
  z-index: 101;
}

/* Universal styling for all supporter objects (except nova/supernova which need backgrounds) */
.supporter-dot:not(.nova):not(.supernova) {
  background: transparent !important;
  box-shadow: none !important;
}

/* Remove this conflicting rule - now handled by universal scaling below */

/* Star-specific styling and animations */
.supporter-dot.star {
  border-radius: 0 !important;
  animation: twinkle 4s ease-in-out infinite, rotate 20s linear infinite;
}

/* Star animations and effects */
@keyframes twinkle {
  0%, 100% { 
    opacity: 0.6; 
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes rotate {
  from { 
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to { 
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Scaling for stars (smaller objects) */
.supporter-dot.star:hover {
  transform: translate(-50%, -50%) scale(var(--hover-scale-stars, 2.5)) !important;
  transition: transform 0.2s ease;
}

.supporter-dot.star.pinned {
  transform: translate(-50%, -50%) scale(var(--pinned-scale-stars, 3)) !important;
  transition: transform 0.2s ease;
}

/* UFO animations */
@keyframes ufoLights {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

/* Scaling for comets (bigger scaling for top-tier) */
.supporter-dot.comet:hover {
  transform: translate(-50%, -50%) scale(var(--hover-scale-comets, 4)) !important;
  transition: transform 0.2s ease;
}

.supporter-dot.comet.pinned {
  transform: translate(-50%, -50%) scale(var(--pinned-scale-comets, 5)) !important;
  transition: transform 0.2s ease;
}

/* Scaling for nebulae and galaxies (larger objects) */
.supporter-dot.nebula:hover,
.supporter-dot.galaxy:hover,
.supporter-dot.nova:hover,
.supporter-dot.supernova:hover,
.supporter-dot.ufo:hover {
  transform: translate(-50%, -50%) scale(var(--hover-scale-large, 5)) !important;
  transition: transform 0.2s ease;
}

.supporter-dot.nebula.pinned,
.supporter-dot.galaxy.pinned,
.supporter-dot.nova.pinned,
.supporter-dot.supernova.pinned,
.supporter-dot.ufo.pinned {
  transform: translate(-50%, -50%) scale(var(--pinned-scale-large, 6)) !important;
  transition: transform 0.2s ease;
}

/* Universal brightness effects removed - too bright for comets */

/* Fixed Search Styles */
#fixed-search {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Removed navigation logo styles - no longer needed */

/* Removed lens flare effects - no longer needed without navigation */

/* Removed full-flare - no longer needed */

/* Search styles moved to #fixed-search */

.search-toggle {
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-toggle:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.search-container {
  position: absolute;
  right: 0;
  bottom: 50px;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.search-container.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

#search-input {
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  padding: 10px 15px;
  flex: 1;
  outline: none;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-clear {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-clear:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

/* Search highlight styles - minimal impact on layout */
.supporter-dot.search-highlight {
  outline: 3px solid rgba(255, 255, 0, 0.8) !important;
  outline-offset: 2px !important;
  animation: searchBlink 1s infinite !important;
  z-index: 999 !important;
}

@keyframes searchBlink {
  0%, 50% {
    outline-color: rgba(255, 255, 0, 0.9);
  }
  51%, 100% {
    outline-color: rgba(255, 255, 0, 0.3);
  }
}

/* Adjust canvas wrapper to account for nav */
#canvas-wrapper {
  width: 100vw;
  height: 100vh;
  overflow: auto;
}


/* Tooltip styling */
#tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: #fff4ea;
  padding: 15px 36px 15px 15px;
  border-radius: 8px;
  font-size: 14px;
  min-width: 250px;  /* TOOLTIP_CONFIG.MIN_WIDTH */
  width: max-content;
  max-width: 300px;  /* TOOLTIP_CONFIG.MAX_WIDTH */
  z-index: 1000;
  display: none;
  border: 2px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

/* Social media links in tooltips */
#tooltip .social-link {
  color: #9bb0ff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  font-size: 16px;
  font-weight: bold;
  vertical-align: bottom;
}

#tooltip .social-link:hover {
  color: #6ba3e8;
  text-decoration: underline;
}

/* Nebula/Galaxy/Comet links in tooltips */
#tooltip .nebula-link,
#tooltip .galaxy-link,
#tooltip .comet-link {
  color: #e8a54a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  display: block;
  margin-top: 5px;
  text-align: right;
  margin-right: -25px;
}

#tooltip .nebula-link:hover,
#tooltip .galaxy-link:hover,
#tooltip .comet-link:hover {
  color: #e8b86a;
  text-decoration: underline;
}

/* Social media icons */
#tooltip .fab,
#tooltip .fas {
  margin-right: 8px;
  color: #4a90e2;
  width: 16px;
  text-align: center;
}

/* Close button */
.close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  color: #ccc;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: white;
}

#tooltip .close-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#tooltip .close-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

#tooltip strong {
  display: block;
  color: #fff4ea;
  font-size: 1.2rem;
}

#tooltip .supporter-tier {
  color: lightgray;
  text-transform: uppercase;
  font-size: 0.7rem;
}

#tooltip .object-description {
  color: lightgray;
  font-size: 0.8rem;
  line-height: 1rem;
}

#tooltip .social-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  color: #9bb0ff;
  width: 16px;
  text-align: center;
}

/* Full-screen supporter takeover */
.supporter-takeover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}

.supporter-takeover.hidden {
  opacity: 0;
  pointer-events: none;
}

.takeover-content {
  text-align: center;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.supporter-takeover h1 {
  font-family: 'ethnocentric', Arial, sans-serif;
  font-size: 4rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  animation: takeoverPulse 2s ease-in-out infinite;
}

.supporter-takeover h2 {
  font-family: 'ethnocentric', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 300;
  margin: 0;
  letter-spacing: 2px;
  opacity: 0.9;
}

@keyframes takeoverPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  }
  50% {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(255, 255, 255, 1);
  }
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .supporter-takeover h1 {
    font-size: 2.5rem;
    letter-spacing: 2px;
  }
  
  .supporter-takeover h2 {
    font-size: 1.2rem;
    letter-spacing: 1px;
  }
}