/* ============================================================
   CRYPTO PREDICT – Global Stylesheet
   Dark mode, glassmorphism, neon accents
   ============================================================ */

/* ---------- CSS Variables / Theme ---------- */
:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #111827;
  --bg-card:       rgba(17, 24, 39, 0.7);
  --bg-glass:      rgba(255, 255, 255, 0.04);

  --neon-cyan:     #00f5ff;
  --neon-purple:   #a855f7;
  --neon-green:    #22c55e;
  --neon-red:      #ef4444;
  --neon-yellow:   #eab308;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  --border:        rgba(255, 255, 255, 0.08);
  --border-glow:   rgba(0, 245, 255, 0.3);

  --font-main:     'Inter', system-ui, -apple-system, sans-serif;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow:        0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-neon:   0 0 20px rgba(0, 245, 255, 0.15);
  --transition:    0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--neon-cyan); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-purple); }

a { color: var(--neon-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--neon-purple); }

img { max-width: 100%; height: auto; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { color: var(--text-secondary); }

/* ---------- Glassmorphism Cards ---------- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-neon);
}
.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--neon-cyan);
  white-space: nowrap;
}
.navbar-brand span { font-size: 1.5rem; }

.navbar-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}
.navbar-search input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.navbar-search input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 3px rgba(0,245,255,0.1); }
.navbar-search input::placeholder { color: var(--text-muted); }
.navbar-search .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--neon-cyan);
  background: rgba(0,245,255,0.08);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  outline: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: #000;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,245,255,0.3); }

.btn-donate {
  background: linear-gradient(135deg, var(--neon-green), #16a34a);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
}
.btn-donate:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(34,197,94,0.4); }

.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(0,245,255,0.05); }

.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.05rem; border-radius: 12px; }

/* ---------- Autocomplete Dropdown ---------- */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius);
  max-height: 300px;
  overflow-y: auto;
  z-index: 2000;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.highlighted { background: rgba(0,245,255,0.08); }
.autocomplete-item .coin-symbol { color: var(--neon-cyan); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }

/* ---------- Hero Section (index.html) ---------- */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(0,245,255,0.07) 0%, transparent 70%),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(168,85,247,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0,245,255,0.1);
  border: 1px solid rgba(0,245,255,0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--neon-cyan);
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.6s ease;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 50%, var(--neon-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: fadeInDown 0.8s ease;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeIn 1s ease;
}
.hero-search {
  width: 100%;
  max-width: 520px;
  margin: 0 auto 2rem;
  position: relative;
  animation: fadeInUp 0.8s ease;
}
.hero-search input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3rem;
  font-size: 1rem;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-search input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 0 4px rgba(0,245,255,0.1), 0 0 30px rgba(0,245,255,0.15); }
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--neon-cyan);
  pointer-events: none;
}
.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 1s ease;
}

/* ---------- Quick Stats Bar ---------- */
.quick-stats {
  width: 100%;
  overflow-x: auto;
  padding: 1rem 1.5rem;
  background: rgba(17,24,39,0.8);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0;
}
.quick-stats::-webkit-scrollbar { height: 3px; }
.quick-stat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.quick-stat-item:last-child { border-right: none; }
.quick-stat-name { font-size: 0.8rem; color: var(--text-muted); }
.quick-stat-price { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.quick-stat-change { font-size: 0.8rem; font-weight: 600; }

/* ---------- Dashboard Layout ---------- */
.dashboard-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  grid-template-rows: auto auto;
  gap: 1.25rem;
  align-items: start;
}
.dashboard-left { grid-column: 1; }
.dashboard-center { grid-column: 2; }
.dashboard-right { grid-column: 3; }
.dashboard-bottom { grid-column: 1 / -1; }

/* ---------- Coin Selector Panel ---------- */
.coin-selector-input {
  position: relative;
  margin-bottom: 1rem;
}
.coin-selector-input input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--transition);
}
.coin-selector-input input:focus { border-color: var(--neon-cyan); }
.coin-selector-input input::placeholder { color: var(--text-muted); }
.coin-selector-input .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* ---------- Market Data Metrics ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.metric-item {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}
.metric-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.metric-value { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }

.price-display {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.price-main {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.price-change-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

/* ---------- Fear & Greed ---------- */
.fear-greed-widget {
  text-align: center;
  padding: 1rem;
}
.fear-greed-value {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}
.fear-greed-label {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fear-greed-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--neon-red), var(--neon-yellow), var(--neon-green));
  margin: 0.75rem 0 0.25rem;
  position: relative;
}
.fear-greed-indicator {
  position: absolute;
  top: -3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
  transition: left 1s ease;
}

/* ---------- Trending Coins ---------- */
.trending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.trending-rank {
  font-size: 0.7rem;
  color: var(--text-muted);
  width: 1.25rem;
}
.trending-name {
  flex: 1;
  font-size: 0.875rem;
  margin: 0 0.5rem;
}
.trending-symbol {
  font-size: 0.75rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
}

/* ---------- Charts ---------- */
.chart-container {
  position: relative;
  width: 100%;
}
.chart-timeframe {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}
.timeframe-btn {
  padding: 0.3rem 0.625rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  outline: none;
}
.timeframe-btn:hover, .timeframe-btn.active {
  background: rgba(0,245,255,0.1);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

/* ---------- Prediction Cards ---------- */
.prediction-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all var(--transition);
}
.prediction-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 16px rgba(0,245,255,0.1);
}
.prediction-timeframe {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.prediction-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.prediction-change {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.confidence-bar-wrap {
  margin-bottom: 0.5rem;
}
.confidence-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.confidence-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  transition: width 1s ease;
  animation: shimmer 2s infinite;
}

/* ---------- Signal Badges ---------- */
.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulseglow 2s infinite;
}
.signal-buy  { background: rgba(34,197,94,0.15); color: var(--neon-green); border: 1px solid rgba(34,197,94,0.3); }
.signal-sell { background: rgba(239,68,68,0.15); color: var(--neon-red);   border: 1px solid rgba(239,68,68,0.3); }
.signal-hold { background: rgba(234,179,8,0.15); color: var(--neon-yellow); border: 1px solid rgba(234,179,8,0.3); }

/* ---------- MA / MACD Row ---------- */
.indicator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.indicator-row:last-child { border-bottom: none; }
.indicator-label { color: var(--text-muted); }
.indicator-value { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Bottom Panel ---------- */
.market-intel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.coin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.coin-list-item:last-child { border-bottom: none; }
.coin-list-name { font-weight: 600; }
.coin-list-price { color: var(--text-secondary); font-variant-numeric: tabular-nums; }

/* ---------- Donate Page ---------- */
.donate-hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
}
.donate-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(34,197,94,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.wallet-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--bg-glass);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius);
  margin: 1.5rem auto;
  max-width: 600px;
  flex-wrap: wrap;
}
.wallet-address {
  flex: 1;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: var(--neon-green);
  word-break: break-all;
}
.qr-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}
.qr-container canvas { border-radius: var(--radius); border: 4px solid var(--bg-secondary); }

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 2rem auto;
  max-width: 900px;
}
.tier-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.tier-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 20px rgba(34,197,94,0.15);
  transform: translateY(-2px);
}
.tier-emoji { font-size: 2rem; margin-bottom: 0.5rem; }
.tier-label { font-weight: 700; margin-bottom: 0.25rem; }
.tier-amount { font-size: 0.85rem; color: var(--neon-green); font-weight: 600; }

.thankyou-card {
  background: linear-gradient(135deg, rgba(34,197,94,0.1), rgba(0,245,255,0.05));
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  margin: 2rem auto;
  display: none;
  animation: fadeInUp 0.5s ease;
}
.thankyou-card.visible { display: block; }
.thankyou-emoji { font-size: 3rem; }

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: all;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  border-left: 4px solid var(--neon-cyan);
  max-width: 320px;
}
.toast-success { border-left-color: var(--neon-green); }
.toast-error   { border-left-color: var(--neon-red); }
.toast-info    { border-left-color: var(--neon-cyan); }

/* ---------- Skeleton Loader ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-glass) 25%, rgba(255,255,255,0.07) 50%, var(--bg-glass) 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.5s infinite;
}
.skeleton-text { height: 1em; margin-bottom: 0.5rem; }
.skeleton-box  { height: 120px; }

/* ---------- Auto-refresh Timer ---------- */
.refresh-timer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-green);
  animation: pulseglow 1.5s infinite;
}

/* ---------- Donation Banner ---------- */
.donation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(0,245,255,0.05));
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius);
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.donation-banner-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.donation-banner-text strong { color: var(--neon-green); }
.donation-banner-addr {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* ---------- Footer ---------- */
footer {
  margin-top: 3rem;
  padding: 2rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(10,10,15,0.8);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neon-cyan);
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
}
.footer-donate {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}
.footer-donate code {
  font-size: 0.72rem;
  color: var(--neon-green);
  background: rgba(34,197,94,0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  word-break: break-all;
}
.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ---------- Section Headers ---------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.section-title span { color: var(--neon-cyan); margin-right: 0.4rem; }

/* ---------- Color Utilities ---------- */
.text-green  { color: var(--neon-green) !important; }
.text-red    { color: var(--neon-red)   !important; }
.text-cyan   { color: var(--neon-cyan)  !important; }
.text-purple { color: var(--neon-purple)!important; }
.text-yellow { color: var(--neon-yellow)!important; }
.text-muted  { color: var(--text-muted) !important; }

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes pulseglow {
  0%, 100% { box-shadow: 0 0 6px currentColor; opacity: 1; }
  50%       { box-shadow: 0 0 14px currentColor; opacity: 0.8; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes neonFlicker {
  0%, 95%, 100% { opacity: 1; }
  96%, 98%      { opacity: 0.6; }
}

.animate-fade-in    { animation: fadeIn 0.5s ease; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease; }
.spin { animation: spin 1s linear infinite; }

/* ---------- Loading Spinner ---------- */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: 260px 1fr 280px;
  }
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-left  { grid-column: 1; }
  .dashboard-center{ grid-column: 1 / -1; order: -1; }
  .dashboard-right { grid-column: 2; }
  .dashboard-bottom{ grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  /* Full-width body, no horizontal overflow */
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100dvh;
  }

  /* Prevent any element from causing horizontal scroll */
  img, video, canvas, svg, iframe {
    max-width: 100%;
  }

  /* Navbar: hide search, allow actions to wrap */
  .navbar-search { display: none; }
  .navbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .navbar-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Dashboard grid: single column */
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-left, .dashboard-center, .dashboard-right, .dashboard-bottom {
    grid-column: 1;
  }
  .dashboard-center { order: -1; }
  .dashboard-container {
    padding: 0.75rem;
    width: 100%;
    max-width: 100%;
  }

  /* Cards and panels */
  .card, .card-glass, .panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Chart containers */
  .chart-container {
    width: 100%;
    max-width: 100%;
    height: 220px;
  }
  canvas {
    max-width: 100%;
  }

  /* Hero: fit full mobile screen */
  .hero {
    min-height: 100dvh;
    padding: 1.5rem 1rem;
  }
  .hero-search {
    width: 100%;
    max-width: 100%;
    padding: 0 0.5rem;
  }
  .hero-search input {
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
  }
  .hero-cta {
    flex-direction: column;
    width: 100%;
    padding: 0 0.5rem;
  }
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  /* Quick stats bar: horizontal scroll on mobile */
  .quick-stats {
    padding: 0.75rem 1rem;
  }

  /* Market intel grid */
  .market-intel-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-donate { text-align: center; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .dashboard-container { padding: 0.75rem; }
  .navbar { padding: 0.6rem 1rem; }
  .card { padding: 1rem; }
  .market-intel-grid { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2rem; }

  /* Smaller chart height on very small screens */
  .chart-container { height: 180px; }

  /* Navbar: brand + status only, no wrapping clutter */
  .nav-link { display: none; }
  .nav-link.active { display: inline-block; }
  .btn-donate { display: none; }
}

/* ---------- Misc Utilities ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.p-0 { padding: 0 !important; }
.rounded { border-radius: var(--radius); }
.border-b { border-bottom: 1px solid var(--border); padding-bottom: 0.75rem; margin-bottom: 0.75rem; }

/* ============================================================
   LIVE FEED & WEBSOCKET STYLES
   ============================================================ */

/* Live price flash animations */
.price-flash-up {
  animation: flashUp 0.4s ease;
}
.price-flash-down {
  animation: flashDown 0.4s ease;
}
@keyframes flashUp {
  0%   { color: var(--text-primary); }
  50%  { color: var(--neon-green); text-shadow: 0 0 12px var(--neon-green); }
  100% { color: var(--text-primary); }
}
@keyframes flashDown {
  0%   { color: var(--text-primary); }
  50%  { color: var(--neon-red); text-shadow: 0 0 12px var(--neon-red); }
  100% { color: var(--text-primary); }
}

/* WebSocket status dot */
.ws-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  font-size: 0;
  flex-shrink: 0;
}
.ws-live    { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); animation: pulseGlow 1.5s infinite; }
.ws-delayed { background: #f59e0b; }
.ws-loading { background: var(--text-muted); }
.ws-offline { background: var(--neon-red); }

/* Live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--neon-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  padding: 2px 8px;
  animation: pulseLive 1.5s infinite;
}
@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* Live price section */
.live-price-section {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Hero live ticker */
.hero-live-ticker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--neon-cyan);
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 20px;
  padding: 4px 14px;
  margin-top: 0.75rem;
}
.live-dot {
  color: var(--neon-red);
  font-size: 0.6rem;
  animation: pulseLive 1s infinite;
}

/* Quick stats offline message */
.quick-stat-offline {
  color: #f59e0b;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* Skeleton stat */
.skeleton-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.75rem 1rem;
}

/* Prediction section label */
.prediction-section-7d .section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--neon-purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Price change live display */
.price-change-live {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Nav status indicator */
#nav-status {
  display: inline-flex;
  align-items: center;
  margin-left: 0.25rem;
}
