/* ============================================================
   Bomberger Enterprises — Design System
   Matches FinancialAIguru design language
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base:     #080E17;
  --bg-surface:  #0E1724;
  --bg-elevated: #152232;
  --bg-hover:    #1A2A3E;

  /* Text */
  --text-primary:   #E8EFF5;
  --text-secondary: #A0AAB8;
  --text-muted:     #5A6478;

  /* Accents */
  --accent-cyan: #00D4FF;
  --accent-gold: #D4A843;
  --accent-cyan-dim: rgba(0, 212, 255, 0.15);
  --accent-gold-dim: rgba(212, 168, 67, 0.15);

  /* Status */
  --positive: #3FB950;
  --negative: #F85149;
  --warning:  #E3B341;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-cyan:   rgba(0, 212, 255, 0.3);
  --border-gold:   rgba(212, 168, 67, 0.3);

  /* Glow */
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.25), 0 0 40px rgba(0, 212, 255, 0.1);
  --glow-gold: 0 0 20px rgba(212, 168, 67, 0.25), 0 0 40px rgba(212, 168, 67, 0.1);

  /* Fonts */
  --font-display: 'Orbitron', 'Courier New', monospace;
  --font-body:    'Rajdhani', 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.4s ease;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--text-primary); }

/* ── Typography ─────────────────────────────────────────────── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-cyan      { color: var(--accent-cyan); }
.text-gold      { color: var(--accent-gold); }
.text-positive  { color: var(--positive); }
.text-negative  { color: var(--negative); }

.text-xs  { font-size: 0.75rem; }
.text-sm  { font-size: 0.875rem; }
.text-md  { font-size: 1rem; }
.text-lg  { font-size: 1.125rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 2rem; }
.text-4xl { font-size: 2.5rem; }

.font-light    { font-weight: 300; }
.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.1em; }
.tracking-wider { letter-spacing: 0.2em; }

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ── Spacing Utilities ──────────────────────────────────────── */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md  { padding: var(--space-md); }
.p-lg  { padding: var(--space-lg); }
.p-xl  { padding: var(--space-xl); }

/* ── Card Component ─────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition-normal),
              background var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.card-gold:hover {
  border-color: var(--border-gold);
  box-shadow: var(--glow-gold);
}

/* ── App Card ───────────────────────────────────────────────── */
.app-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-normal),
              background var(--transition-normal),
              box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-cyan-dim) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.app-card:hover::before { opacity: 1; }

.app-card:hover {
  border-color: var(--border-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
  background: var(--bg-elevated);
}

.app-card.coming-soon {
  cursor: default;
  opacity: 0.7;
}

.app-card.coming-soon:hover {
  transform: none;
  border-color: var(--border-subtle);
  box-shadow: none;
  background: var(--bg-surface);
}

.app-card.coming-soon::before { opacity: 0 !important; }

.app-card__icon {
  font-size: 2.5rem;
  line-height: 1;
}

.app-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.app-card__desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}

.app-card__arrow {
  font-size: 1.2rem;
  color: var(--accent-cyan);
  transition: transform var(--transition-fast);
  align-self: flex-end;
}

.app-card:hover .app-card__arrow { transform: translateX(4px); }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-cyan {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  border: 1px solid var(--border-cyan);
}

.badge-gold {
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.badge-muted {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-positive {
  background: rgba(63, 185, 80, 0.15);
  color: var(--positive);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  border: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-cyan);
  color: #080E17;
}

.btn-primary:hover {
  background: #33DDFF;
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--border-cyan);
}

.btn-outline:hover {
  background: var(--accent-cyan-dim);
  box-shadow: var(--glow-cyan);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.15);
}

.btn-danger {
  background: transparent;
  color: var(--negative);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.btn-danger:hover {
  background: rgba(248, 81, 73, 0.1);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
}

.btn-full { width: 100%; }

/* ── Form Inputs ────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input:focus::placeholder { opacity: 0.5; }

.form-input-icon {
  position: relative;
}

.form-input-icon input {
  padding-left: 44px;
}

.form-input-icon .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

/* ── Nav Bar ────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 14, 23, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--space-xl);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.navbar__logo span {
  color: var(--accent-cyan);
}

.navbar__logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-gold));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 900;
  color: #080E17;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.navbar__status {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.navbar__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse-dot 2s infinite;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-lg) 0;
}

.divider-labeled {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.divider-labeled::before,
.divider-labeled::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Section Header ─────────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Stat Block ─────────────────────────────────────────────── */
.stat-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.2); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes scan-line {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.animate-fade-in    { animation: fade-in 0.4s ease forwards; }
.animate-slide-up   { animation: slide-up 0.5s ease forwards; }
.animate-float      { animation: float 4s ease-in-out infinite; }
.animate-glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Responsive Breakpoints ─────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-md);
  }

  .navbar__logo {
    font-size: 0.8rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .hide-mobile { display: none; }
}

@media (max-width: 480px) {
  .navbar__status { display: none; }
}

/* ── Loading State ──────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Error / Alert ──────────────────────────────────────────── */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.alert-error {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  color: #FF8A85;
}

.alert-success {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  color: var(--positive);
}

.alert-info {
  background: var(--accent-cyan-dim);
  border: 1px solid var(--border-cyan);
  color: var(--accent-cyan);
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(0, 212, 255, 0.25);
  color: var(--text-primary);
}
