@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Midas Brand Colors (getmidas.com rebrand-min.css) */
  --midas-indigo: #4959EA;
  --midas-indigo-hover: #6D7AEE;
  --midas-indigo-soft: #90A0FF;
  --midas-indigo-tint: #EAE8FF;

  /* Dark Surfaces (Web Trader / Pro) */
  --bg-dark: #101114;
  --surface-dark: #16171C;
  --surface-dark-2: #1E2028;
  --border-dark: #2B2A35;

  /* Light Surfaces (Presentation / Brand) */
  --bg-light: #FFFFFF;
  --surface-light: #F0F3F7;
  --border-light: #D8DDE5;

  /* Typography Colors */
  --text-dark: #101114;
  --text-dark-2: #2B2A35;
  --text-muted: #697180;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: #A1A7B2;

  /* Market Status Colors */
  --up: #00C875;
  --down: #EA3943;

  /* Active Theme Semantic Defaults (Light) */
  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-elevated: #FFFFFF;
  --border: var(--border-light);
  --text: var(--text-dark);
  --text-secondary: var(--text-dark-2);
  --text-sub: var(--text-muted);

  /* Typography & Radii */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 17, 20, 0.05);
  --shadow-md: 0 8px 24px rgba(16, 17, 20, 0.08);
  --shadow-indigo: 0 8px 24px rgba(73, 89, 234, 0.22);
}

[data-theme="dark"] {
  --bg: var(--bg-dark);
  --surface: var(--surface-dark);
  --surface-elevated: var(--surface-dark-2);
  --border: var(--border-dark);
  --text: var(--text-on-dark);
  --text-secondary: #D8DDE5;
  --text-sub: var(--text-on-dark-muted);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
}

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

html, body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Badges & Pills */
.midas-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--midas-indigo-tint);
  color: var(--midas-indigo);
}

[data-theme="dark"] .midas-badge {
  background: rgba(73, 89, 234, 0.18);
  color: var(--midas-indigo-soft);
}

.midas-badge--solid {
  background: var(--midas-indigo);
  color: #FFFFFF;
}

.midas-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-sub);
}

/* Buttons */
.midas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.midas-btn--primary {
  background: var(--midas-indigo);
  color: #FFFFFF;
}

.midas-btn--primary:hover {
  background: var(--midas-indigo-hover);
}

.midas-btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.midas-btn--ghost:hover {
  background: var(--surface);
  border-color: var(--midas-indigo-soft);
}

/* Cards */
.midas-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.midas-card--muted {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.midas-card--placeholder {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Grid Helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* 16:9 Slide Container */
.slide-stage {
  width: min(1240px, calc(100vw - 48px));
  aspect-ratio: 16 / 9;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Market Indicators */
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot--up {
  background: var(--up);
  box-shadow: 0 0 8px rgba(0, 200, 117, 0.6);
}

.status-dot--down {
  background: var(--down);
}

@media (max-width: 900px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .slide-stage {
    aspect-ratio: auto;
    min-height: 75vh;
    padding: 28px 24px;
  }
}
