:root {
  --bg-base: #06090e;
  --bg-surface: #0d121d;
  --bg-card: #131a29;
  --bg-card-hover: #192236;
  --border-color: rgba(212, 175, 55, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(212, 175, 55, 0.5);

  --gold-primary: #d4af37;
  --gold-light: #f5d76e;
  --gold-glow: rgba(212, 175, 55, 0.25);

  --bull-green: #00f090;
  --bull-green-glow: rgba(0, 240, 144, 0.2);
  --bear-red: #ff3b5c;
  --bear-red-glow: rgba(255, 59, 92, 0.2);

  --blue-neon: #1e90ff;
  --cyan-neon: #00d2ff;
  --purple-neon: #a855f7;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --header-height: 60px;
  --nav-height: 68px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  user-select: none;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px);
}

/* App Header - Fixed Top Bar */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(13, 18, 29, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-primary), #996515);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 0 12px var(--gold-glow);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-title span {
  color: var(--gold-primary);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(0, 240, 144, 0.12);
  border: 1px solid rgba(0, 240, 144, 0.3);
  color: var(--bull-green);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bull-green);
  box-shadow: 0 0 8px var(--bull-green);
  animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* App Main Container */
.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 14px) 14px 14px 14px;
}

/* View Sections */
.tab-view {
  display: none;
  animation: fadeIn 0.25s ease-out forwards;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(13, 18, 29, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.nav-btn {
  flex: 1;
  height: 52px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  touch-action: manipulation;
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.2s ease, stroke 0.2s ease;
}

.nav-btn span {
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  transition: color 0.2s ease;
}

.nav-btn.active {
  color: var(--gold-primary);
}

.nav-btn.active svg {
  transform: translateY(-2px) scale(1.1);
  stroke: var(--gold-primary);
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.nav-btn.active span {
  color: var(--gold-primary);
  font-weight: 700;
}

.nav-badge-pill {
  position: absolute;
  top: 4px;
  right: 22%;
  background: var(--bear-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  line-height: 1.2;
}

/* Utilities */
.text-gold { color: var(--gold-primary) !important; }
.text-bull { color: var(--bull-green) !important; }
.text-bear { color: var(--bear-red) !important; }
.text-blue { color: var(--blue-neon) !important; }
.text-muted { color: var(--text-muted) !important; }

.font-mono { font-family: var(--font-mono); }
