/* ===== Block Party — Aura Build Design System ===== */
/* Clean dark fintech aesthetic with emerald accents    */

* {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0A0B0E;
  color: #e5e5e5;
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Deep dark background with subtle warmth */
#root {
  background: #0A0B0E;
  position: relative;
}

/* Subtle noise grain for texture depth */
#root::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Ensure all content sits above the noise layer */
#root > * {
  position: relative;
  z-index: 1;
}

:root {
  /* Backgrounds — deep blue-black palette */
  --bg-primary: #0A0B0E;
  --bg-secondary: #0F1117;
  --bg-tertiary: #14181F;
  --bg-elevated: #1A1F2E;

  /* Nested surfaces */
  --bg-inset: #0A0B0E;

  /* Text — clean neutrals */
  --text-primary: #e5e5e5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --text-dim: #525252;

  /* Primary accent — emerald */
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-dim: #059669;
  --accent-glow: rgba(16, 185, 129, 0.8);

  /* Secondary accents */
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-green: #22c55e;
  --accent-cyan: #06b6d4;
  --accent-purple: #a78bfa;

  /* Translucent borders */
  --border: rgba(255, 255, 255, 0.1);
  --border-dim: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(16, 185, 129, 0.4);

  /* Button surfaces */
  --btn-bg: rgba(255, 255, 255, 0.05);
  --btn-bg-hover: rgba(255, 255, 255, 0.1);

  /* Glass */
  --glass-bg: rgba(10, 11, 14, 0.9);
  --glass-border: rgba(255, 255, 255, 0.08);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.06) transparent; }

/* ===== Card — translucent surface with soft border ===== */
.retro-card {
  background: #0F1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* ===== Inset Panel — nested surface ===== */
.inset-panel {
  background: #14181F;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== Button — translucent surface ===== */
.retro-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e5e5;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.retro-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}
.retro-btn:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(1px);
}

/* Ghost variant */
.retro-btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}
.retro-btn-ghost:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

/* ===== CTA Button — emerald glow action ===== */
.cta-btn-wrap {
  position: relative;
}
.cta-btn-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, #10b981, #34d399, #10b981);
  opacity: 0.5;
  filter: blur(6px);
  z-index: 0;
}
.cta-btn {
  position: relative;
  z-index: 1;
  background: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: white;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}
.cta-btn:hover {
  background: #059669;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.5);
}

/* ===== Input — clean recessed field ===== */
.retro-input {
  width: 100%;
  background: #14181F;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e5e5e5;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}
.retro-input::placeholder {
  color: #525252;
}
.retro-input:focus {
  outline: none;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

/* ===== Status LED dots ===== */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot-live {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  animation: led-pulse 2s ease-in-out infinite;
}
.status-dot-green {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}
.status-dot-red {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}
@keyframes led-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(16, 185, 129, 0.8); }
  50% { opacity: 0.6; box-shadow: 0 0 4px rgba(16, 185, 129, 0.5); }
}

/* ===== Gradient Text ===== */
.text-gradient-emerald,
.text-gradient-violet {
  background: linear-gradient(135deg, #10b981, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-blue {
  background: linear-gradient(135deg, #10b981, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-green {
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Glass Cards ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* ===== Shimmer / Shine Effect ===== */
@keyframes shine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.text-shine {
  background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 6s ease-in-out infinite;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 { letter-spacing: -0.02em; font-weight: 700; }

/* ===== Animations ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.animate-fade-in-up { animation: fadeInUp 0.4s ease-out forwards; }
.animate-fade-in-scale { animation: fadeInScale 0.3s ease-out forwards; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}
.shimmer {
  background: linear-gradient(90deg, rgba(16,185,129,0.02) 0%, rgba(16,185,129,0.06) 50%, rgba(16,185,129,0.02) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2.5s infinite;
}

/* ===== Glow effects ===== */
.glow-violet { box-shadow: 0 0 24px rgba(16, 185, 129, 0.25); }
.glow-blue { box-shadow: 0 0 24px rgba(16, 185, 129, 0.15); }
.glow-green { box-shadow: 0 0 24px rgba(34, 197, 94, 0.15); }
.glow-red { box-shadow: 0 0 24px rgba(239, 68, 68, 0.15); }

/* ===== Number inputs ===== */
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ===== Focus ring ===== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
}

/* ===== Scrollbar thin utility ===== */
.scrollbar-thin::-webkit-scrollbar { width: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 2px; }

/* ===== Mobile Safe Areas ===== */
.safe-top { padding-top: env(safe-area-inset-top, 0px); }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); }

@media (max-width: 768px) {
  .scrollbar-hide::-webkit-scrollbar { display: none; }
  .scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
  .scroll-touch { -webkit-overflow-scrolling: touch; }
  html { -webkit-text-size-adjust: 100%; }
  button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
}

@media (hover: none) {
  .card:hover { transform: none; }
}

@supports (padding-top: env(safe-area-inset-top)) {
  .safe-header { padding-top: env(safe-area-inset-top); }
  .safe-nav { padding-bottom: env(safe-area-inset-bottom); }
}
