:root {
  --bg-main: #fcfdf9;
  --bg-sidebar: #000;
  --bg-card: #ffffff;
  --accent: #cdff00;
  --accent-hover: #b5eb00;
  --accent-soft: rgba(195, 255, 0, 0.15);
  --accent-glow: rgba(195, 255, 0, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --sidebar-text: #fff;
  --border-light: #e8f0d0;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-full: 9999px;
  --shadow-card: 0 12px 40px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name { font-family: 'Outfit', sans-serif; letter-spacing: -0.02em; }

/* ---- LAYOUT ---- */
.app-container { display: flex; min-height: 100vh; }

/* ---- SIDEBAR ---- */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  color: var(--sidebar-text);
  border-radius: 0 40px 40px 0;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0; left: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.logo-circle {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.1rem;
  box-shadow: 0 4px 14px var(--accent-glow);
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.brand-name span { color: var(--text-muted); }

.nav-menu { display: flex; flex-direction: column; gap: 0.25rem; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #888;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item.active { background: #222; color: #fff; border-radius: 16px; }
.nav-item:hover:not(.active) { background: #222; color: #fff; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
}

/* ---- MAIN CONTENT ---- */
.main-stage {
  flex: 1;
  margin-left: 260px;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

/* ---- TOP BAR ---- */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.epoch-badge {
  background: #fff;
  border: 1px solid var(--border-light);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: help;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.epoch-badge strong { color: var(--text-primary); }

.top-bar-right { display: flex; align-items: center; gap: 1rem; }

.status-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.5);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 12px rgba(34,197,94,0.8); }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.avatar {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

/* ---- GRID & CARDS ---- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.glass-card {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 1.75rem;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.glass-card.accent-border { border-color: var(--accent); border-width: 2px; }

.card-title {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.big-stat {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-sub { font-size: 0.75rem; color: var(--text-muted); }

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--accent);
  color: #000;
  border: 2px solid #000;
  border-radius: var(--radius-md);
  padding: 0.8rem 1.5rem;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 3px 3px 0px #000;
  width: 100%;
  letter-spacing: 0.02em;
}

.btn-primary:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #000;
}

.btn-primary:active:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

.btn-primary:disabled {
  background: #d1fae5;
  border-color: #6ee7b7;
  box-shadow: none;
  cursor: not-allowed;
  color: #065f46;
}

.btn-secondary {
  background: #fff;
  color: var(--text-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  width: 100%;
  transition: all 0.15s ease;
}

.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ---- CHART ---- */
.chart-card { grid-column: span 3; }

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 12px 0;
}

.chart-bar {
  flex: 1;
  background: var(--border-light);
  border-radius: 4px;
  transition: height 0.5s ease;
  min-height: 4px;
}

.chart-bar.active { background: var(--accent); }

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

/* ---- HASHRATE DISPLAY ---- */
.hashrate-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8faf2;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* ---- INPUTS ---- */
.form-input {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: border-color 0.15s;
  margin-bottom: 0.75rem;
}

.form-input:focus { outline: none; border-color: var(--accent); }

/* ---- SECTION HEADINGS ---- */
.section-heading {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  font-family: 'Outfit', sans-serif;
}

/* ---- AUTH PAGE ---- */
/* ---- AUTH PAGE (DESKTOP OPTIMIZED) ---- */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at center, #f4f9e8 0%, #e8f0d0 100%);
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 32px;
  padding: 3.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.1);
  text-align: center;
  border: 1px solid var(--border-light);
  animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.auth-input {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.auth-input:focus { outline: none; border-color: var(--accent); }

.google-btn {
  width: 100%;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  padding: 0.9rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}

.google-btn:hover { border-color: #94a3b8; background: #f8fafc; }

.divider {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
}

/* ---- REFERRAL CARD ---- */
.ref-link-box {
  background: #f8faf2;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: monospace;
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-align: left;
}

/* ---- QUEST CARD ---- */
.quest-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
}

.quest-badge {
  background: var(--accent-soft);
  color: var(--text-primary);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent);
  white-space: nowrap;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
