/*
 * X1 Radio — Base Styles
 * Resets, body, backgrounds, overlays, shared DOS components, typography, animations
 */

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

body {
  background: var(--bg-black);
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

/* ===== BACKGROUND LAYERS ===== */
.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1534796636912-3b95b3ab5986?w=2560&q=90');
  background-size: cover;
  background-position: center top;
  z-index: 0;
}

.dark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-black);
  opacity: 0.8;
  z-index: 1;
}

.gradient-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 1) 100%);
  z-index: 2;
  pointer-events: none;
}

#meshCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

/* ===== SHARED DOS PANEL COMPONENTS ===== */
.dos-titlebar {
  background: var(--dos-titlebar-bg);
  color: var(--dos-titlebar-fg);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-dos);
}

/* ===== DOS DROPDOWN (shared component) ===== */
.dos-dropdown {
  position: relative;
  display: inline-block;
}

.dos-dropdown-btn {
  background: var(--dos-navy);
  color: var(--neon-green);
  border: 2px inset var(--dos-border);
  font-family: 'VT323', monospace;
  font-size: 12px;
  padding: 2px 20px 2px 6px;
  cursor: pointer;
  outline: none;
  min-width: 90px;
  text-align: left;
}

.dos-dropdown-btn::after {
  content: '\25BC';
  position: absolute;
  right: 6px;
  font-size: 8px;
}

.dos-dropdown-btn:hover {
  background: var(--dos-navy-hover);
  border-color: var(--neon-green);
}

.dos-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dos-navy);
  border: 2px outset var(--dos-border);
  min-width: 100%;
  z-index: 1000;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}

.dos-dropdown.open .dos-dropdown-menu {
  display: block;
}

.dos-dropdown-item {
  padding: 4px 8px;
  color: var(--neon-green);
  font-family: 'VT323', monospace;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--dos-navy-dark);
}

.dos-dropdown-item:last-child {
  border-bottom: none;
}

.dos-dropdown-item:hover {
  background: var(--dos-navy-hover);
  color: var(--text-primary);
}

.dos-dropdown-item.selected {
  background: var(--dos-navy-dark);
  color: var(--neon-green);
}

.dos-dropdown-item.selected::before {
  content: '\25BA ';
}

/* ===== DOS SELECT (DIMENSION panel variant) ===== */
.dos-select {
  flex: 1;
  position: relative;
}

.dos-select-btn {
  width: 100%;
  background: var(--bg-black);
  border: 1px solid var(--border-panel);
  color: var(--neon-green);
  font-family: var(--font-dos);
  font-size: 11px;
  padding: 4px 8px;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dos-select-btn:hover {
  border-color: var(--neon-green);
}

.dos-select-btn::after {
  content: '\25BC';
  font-size: 8px;
  margin-left: 8px;
}

.dos-select-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-black);
  border: 1px solid var(--neon-green);
  z-index: 1000;
  max-height: 150px;
  overflow-y: auto;
}

.dos-select.open .dos-select-menu {
  display: block;
}

.dos-select-option {
  padding: 4px 8px;
  cursor: pointer;
  font-family: var(--font-dos);
  font-size: 11px;
  color: var(--neon-green);
}

.dos-select-option:hover {
  background: var(--dos-green-dark);
}

.dos-select-option.selected {
  background: var(--dos-green-selected);
}

/* ===== ANIMATIONS ===== */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4); }
  50% { box-shadow: 0 0 0 20px rgba(0, 255, 0, 0); }
}

/* ===== WALLET LOCK OVERLAY (shared across panels) ===== */
.wallet-lock-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-muted);
  text-align: center;
}

.wallet-lock-overlay .lock-message {
  font-family: var(--font-dos);
  font-size: 12px;
  color: var(--neon-yellow);
  margin-bottom: 12px;
}

/* ===== POPUP OVERLAY (shared modal) ===== */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.popup-overlay.open {
  display: flex;
}

.popup {
  background: rgba(0, 0, 128, 0.5);
  backdrop-filter: blur(10px);
  border: 3px double var(--dos-border);
  border-radius: 0;
  padding: 0;
  max-width: 450px;
  position: relative;
}

.popup .dos-titlebar {
  padding: 3px 10px;
  font-size: 12px;
}

.popup .dos-titlebar span {
  color: var(--dos-titlebar-fg);
}

.popup .dos-content {
  padding: 16px 20px;
}

.popup p {
  font-family: var(--font-dos);
  font-size: 13px;
  color: var(--dos-border);
  line-height: 1.7;
  margin-bottom: 12px;
}

.popup p:last-child {
  margin-bottom: 0;
}

.popup strong {
  color: var(--neon-green);
}

.popup .highlight {
  color: var(--neon-cyan);
}

/* ===== DEV BUILD INDICATOR ===== */
.dev-build-indicator {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--color-dev);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 10px;
  padding: 2px 12px;
  border-radius: 0 0 4px 4px;
}

/* ===== FPS OVERLAY ===== */
.fps-overlay {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  background: rgba(0, 0, 0, 0.9);
  color: var(--neon-green);
  font-family: monospace;
  font-size: 11px;
  padding: 6px 12px;
  border: 1px solid var(--neon-green);
  pointer-events: none;
  display: flex;
  gap: 12px;
}

/* ===== DOS CLOSE BUTTON ===== */
.dos-close-btn {
  cursor: pointer;
}

/* ===== HIDDEN BY DEFAULT (JS toggles visibility) ===== */
.hidden-default {
  display: none;
}

/* ===== MARIO EASTER EGG ===== */
#mario-canvas {
  position: fixed;
  bottom: 70%;
  left: -150px;
  width: 128px;
  height: 160px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 9999;
  pointer-events: none;
  display: none;
}
