:root {
  --bg: #0b0f0c;
  --fg: #00ff9c;
  --dim: #0b5e3e;
  --warn: #fffb96;
  --err: #ff6b6b;
  --link: #5ad7ff;

  --fg-amber: #f6d08d;
  --fg-green: #00ff9c;
  --fg-white: #e0f0e6;

  --scanline: rgba(255, 255, 255, 0.03);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.5;
  overflow: hidden;
}

.terminal {
  max-width: 1100px;
  margin: 24px auto;
  padding: 16px 16px 8px 16px;
  background: radial-gradient(ellipse at center, rgba(0,255,156,0.03) 0%, rgba(0,0,0,0) 70%) , var(--bg);
  border: 1px solid #0a2a1b;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(0, 255, 156, 0.08), inset 0 0 48px rgba(0, 0, 0, 0.6);
}

/* Centered Web3 Hacker description overlay */
.hero-center-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(90%, 780px);
  padding: 20px 24px;
  border: 1px solid #0a2a1b;
  background: radial-gradient(ellipse at center, rgba(0,255,156,0.06) 0%, rgba(0,0,0,0.82) 75%);
  border-radius: 10px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), inset 0 0 32px rgba(0, 0, 0, 0.6);
  color: var(--fg);
  z-index: 3;             /* above terminal content */
  pointer-events: none;    /* does not block typing/clicks */
}

.hero-title {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: clamp(20px, 3.2vw, 36px);
  margin: 0 0 10px 0;
  text-transform: uppercase;
}

.hero-divider {
  width: 72px;
  height: 2px;
  margin: 0 auto 12px auto;
  background: linear-gradient(90deg, transparent, var(--fg), transparent);
  opacity: 0.6;
  border-radius: 2px;
}

.hero-subtitle {
  font-size: clamp(14px, 1.6vw, 18px);
  opacity: 0.95;
  letter-spacing: 0.02em;
}

/* Keep it readable on small screens */
@media (max-width: 768px) {
  .hero-center-overlay {
    padding: 16px 18px;
  }
}
.output {
  white-space: pre-wrap;
  min-height: 60vh;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 8px;
  font-size: 14px;
}

/* Input line */
.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;        /* was 8px — push input a bit lower */
  border-top: 1px solid #0a2a1b;
  padding-top: 12px;       /* was 8px — more breathing room */
}

.prompt {
  color: var(--dim);
  user-select: none;
  font-weight: 600;
}

.input {
  flex: 1 1 auto;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font: inherit;
  caret-color: var(--fg);
  font-size: 14px;
}

.output .line { 
  margin: 0; 
  padding: 1px 0;
  word-wrap: break-word;
}
/* Center any terminal line that uses the 'center' class */
.output .line.center {
  text-align: center;
}

/* Smooth fade/slide-in for banner lines */
@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.985); filter: blur(1px); }
  to   { opacity: 1; transform: translateY(0) scale(1);     filter: blur(0); }
}
.output .line.banner-line {
  opacity: 0;
  animation: bannerFadeIn 420ms ease forwards;
}

/* Main banner box styling with glow */
.output .line.banner-line {
  text-shadow: 0 0 6px rgba(0,255,156,0.35), 0 0 14px rgba(0,255,156,0.20);
}

/* Emoji flair lines with enhanced glow and spacing */
.output .line.emoji-flair {
  letter-spacing: 0.8em;
  font-size: 1.1em;
  text-shadow: 0 0 8px rgba(0,255,156,0.45), 0 0 16px rgba(0,255,156,0.25);
  margin: 4px 0;
}
.output .line .time { color: var(--dim); margin-right: 6px; font-size: 12px; }
.output .line .ok { color: var(--fg); }
.output .line .warn { color: var(--warn); }
.output .line .err { color: var(--err); }
.output .line .muted { color: var(--dim); }
.output .line .highlight { color: var(--link); font-weight: bold; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* CRT Effects */
.crt::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.crt::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, var(--scanline) 50%);
  background-size: 100% 4px;
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 1;
}

.scanlines-on.crt::after { opacity: 1; }
.scanlines-on.crt::before { opacity: 0.1; }

.glow-on {
  text-shadow: 0 0 2px rgba(0,255,156,0.6),
               0 0 6px rgba(0,255,156,0.4),
               0 0 12px rgba(0,255,156,0.2);
}

.theme-green { --fg: var(--fg-green); }
.theme-amber { 
  --fg: var(--fg-amber); 
  --dim: #8b6914;
  --link: #ffd700;
}
.theme-white { 
  --fg: var(--fg-white); 
  --dim: #808080;
  --bg: #1a1a1a;
  text-shadow: none; 
}

::selection { background: rgba(0,255,156,0.25); }

@keyframes cursor-blink {
  0%, 49% { box-shadow: inset 0 -2px 0 0 var(--fg); }
  50%, 100% { box-shadow: inset 0 -2px 0 0 transparent; }
}
.input { animation: cursor-blink 1s step-end infinite; }

@keyframes flicker {
  0%, 100% { opacity: 1; }
  98% { opacity: 0.98; }
  99% { opacity: 0.995; }
}

.flicker-on { animation: flicker 0.15s infinite linear; }

/* Progress bar for training */
.progress-bar {
  display: inline-block;
  width: 20ch;
  height: 1em;
  background: var(--dim);
  border: 1px solid var(--fg);
  position: relative;
  margin: 0 8px;
}

.progress-fill {
  height: 100%;
  background: var(--fg);
  transition: width 0.3s ease;
}

/* XP bar and level indicator enhancements */
#status-xp { display: inline-flex; align-items: center; gap: 6px; }
#status-xp .progress-bar { width: 24ch; height: 0.9em; background: linear-gradient(180deg, rgba(0,255,156,0.10), rgba(0,255,156,0.06)); border-color: rgba(0,255,156,0.35); box-shadow: inset 0 0 8px rgba(0,255,156,0.15); }
#status-xp .progress-fill { background: linear-gradient(90deg, rgba(0,255,156,0.85), rgba(0,200,140,0.9)); box-shadow: 0 0 8px rgba(0,255,156,0.6); }
#status-xp-text { color: var(--fg); opacity: 0.9; }
#status-level { font-weight: 700; color: var(--fg); text-shadow: 0 0 6px rgba(0,255,156,0.5); }

/* Pulse glow for level-up feedback */
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 rgba(0,255,156,0); text-shadow: 0 0 0 rgba(0,255,156,0); }
  40% { box-shadow: 0 0 14px rgba(0,255,156,0.75); text-shadow: 0 0 10px rgba(0,255,156,0.9); }
  100% { box-shadow: 0 0 0 rgba(0,255,156,0); text-shadow: 0 0 0 rgba(0,255,156,0); }
}
.pulse-glow { animation: pulse-glow 0.9s ease; }

/* Scrollbar */
.output::-webkit-scrollbar { width: 8px; }
.output::-webkit-scrollbar-track { background: #07110b; border-radius: 4px; }
.output::-webkit-scrollbar-thumb { background: #0a2a1b; border-radius: 4px; }
.output::-webkit-scrollbar-thumb:hover { background: #0f3b27; }

/* Mobile responsive */
@media (max-width: 768px) {
  .terminal {
    margin: 8px;
    padding: 12px;
  }
  
  .output {
    font-size: 13px;
    min-height: 50vh;
    max-height: 60vh;
  }
  
  .input, .prompt {
    font-size: 13px;
  }
}

/* Boot sequence */
.boot-text {
  color: var(--dim);
  font-family: monospace;
  white-space: pre;
}

.boot-text .system { color: var(--link); }
.boot-text .ok { color: var(--fg); }
.boot-text .loading { color: var(--warn); }

/* Linux-like window container */
.linux-window {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  border: 1px solid #0a2a1b;
  background: var(--bg);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Title bar */
.window-titlebar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #0a2a1b;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.06), transparent);
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.window-btn {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid #0a2a1b;
  box-shadow: 0 0 6px rgba(0,255,156,0.2);
  cursor: pointer;
}
.window-btn.close { background: #ff5f56; border-color: #7f1f1d; }
.window-btn.minimize { background: #ffbd2e; border-color: #7f5e1d; }
.window-btn.maximize { background: #27c93f; border-color: #1d7f38; }

.window-title {
  text-align: center;
  font-weight: 600;
  color: var(--fg);
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.window-title .window-icon { margin-right: 0; }

.window-menu {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  justify-self: end;
  align-items: center;
  color: var(--dim);
  font-size: 13px;
}
.window-menu .menu-item { cursor: default; display: inline-flex; align-items: center; line-height: 1; padding: 2px 6px; }
.window-menu .menu-item:hover { color: var(--fg); }

/* Dropdown menu popup */
.menu-popup {
  position: fixed;
  min-width: 200px;
  border: 1px solid #0a2a1b;
  background: rgba(11,15,12,0.98);
  box-shadow: 0 18px 32px rgba(0,0,0,0.5), inset 0 0 12px rgba(0,0,0,0.7);
  z-index: 3000;
  padding: 6px 0;
  border-radius: 6px;
  max-height: calc(100vh - 24px); /* keep fully visible */
  overflow: auto;
}

.menu-entry {
  padding: 6px 12px;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.menu-entry:hover,
.menu-entry.active {
  background: rgba(0,255,156,0.08);
}

.menu-sep {
  height: 1px;
  background: #0a2a1b;
  margin: 6px 0;
}

/* Terminal container adjustments inside window */
.terminal {
  max-width: unset;
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;        /* fill space between titlebar and status bar */
  overflow: hidden;
}

/* Status bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #0a2a1b;
  padding: 6px 10px;
  background: linear-gradient(0deg, rgba(0, 255, 156, 0.06), transparent);
  font-size: 12px;
  color: var(--dim);
}
.status-left, .status-right { display: flex; gap: 12px; align-items: center; }
.status-item { white-space: nowrap; }
/* Tray area inside right status cluster */
.status-tray { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; margin-left: 12px; }
.status-tray::-webkit-scrollbar { display: none; }
.tray-summary { color: var(--dim); font-size: 11px; padding: 0 6px; border: 1px dashed #0a2a1b; border-radius: 6px; background: rgba(0,255,156,0.04); }
.tray-item { background: rgba(0,255,156,0.08); color: var(--fg); border: 1px solid #0a2a1b; border-radius: 6px; padding: 2px 8px; font-size: 11px; cursor: pointer; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,0.25), inset 0 0 8px rgba(0,255,156,0.08); transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, opacity 0.15s ease; opacity: 0; transform: scale(0.96); }
.tray-item.show { opacity: 1; transform: scale(1); }
.tray-item:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 0 10px rgba(0,255,156,0.12); filter: brightness(1.05); }
.tray-item:active { transform: translateY(0) scale(0.98); filter: brightness(0.98); }

/* ShopPanel window */
.shop-panel {
  position: absolute;
  right: 24px;
  top: 72px;
  width: 540px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid #0a2a1b;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.5), 0 0 24px rgba(0,255,156,0.08) inset;
  overflow: hidden;
  z-index: 1000;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
  opacity: 0;
  transform: scale(0.96) translateY(8px);
}

.shop-panel .sp-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #0a2a1b;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.06), transparent);
  cursor: move;
}
.sp-title {
  font-weight: 600;
  color: var(--fg);
  opacity: 0.9;
}
.sp-controls { display: flex; gap: 8px; }
.sp-control {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid #0a2a1b;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.sp-control.close { background: #ff5f56; border-color: #7f1f1d; }
.sp-control.minimize { background: #ffbd2e; border-color: #7f5e1d; }
/* Controls hover/active feel */
.sp-control:hover { transform: scale(1.08); box-shadow: 0 0 6px rgba(0,0,0,0.25), 0 0 6px rgba(0,255,156,0.15) inset; filter: brightness(1.05); }
.sp-control:active { transform: scale(0.94); }

/* Panel visibility and interaction states */
.shop-panel.panel-visible { opacity: 1; transform: scale(1) translateY(0); }
.shop-panel.panel-closing { opacity: 0; transform: scale(0.96) translateY(-8px); }
.shop-panel.dragging { box-shadow: 0 18px 36px rgba(0,0,0,0.7), 0 0 24px rgba(0,255,156,0.2) inset; }
.shop-panel.minimized .sp-content { display: none; }
/* Snap feedback similar to agent panels */
.shop-panel.snapped { animation: spSnapPulse 0.15s ease-out; box-shadow: 0 0 35px rgba(0,255,156,0.35), 0 0 70px rgba(0,255,156,0.2); }
.shop-panel.docking { transition: all 0.2s ease; }
.shop-panel.docked { border-radius: 6px; box-shadow: 0 0 18px rgba(0,255,156,0.25), inset 0 0 6px rgba(0,255,156,0.08); }

@keyframes spSnapPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

/* ShopPanel layout and content */
.shop-panel .sp-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #0a2a1b;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.06), transparent);
  cursor: move;
}
.sp-title {
  font-weight: 600;
  color: var(--fg);
  opacity: 0.9;
}
.sp-controls { display: flex; gap: 8px; }
.sp-control {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid #0a2a1b;
  cursor: pointer;
}
.sp-control.close { background: #ff5f56; border-color: #7f1f1d; }
.sp-control.minimize { background: #ffbd2e; border-color: #7f5e1d; }

.shop-panel .sp-header {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #0a2a1b;
  background: radial-gradient(ellipse at center, rgba(0,255,156,0.03) 0%, rgba(0,0,0,0) 70%);
  font-size: 13px;
}
.sp-kv { color: var(--dim); }
.sp-kv strong { color: var(--fg); }

.shop-panel .sp-tabs {
  display: flex; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #0a2a1b;
}
.sp-tab {
  background: transparent;
  color: var(--fg);
  border: 1px solid #0a2a1b;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.sp-tab.active { background: rgba(0,255,156,0.08); }

.shop-panel .sp-content {
  padding: 12px;
  overflow: auto;
  flex: 1 1 auto;
  font-size: 14px;
}

/* Catalog cards */
.sp-cards { display: grid; grid-template-columns: 1fr; gap: 10px; }
.sp-card {
  border: 1px solid #0a2a1b; border-radius: 8px;
  padding: 10px;
  background: rgba(0,255,156,0.02);
}
.sp-card h4 { margin: 0 0 6px; }
.sp-meta { color: var(--dim); font-size: 13px; }
.sp-actions { margin-top: 8px; }
.sp-btn {
  background: transparent;
  color: var(--fg);
  border: 1px solid #0a2a1b;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.sp-btn.primary { background: rgba(0,255,156,0.08); }
.sp-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Status list */
.sp-list { display: grid; gap: 6px; }
.sp-row { display: flex; justify-content: space-between; border-bottom: 1px dashed #0a2a1b; padding: 4px 0; }
.sp-row .left { color: var(--fg); }
.sp-row .right { color: var(--dim); }

/* Rig grid */
.sp-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); 
  gap: 8px; 
}
.sp-grid .sp-card { 
  background: rgba(0,255,156,0.02); 
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sp-grid .sp-performance {
  grid-column: 1 / -1;
  background: rgba(0,255,156,0.06);
  border-color: rgba(0,255,156,0.2);
}

/* Catalog improvements for more components */
.sp-cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 10px; 
  max-height: 400px;
  overflow-y: auto;
}

/* ASCII display improvements */
.sp-ascii pre {
  font-size: 9px !important;
  line-height: 1.2;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Hardware Panel Styles */
.hardware-panel {
  position: fixed;
  width: 320px;
  background: rgba(12, 22, 40, 0.95);
  border: 1px solid rgba(0, 255, 156, 0.25);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(0, 255, 156, 0.06);
  color: var(--fg);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  opacity: 0;
  transform: scale(0.95) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1120;
}

.hardware-panel.panel-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hardware-panel.dragging {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 255, 156, 0.2) inset;
}

.hp-window {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hp-titlebar {
  background: linear-gradient(90deg, rgba(0, 40, 80, 0.9), rgba(0, 75, 140, 0.9));
  border-bottom: 1px solid rgba(0, 255, 156, 0.3);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.hp-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.hp-icon {
  font-size: 14px;
}

.hp-controls {
  display: flex;
  gap: 6px;
}

.hp-control {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.15s ease;
}

.hp-control.minimize {
  background: rgba(255, 189, 46, 0.8);
  color: #333;
}

.hp-control.close {
  background: rgba(255, 95, 86, 0.8);
  color: #333;
}

.hp-control:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.hp-content {
  padding: 12px;
  overflow-y: auto;
  max-height: 500px;
}

.hp-section {
  margin-bottom: 16px;
}

.hp-section h3 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: rgba(0, 255, 156, 0.9);
  border-bottom: 1px solid rgba(0, 255, 156, 0.2);
  padding-bottom: 4px;
}

.hp-metrics {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-metric {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-label {
  width: 60px;
  font-size: 11px;
  color: rgba(0, 255, 156, 0.7);
}

/* Temperature bars */
.hp-temp-bar {
  flex: 1;
  height: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.hp-temp-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease, background-color 0.3s ease;
  background: linear-gradient(90deg, #00ff9c, #00cc7a);
}

.hp-temp-fill.warm {
  background: linear-gradient(90deg, #ffbd2e, #ff9500);
}

.hp-temp-fill.warning {
  background: linear-gradient(90deg, #ff9500, #ff6b00);
}

.hp-temp-fill.critical {
  background: linear-gradient(90deg, #ff6b6b, #ff3333);
  animation: pulse 1s infinite;
}

.hp-temp-value {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: bold;
  color: #000;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Load bars */
.hp-load-bar {
  flex: 1;
  height: 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 7px;
  position: relative;
  overflow: hidden;
}

.hp-load-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.3s ease, background-color 0.3s ease;
  background: linear-gradient(90deg, rgba(0, 255, 156, 0.6), rgba(0, 255, 156, 0.8));
}

.hp-load-fill.active {
  background: linear-gradient(90deg, rgba(0, 255, 156, 0.8), rgba(0, 204, 122, 0.9));
}

.hp-load-fill.warning {
  background: linear-gradient(90deg, #ffbd2e, #ff9500);
}

.hp-load-fill.critical {
  background: linear-gradient(90deg, #ff6b6b, #ff3333);
  animation: pulse 1s infinite;
}

.hp-load-value {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  font-weight: bold;
  color: #000;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Training section */
.hp-training-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.hp-training-stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.hp-stat-label {
  color: rgba(0, 255, 156, 0.7);
}

.hp-stat-value {
  color: var(--fg);
  font-weight: bold;
}

.hp-training-list {
  max-height: 120px;
  overflow-y: auto;
}

.hp-no-training {
  text-align: center;
  color: rgba(0, 255, 156, 0.5);
  font-style: italic;
  padding: 8px;
}

.hp-training-item {
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.15);
  border-radius: 4px;
  padding: 6px 8px;
  margin-bottom: 4px;
}

.hp-training-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.hp-agent-id {
  font-weight: bold;
  color: var(--fg);
  font-size: 11px;
}

.hp-training-progress {
  color: rgba(0, 255, 156, 0.8);
  font-size: 10px;
  font-weight: bold;
}

.hp-training-details {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(0, 255, 156, 0.6);
}

.hp-performance.degraded {
  color: #ff6b6b;
  font-weight: bold;
}

/* Power and performance sections */
.hp-power-info,
.hp-performance-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hp-power-stat,
.hp-perf-stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.hp-stat-value.excellent {
  color: var(--fg);
  font-weight: bold;
}

.hp-stat-value.warning {
  color: #ffbd2e;
  font-weight: bold;
}

.hp-stat-value.critical {
  color: #ff6b6b;
  font-weight: bold;
  animation: pulse 1s infinite;
}

/* Alerts section */
.hp-alerts {
  border-top: 1px solid rgba(255, 107, 107, 0.3);
  padding-top: 8px;
}

.hp-alerts h3 {
  color: #ff6b6b;
  border-bottom-color: rgba(255, 107, 107, 0.3);
}

.hp-alert {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 4px;
  font-size: 10px;
  color: #ff6b6b;
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Authentication Panel Styles */
.auth-panel {
  position: fixed;
  width: 400px;
  max-width: calc(100vw - 48px);
  max-height: 90vh;
  background: rgba(12, 22, 40, 0.95);
  border: 1px solid rgba(0, 255, 156, 0.25);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(0, 255, 156, 0.06);
  color: var(--fg);
  font-family: ui-monospace, monospace;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.95) translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1130;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}

.auth-panel.panel-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.auth-panel.dragging {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 255, 156, 0.2) inset;
}

.ap-window {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 90vh;
}

.ap-titlebar {
  background: linear-gradient(90deg, rgba(0, 40, 80, 0.9), rgba(0, 75, 140, 0.9));
  border-bottom: 1px solid rgba(0, 255, 156, 0.3);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.ap-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.ap-icon {
  font-size: 14px;
}

.ap-controls {
  display: flex;
  gap: 6px;
}

.ap-control {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.15s ease;
  background: rgba(255, 95, 86, 0.8);
  color: #333;
}

.ap-control:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}

.ap-content {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(90vh - 60px);
  flex: 1;
}

/* Mode Toggle */
.ap-mode-toggle {
  display: flex;
  margin-bottom: 20px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 156, 0.2);
}

.ap-mode-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: rgba(0, 255, 156, 0.05);
  color: rgba(0, 255, 156, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 500;
}

.ap-mode-btn:hover {
  background: rgba(0, 255, 156, 0.1);
  color: rgba(0, 255, 156, 0.9);
}

.ap-mode-btn.active {
  background: rgba(0, 255, 156, 0.15);
  color: var(--fg);
  font-weight: bold;
}

/* Forms */
.ap-form h3 {
  margin: 0 0 20px 0;
  color: var(--fg);
  text-align: center;
  font-size: 18px;
}

.ap-field {
  margin-bottom: 16px;
}

.ap-field label {
  display: block;
  margin-bottom: 6px;
  color: rgba(0, 255, 156, 0.8);
  font-size: 12px;
  font-weight: 500;
}

.ap-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 255, 156, 0.25);
  border-radius: 4px;
  background: rgba(0, 50, 90, 0.3);
  color: var(--fg);
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.ap-input:focus {
  outline: none;
  border-color: rgba(0, 255, 156, 0.6);
  background: rgba(0, 50, 90, 0.5);
  box-shadow: 0 0 0 2px rgba(0, 255, 156, 0.1);
}

.ap-input.valid {
  border-color: rgba(0, 255, 100, 0.6);
}

.ap-input.invalid {
  border-color: rgba(255, 107, 107, 0.6);
}

.ap-field-hint {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(0, 255, 156, 0.5);
}

.ap-validation {
  margin-top: 4px;
  font-size: 11px;
  color: #ff6b6b;
  display: none;
}

/* Actions */
.ap-actions {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.ap-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  font-family: inherit;
}

.ap-btn.primary {
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.8), rgba(0, 200, 120, 0.8));
  color: #000;
  flex: 1;
}

.ap-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.9), rgba(0, 200, 120, 0.9));
  transform: translateY(-1px);
}

.ap-btn.secondary {
  background: rgba(0, 255, 156, 0.1);
  color: rgba(0, 255, 156, 0.8);
  border: 1px solid rgba(0, 255, 156, 0.3);
  flex: 1;
}

.ap-btn.secondary:hover:not(:disabled) {
  background: rgba(0, 255, 156, 0.2);
  color: var(--fg);
}

.ap-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Help Links */
.ap-help {
  text-align: center;
  font-size: 12px;
  color: rgba(0, 255, 156, 0.6);
}

.ap-link {
  color: rgba(0, 255, 156, 0.8);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ap-link:hover {
  color: var(--fg);
  text-decoration: underline;
}

/* User Info */
.ap-user-info {
  text-align: center;
}

.ap-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 255, 156, 0.05);
  border-radius: 6px;
  border: 1px solid rgba(0, 255, 156, 0.15);
}

.ap-avatar {
  font-size: 32px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 156, 0.1);
  border-radius: 50%;
}

.ap-user-details {
  flex: 1;
  text-align: left;
}

.ap-username {
  font-size: 16px;
  font-weight: bold;
  color: var(--fg);
  margin-bottom: 2px;
}

.ap-email {
  font-size: 12px;
  color: rgba(0, 255, 156, 0.6);
}

.ap-user-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 255, 156, 0.03);
  border-radius: 6px;
}

.ap-stat {
  text-align: center;
}

.ap-stat-label {
  display: block;
  font-size: 11px;
  color: rgba(0, 255, 156, 0.6);
  margin-bottom: 4px;
}

.ap-stat-value {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: var(--fg);
}

/* Messages */
.ap-message {
  margin: 15px 0;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  display: none;
}

.ap-message.success {
  background: rgba(0, 255, 100, 0.1);
  border: 1px solid rgba(0, 255, 100, 0.3);
  color: rgba(0, 255, 100, 0.9);
}

.ap-message.error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ff6b6b;
}

.ap-message.info {
  background: rgba(0, 255, 156, 0.1);
  border: 1px solid rgba(0, 255, 156, 0.3);
  color: rgba(0, 255, 156, 0.9);
}

/* Welcome screen */
.welcome-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 3;
}
.welcome-inner {
  text-align: center;
  max-width: 90%;
}
.welcome-title {
  font-size: 42px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.typing-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: cursor-blink 1s step-end infinite;
}
.welcome-sub {
  margin-top: 12px;
  font-size: 14px;
}

/* Glitch effect */
@keyframes glitch-shift {
  0% { text-shadow: 1px 0 rgba(0,255,156,0.6), -1px 0 rgba(90,215,255,0.4); transform: translate(0,0); }
  20% { text-shadow: 2px 0 rgba(0,255,156,0.6), -2px 0 rgba(90,215,255,0.4); transform: translate(-1px,0); }
  40% { text-shadow: -2px 0 rgba(0,255,156,0.6), 2px 0 rgba(90,215,255,0.4); transform: translate(1px,0); }
  60% { text-shadow: 3px 0 rgba(0,255,156,0.6), -3px 0 rgba(90,215,255,0.4); transform: translate(0,0); }
  80% { text-shadow: -1px 0 rgba(0,255,156,0.6), 1px 0 rgba(90,215,255,0.4); transform: translate(1px,0); }
  100% { text-shadow: 0 0 2px rgba(0,255,156,0.6); transform: translate(0,0); }
}
.welcome-title.glitch {
  animation: glitch-shift 0.7s linear both;
}

/* Terminal modal (auth popup) */
.terminal-modal {
  display: none; /* hidden by default until explicitly opened */
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translateX(-50%);
  width: min(520px, 92%);
  background: rgba(11,15,12,0.96);
  border: 1px solid #0a2a1b;
  box-shadow: 0 0 18px rgba(0,255,156,0.15), inset 0 0 18px rgba(0,0,0,0.8);
  z-index: 4;
  pointer-events: auto;
}
.terminal-modal.is-open { display: block; }
.hero-center-overlay { display: none; }
.modal-frame { padding: 12px; }
.modal-header {
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
  letter-spacing: 1px;
}
.modal-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}
.modal-tabs .tab {
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 2px 10px;
  cursor: pointer;
  font-family: inherit;
}
.modal-tabs .tab.active {
  background: rgba(0,255,156,0.08);
  box-shadow: 0 0 8px rgba(0,255,156,0.12) inset;
}
.modal-body {
  display: grid;
  gap: 10px;
}
.modal-body label {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
}
.mono-input {
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 6px 8px;
  font: inherit;
  outline: none;
}
.mono-input:focus {
  border-color: var(--fg);
  box-shadow: 0 0 0 1px rgba(0,255,156,0.2);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.submit-btn {
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
}
.submit-btn:hover {
  border-color: var(--fg);
}

/* Ensure overlay components sit within terminal without breaking scroll */
.terminal { position: relative; }

/* Centered description banner */
.output .centered-block {
  display: flex;
  justify-content: center;
  margin: 8px 0 12px;
}
.output .centered-desc {
  text-align: center;
  white-space: pre-wrap;      /* keep newlines */
  max-width: 68ch;            /* readable line length */
  padding: 8px 10px;
  border: 1px dashed #0a2a1b;
  background: rgba(0,255,156,0.02);
  border-radius: 6px;
}

/* Battle Viewer Styles */
.battle-viewer {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 12, 0.98);
  z-index: 5000;
  display: none;
  flex-direction: column;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.battle-viewer.battle-active {
  display: flex;
}

.battle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #0a2a1b;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.08), transparent);
}

.battle-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: 1px;
}

.battle-btn {
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  transition: all 0.2s ease;
}

.battle-btn:hover {
  border-color: var(--fg);
  box-shadow: 0 0 8px rgba(0, 255, 156, 0.3);
}

.battle-btn.primary {
  background: rgba(0, 255, 156, 0.1);
  border-color: var(--fg);
}

.battle-info {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  padding: 20px;
  align-items: center;
  border-bottom: 1px solid #0a2a1b;
}

.fighter {
  text-align: center;
}

.fighter-avatar {
  font-size: 48px;
  margin-bottom: 8px;
}

.fighter-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.fighter-stats {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 8px;
}

.fighter-health {
  width: 120px;
  margin: 0 auto;
}

.health-bar {
  width: 100%;
  height: 8px;
  background: #0a2a1b;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--dim);
}

.health-fill {
  height: 100%;
  background: var(--fg);
  transition: width 0.5s ease, background-color 0.3s ease;
  border-radius: 3px;
}

.battle-vs {
  font-size: 24px;
  font-weight: 700;
  color: var(--link);
  text-shadow: 0 0 8px rgba(90, 215, 255, 0.5);
}

.battle-board {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 300px;
}

/* Chess Board */
.chess-board {
  display: grid;
  grid-template-columns: repeat(8, 40px);
  grid-template-rows: repeat(8, 40px);
  border: 2px solid var(--fg);
  border-radius: 4px;
}

.chess-square {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: background-color 0.3s ease;
}

.chess-square.light {
  background: rgba(255, 255, 255, 0.1);
}

.chess-square.dark {
  background: rgba(0, 0, 0, 0.3);
}

.chess-square.move-highlight {
  background: rgba(0, 255, 156, 0.3) !important;
  animation: pulse 1s ease;
}

.chess-notation {
  margin-top: 16px;
  padding: 8px;
  background: rgba(0, 255, 156, 0.05);
  border-radius: 4px;
  max-height: 100px;
  overflow-y: auto;
}

.chess-move {
  margin-right: 8px;
  color: var(--fg);
}

/* Tic-Tac-Toe Board */
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 80px);
  grid-template-rows: repeat(3, 80px);
  gap: 4px;
  border: 2px solid var(--fg);
  border-radius: 8px;
  padding: 8px;
  background: rgba(0, 255, 156, 0.05);
}

.ttt-square {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--dim);
  border-radius: 4px;
  font-size: 36px;
  font-weight: 700;
  color: var(--fg);
  transition: all 0.3s ease;
}

.ttt-square.move-highlight {
  background: rgba(0, 255, 156, 0.2);
  transform: scale(1.1);
}

/* Boxing Ring */
.boxing-ring {
  position: relative;
  width: 400px;
  height: 300px;
  border: 3px solid var(--fg);
  border-radius: 8px;
  background: linear-gradient(45deg, rgba(0, 255, 156, 0.05), rgba(0, 255, 156, 0.02));
}

.ring-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.boxer {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  transition: all 0.3s ease;
}

.boxer-left {
  left: 20px;
}

.boxer-right {
  right: 20px;
}

.boxer.attacking {
  transform: translateY(-50%) scale(1.2);
  filter: drop-shadow(0 0 10px rgba(0, 255, 156, 0.8));
}

.combo-display {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--fg);
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.combo-display.combo-active {
  opacity: 1;
}

/* Battle Log */
.battle-log {
  height: 200px;
  border-top: 1px solid #0a2a1b;
  display: flex;
  flex-direction: column;
}

.log-title {
  padding: 8px 16px;
  background: rgba(0, 255, 156, 0.05);
  border-bottom: 1px solid #0a2a1b;
  font-weight: 600;
  color: var(--fg);
}

.log-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  font-size: 12px;
}

.log-message {
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.log-time {
  color: var(--dim);
  min-width: 80px;
}

.log-text {
  color: var(--fg);
}

.log-message.log-system .log-text {
  color: var(--link);
  font-style: italic;
}

.log-message.log-result .log-text {
  color: var(--warn);
  font-weight: 700;
}

.battle-status {
  padding: 8px 16px;
  background: rgba(0, 255, 156, 0.05);
  border-top: 1px solid #0a2a1b;
  text-align: center;
  color: var(--fg);
  font-weight: 600;
}

/* Battle Results */
.battle-results {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(11, 15, 12, 0.95);
  border: 2px solid var(--fg);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  min-width: 300px;
  box-shadow: 0 0 30px rgba(0, 255, 156, 0.3);
}

.results-header {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 16px;
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.5);
}

.results-winner {
  margin-bottom: 20px;
}

.winner-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.winner-title {
  font-size: 14px;
  color: var(--warn);
  font-weight: 700;
  letter-spacing: 1px;
}

.results-rewards {
  margin-bottom: 20px;
}

.reward-item {
  margin-bottom: 6px;
  color: var(--fg);
  font-size: 14px;
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Onboarding Highlight */
.onboarding-highlight {
  box-shadow: 0 0 20px rgba(0, 255, 156, 0.6) !important;
  border-color: var(--fg) !important;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Generic board for unsupported games */
.generic-board {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 200px;
  border: 2px dashed var(--dim);
  border-radius: 8px;
  color: var(--dim);
  font-size: 18px;
}

/* Battle ended state */
.battle-viewer.battle-ended {
  animation: victory-glow 2s ease-in-out;
}

@keyframes victory-glow {
  0%, 100% { box-shadow: inset 0 0 0 rgba(0, 255, 156, 0); }
  50% { box-shadow: inset 0 0 50px rgba(0, 255, 156, 0.2); }
}

/* Social Panel Styles */
.social-panel {
  position: fixed;
  right: 24px;
  top: 72px;
  width: 420px;
  height: 600px;
  max-height: 80vh;
  display: none;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid #0a2a1b;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.5), 0 0 24px rgba(0,255,156,0.08) inset;
  overflow: hidden;
  z-index: 1000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.social-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #0a2a1b;
  background: linear-gradient(180deg, rgba(0, 255, 156, 0.06), transparent);
  cursor: move;
}

.social-title {
  font-weight: 600;
  color: var(--fg);
  opacity: 0.9;
}

.social-controls {
  display: flex;
  gap: 8px;
}

.social-btn {
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: all 0.2s ease;
}

.social-btn:hover {
  border-color: var(--fg);
  box-shadow: 0 0 6px rgba(0, 255, 156, 0.3);
}

.social-btn.primary {
  background: rgba(0, 255, 156, 0.1);
  border-color: var(--fg);
}

.social-btn.warn {
  border-color: var(--err);
  color: var(--err);
}

.social-btn.small {
  padding: 2px 6px;
  font-size: 11px;
}

.social-btn.close, .social-btn.minimize {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-btn.close {
  background: #ff5f56;
  border-color: #7f1f1d;
}

.social-btn.minimize {
  background: #ffbd2e;
  border-color: #7f5e1d;
}

.social-tabs {
  display: flex;
  border-bottom: 1px solid #0a2a1b;
  background: rgba(0, 255, 156, 0.02);
}

.social-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--dim);
  padding: 8px 4px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.social-tab:hover {
  color: var(--fg);
  background: rgba(0, 255, 156, 0.05);
}

.social-tab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
  background: rgba(0, 255, 156, 0.08);
}

.social-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.social-tab-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.social-tab-content.hidden {
  display: none;
}

/* Friends Tab */
.friends-header {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.social-input {
  flex: 1;
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 6px 8px;
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
}

.social-input:focus {
  border-color: var(--fg);
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.2);
  outline: none;
}

.friends-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border: 1px solid #0a2a1b;
  border-radius: 6px;
  background: rgba(0, 255, 156, 0.02);
}

.friend-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #0a2a1b;
}

.friend-status.online {
  background: #00ff9c;
  box-shadow: 0 0 6px rgba(0, 255, 156, 0.5);
}

.friend-status.offline {
  background: #666;
}

.friend-details {
  display: flex;
  flex-direction: column;
}

.friend-name {
  font-weight: 600;
  color: var(--fg);
  font-size: 13px;
}

.friend-status-text {
  font-size: 11px;
  color: var(--dim);
}

.friend-actions {
  display: flex;
  gap: 4px;
}

/* Guild Tab */
.guild-header {
  margin-bottom: 12px;
}

.guild-create, .guild-join {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.guild-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guild-name {
  font-weight: 600;
  color: var(--fg);
  font-size: 14px;
}

.guild-role {
  font-size: 12px;
  color: var(--dim);
}

.guild-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.guild-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  border: 1px solid #0a2a1b;
  border-radius: 6px;
  background: rgba(0, 255, 156, 0.02);
}

.stat-label {
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 4px;
}

.stat-value {
  font-weight: 600;
  color: var(--fg);
  font-size: 13px;
}

/* Chat Tab */
.chat-channels {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #0a2a1b;
}

.chat-channel {
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--dim);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  transition: all 0.2s ease;
}

.chat-channel:hover {
  color: var(--fg);
  border-color: var(--fg);
}

.chat-channel.active {
  color: var(--fg);
  background: rgba(0, 255, 156, 0.1);
  border-color: var(--fg);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #0a2a1b;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 8px;
  min-height: 200px;
  font-size: 12px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: transparent;
  border: 1px solid #0a2a1b;
  color: var(--fg);
  padding: 6px 8px;
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
}

.chat-input:focus {
  border-color: var(--fg);
  outline: none;
}

/* Invites Tab */
.invites-section {
  margin-bottom: 16px;
}

.invites-title {
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
  font-size: 13px;
}

.invite-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border: 1px solid #0a2a1b;
  border-radius: 6px;
  background: rgba(0, 255, 156, 0.02);
  margin-bottom: 6px;
}

.invite-info {
  display: flex;
  flex-direction: column;
}

.invite-from {
  font-weight: 600;
  color: var(--fg);
  font-size: 13px;
}

.invite-time {
  font-size: 11px;
  color: var(--dim);
}

.invite-actions {
  display: flex;
  gap: 4px;
}

.invite-status {
  font-size: 11px;
  color: var(--dim);
  font-style: italic;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  color: var(--dim);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fg);
}

.empty-subtext {
  font-size: 12px;
  line-height: 1.4;
  max-width: 250px;
}

/* Social Notifications */
.social-notification {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 255, 156, 0.9);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 10000;
}

.social-notification.show {
  transform: translateX(0);
}

/* Scrollbar for social panel */
.social-tab-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.social-tab-content::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
  background: #07110b;
  border-radius: 3px;
}

.social-tab-content::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: #0a2a1b;
  border-radius: 3px;
}

.social-tab-content::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #0f3b27;
}

/* Achievement Notification Styles */
.achievement-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.95), rgba(0, 200, 120, 0.95));
  color: var(--bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 255, 156, 0.4), 0 0 0 1px rgba(0, 255, 156, 0.3);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 10000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  backdrop-filter: blur(10px);
}

.achievement-notification.show {
  transform: translateX(0);
}

.achievement-notification {
  display: flex;
  align-items: center;
  gap: 12px;
}

.achievement-icon {
  font-size: 32px;
  flex-shrink: 0;
  animation: achievement-bounce 0.6s ease-out;
}

.achievement-content {
  flex: 1;
}

.achievement-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.9;
  margin-bottom: 2px;
}

.achievement-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.achievement-points {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}

@keyframes achievement-bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -8px, 0);
  }
  70% {
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

/* Achievement progress indicators */
.achievement-progress {
  display: inline-block;
  width: 100px;
  height: 6px;
  background: rgba(0, 255, 156, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-left: 8px;
}

.achievement-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fg), rgba(0, 255, 156, 0.8));
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Achievement category badges */
.achievement-category {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.achievement-category.training {
  background: rgba(0, 150, 255, 0.2);
  color: #4da6ff;
  border: 1px solid rgba(0, 150, 255, 0.3);
}

.achievement-category.battle {
  background: rgba(255, 100, 100, 0.2);
  color: #ff6464;
  border: 1px solid rgba(255, 100, 100, 0.3);
}

.achievement-category.social {
  background: rgba(255, 200, 0, 0.2);
  color: #ffc800;
  border: 1px solid rgba(255, 200, 0, 0.3);
}

.achievement-category.economic {
  background: rgba(0, 255, 156, 0.2);
  color: var(--fg);
  border: 1px solid rgba(0, 255, 156, 0.3);
}

.achievement-category.special {
  background: rgba(200, 100, 255, 0.2);
  color: #c864ff;
  border: 1px solid rgba(200, 100, 255, 0.3);
}

.achievement-category.specialization {
  background: rgba(255, 150, 0, 0.2);
  color: #ff9600;
  border: 1px solid rgba(255, 150, 0, 0.3);
}

/* Sync Debug overlay (compact, bottom-right) */
.sync-debug-overlay {
  position: fixed;
  right: 10px;
  bottom: 38px; /* above status bar */
  width: 360px;
  max-height: 240px;
  background: rgba(0, 20, 0, 0.85);
  border: 1px solid rgba(0, 255, 120, 0.35);
  box-shadow: 0 0 12px rgba(0, 255, 120, 0.15);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.25;
  color: #aef0c0;
  z-index: 9999;
  backdrop-filter: blur(1px);
  pointer-events: none; /* non-intrusive */
}
.sync-debug-overlay.hidden { display: none; }
.sync-debug-overlay .sd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: rgba(0, 40, 0, 0.6);
  border-bottom: 1px dashed rgba(0, 255, 120, 0.25);
}
.sync-debug-overlay .sd-title {
  font-weight: 700;
  color: #b7ffce;
  letter-spacing: 0.04em;
}
.sync-debug-overlay .sd-ctrls { display: flex; gap: 6px; }
.sync-debug-overlay .sd-btn {
  pointer-events: auto; /* allow click on controls */
  padding: 2px 6px;
  border: 1px solid rgba(0, 255, 120, 0.3);
  border-radius: 4px;
  color: #b7ffce;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 60, 0, 0.45);
}
.sync-debug-overlay .sd-btn:hover { background: rgba(0, 80, 0, 0.6); }
.sync-debug-overlay .sd-log {
  max-height: 170px;
  overflow: auto;
  padding: 6px 8px;
}
.sync-debug-overlay .sd-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 4px; }
.sync-debug-overlay .sd-ts { opacity: 0.85; min-width: 102px; color: #8de0a5; }
.sync-debug-overlay .sd-type {
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid;
  font-weight: 700;
}
.sync-debug-overlay .sd-type.agent { color: #d0ffdd; border-color: #2ad67f; background: rgba(10, 90, 10, 0.35); }
.sync-debug-overlay .sd-type.shop { color: #ffd6a1; border-color: #e6b35c; background: rgba(90, 60, 10, 0.35); }
.sync-debug-overlay .sd-type.game { color: #bcdcff; border-color: #5cb7e6; background: rgba(10, 40, 90, 0.35); }
.sync-debug-overlay .sd-type.mission { color: #ffbcd6; border-color: #e65c9b; background: rgba(90, 10, 40, 0.35); }
.sync-debug-overlay .sd-type.other { color: #e2e2e2; border-color: #888; background: rgba(80, 80, 80, 0.35); }
.sync-debug-overlay .sd-json {
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.sync-debug-overlay .sd-status { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.sync-debug-overlay .sd-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ffc107; box-shadow: 0 0 6px #ffc107aa;
}
.sync-debug-overlay .sd-dot.ok {
  background: #29f08e; box-shadow: 0 0 6px #29f08eaa;
}
.sync-debug-overlay .sd-dot.err {
  background: #ff5c5c; box-shadow: 0 0 6px #ff5c5caa;
}/* Welcom
e Screen Authentication Modal - Redesigned */
.welcome-auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.welcome-auth-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-frame {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border: 2px solid var(--fg);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 156, 0.1);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.auth-modal-header {
  padding: 30px 30px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-header h2 {
  color: var(--fg);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px;
  font-family: ui-monospace, monospace;
}

.auth-modal-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
}

.auth-modal-tabs {
  display: flex;
  padding: 0 30px;
  margin-top: 20px;
}

.auth-tab {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-family: ui-monospace, monospace;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
}

.auth-tab:first-child {
  border-right: none;
  border-radius: 6px 0 0 0;
}

.auth-tab:last-child {
  border-radius: 0 6px 0 0;
}

.auth-tab.active {
  background: rgba(0, 255, 156, 0.1);
  border-color: var(--fg);
  color: var(--fg);
}

.auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.auth-form {
  padding: 30px;
}

.auth-social {
  margin-bottom: 25px;
}

.google-btn {
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.google-btn:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.google-icon {
  font-size: 18px;
}

.auth-divider {
  margin: 20px 0;
  text-align: center;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.auth-divider span {
  background: #1a1a1a;
  padding: 0 15px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  position: relative;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  font-family: ui-monospace, monospace;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: var(--fg);
  font-size: 14px;
  font-family: ui-monospace, monospace;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 255, 156, 0.1);
}

.auth-input.valid {
  border-color: #4ade80;
}

.auth-input.invalid {
  border-color: #ef4444;
}

.form-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.field-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--fg) 0%, #00cc88 100%);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: ui-monospace, monospace;
  margin-top: 10px;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 255, 156, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-message {
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.auth-message.success {
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid #4ade80;
  color: #4ade80;
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.auth-message.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid #3b82f6;
  color: #3b82f6;
}

.auth-footer {
  padding: 20px 30px 30px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  line-height: 1.4;
}

/* Welcome screen subtitle */
.welcome-subtitle {
  text-align: center;
  margin: 20px 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

.subtitle-line {
  color: rgba(0, 255, 156, 0.8);
  font-size: 14px;
  font-weight: 500;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* New Redesigned Authentication Modal Styles */
.welcome-auth-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal-container {
  width: 100%;
  max-width: 1200px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal-frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1000px;
  min-height: 600px;
  background: linear-gradient(135deg, rgba(11, 15, 12, 0.98) 0%, rgba(10, 42, 27, 0.98) 100%);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 50px rgba(0, 255, 156, 0.1);
  animation: newModalSlideIn 0.4s ease-out;
}

@keyframes newModalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Left Side - Branding */
.auth-branding {
  background: linear-gradient(135deg, rgba(0, 255, 156, 0.1) 0%, rgba(0, 200, 120, 0.05) 100%);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-branding::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 156, 0.05) 0%, transparent 70%);
  animation: brandingGlow 8s ease-in-out infinite;
}

@keyframes brandingGlow {
  0%, 100% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.1); }
}

.auth-brand-content {
  position: relative;
  z-index: 2;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--fg) 0%, #00e68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.5px;
}

.auth-branding h1 {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 16px 0;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--fg) 0%, #00e68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-branding p {
  font-size: 1.1rem;
  color: var(--dim);
  line-height: 1.6;
  margin: 0 0 40px 0;
}

.feature-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.feature-icon {
  font-size: 1.3rem;
  width: 32px;
  text-align: center;
}

.feature-item span:last-child {
  color: var(--fg);
  font-weight: 500;
}

.auth-brand-footer {
  position: relative;
  z-index: 2;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Right Side - Forms */
.auth-forms {
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-forms-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.auth-close-btn {
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.auth-close-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
  position: relative;
}

.auth-tab {
  background: none;
  border: none;
  padding: 12px 24px;
  color: var(--dim);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.auth-tab.active {
  color: var(--fg);
  background: rgba(0, 255, 156, 0.1);
}

.tab-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--fg);
  transition: width 0.3s ease;
}

.auth-tab.active .tab-indicator {
  width: 80%;
}

/* Form Styles */
.auth-form {
  flex: 1;
  transition: all 0.3s ease;
}

.form-header {
  text-align: center;
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 8px 0;
}

.form-header p {
  color: var(--dim);
  margin: 0;
  font-size: 0.95rem;
}

/* Social Authentication */
.auth-social {
  margin-bottom: 32px;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.google-icon {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--dim);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
  padding: 0 16px;
}

/* Form Fields */
.form-row {
  margin-bottom: 20px;
}

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  color: var(--fg);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--fg);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 255, 156, 0.1);
}

.auth-input.valid {
  border-color: var(--fg);
}

.auth-input.invalid {
  border-color: #ff6b6b;
}

.input-icon {
  position: absolute;
  left: 16px;
  font-size: 1.1rem;
  z-index: 2;
  pointer-events: none;
}

.input-status {
  position: absolute;
  right: 16px;
  font-size: 1rem;
  z-index: 2;
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--fg);
}

.form-hint {
  color: var(--dim);
  font-size: 0.8rem;
  margin-top: 6px;
}

.field-error {
  color: #ff6b6b;
  font-size: 0.8rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Password Strength Meter */
.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  width: 0%;
}

.strength-fill.strength-weak {
  background: #ff6b6b;
}

.strength-fill.strength-fair {
  background: #ffd93d;
}

.strength-fill.strength-good {
  background: #6bcf7f;
}

.strength-fill.strength-strong {
  background: var(--fg);
}

.strength-text {
  font-size: 0.8rem;
  color: var(--dim);
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--fg) 0%, #00e68a 100%);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 156, 0.3);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Links and Footer */
.auth-links {
  text-align: center;
  margin-top: 16px;
}

.forgot-password-btn,
.back-to-login-btn {
  background: none;
  border: none;
  color: var(--link);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.forgot-password-btn:hover,
.back-to-login-btn:hover {
  color: #4ac3e8;
  text-decoration: underline;
}

.auth-message {
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 0.9rem;
  text-align: center;
}

.auth-message.success {
  background: rgba(0, 255, 156, 0.1);
  color: var(--fg);
  border: 1px solid rgba(0, 255, 156, 0.3);
}

.auth-message.error {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.auth-message.info {
  background: rgba(90, 215, 255, 0.1);
  color: var(--link);
  border: 1px solid rgba(90, 215, 255, 0.3);
}

.auth-footer {
  text-align: center;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer p {
  color: var(--dim);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.footer-link {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #4ac3e8;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-modal-frame {
    grid-template-columns: 1fr;
    max-width: 400px;
    min-height: auto;
  }
  
  .auth-branding {
    display: none;
  }
  
  .auth-forms {
    padding: 32px 24px;
  }
  
  .auth-forms-header {
    margin-bottom: 24px;
  }
  
  .form-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .auth-modal-overlay {
    padding: 10px;
  }
  
  .auth-forms {
    padding: 24px 20px;
  }
  
  .auth-tabs {
    width: 100%;
  }
  
  .auth-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}
/* Pro
file Panel Styles */
.profile-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.profile-modal {
  position: relative;
  width: min(90vw, 600px);
  max-height: 90vh;
  background: linear-gradient(135deg, rgba(11, 15, 12, 0.95) 0%, rgba(10, 42, 27, 0.95) 100%);
  border: 1px solid #0a2a1b;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 156, 0.1);
  overflow: hidden;
  animation: profileSlideIn 0.3s ease-out;
}

@keyframes profileSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #0a2a1b;
  background: rgba(0, 255, 156, 0.05);
}

.profile-header h2 {
  margin: 0;
  color: var(--fg);
  font-size: 1.4rem;
  font-weight: 600;
}

.profile-close-btn {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.profile-close-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.profile-content {
  max-height: calc(90vh - 80px);
  overflow-y: auto;
  padding: 0;
}

.profile-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--dim);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--dim);
  border-top: 2px solid var(--fg);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.profile-main {
  padding: 0;
}

.profile-section {
  padding: 24px;
  border-bottom: 1px solid rgba(10, 42, 27, 0.5);
}

.profile-section:last-child {
  border-bottom: none;
}

.profile-section h3 {
  margin: 0 0 16px 0;
  color: var(--fg);
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-item label {
  min-width: 120px;
  color: var(--dim);
  font-weight: 500;
}

.info-item span {
  color: var(--fg);
}

.email-status {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.email-status.verified {
  background: rgba(0, 255, 156, 0.2);
  color: var(--fg);
}

.email-status.unverified {
  background: rgba(255, 251, 150, 0.2);
  color: var(--warn);
}

.profile-edit-form,
.password-change-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  color: var(--fg);
  font-weight: 500;
  font-size: 0.9rem;
}

.profile-input {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #0a2a1b;
  border-radius: 6px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.profile-input:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 2px rgba(0, 255, 156, 0.2);
}

.profile-input.valid {
  border-color: var(--fg);
}

.profile-input.invalid {
  border-color: var(--err);
}

.form-hint {
  color: var(--dim);
  font-size: 0.8rem;
}

.field-error {
  color: var(--err);
  font-size: 0.8rem;
  margin-top: 4px;
}

.profile-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.profile-btn.primary {
  background: var(--fg);
  color: var(--bg);
}

.profile-btn.primary:hover:not(:disabled) {
  background: #00e68a;
  transform: translateY(-1px);
}

.profile-btn.secondary {
  background: rgba(0, 255, 156, 0.1);
  color: var(--fg);
  border: 1px solid var(--fg);
}

.profile-btn.secondary:hover:not(:disabled) {
  background: rgba(0, 255, 156, 0.2);
}

.profile-btn.danger {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

.profile-btn.danger:hover:not(:disabled) {
  background: rgba(255, 107, 107, 0.2);
}

.profile-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-loading {
  display: none;
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-message {
  padding: 16px 24px;
  margin: 0;
  border-top: 1px solid rgba(10, 42, 27, 0.5);
  font-size: 0.9rem;
}

.profile-message.success {
  background: rgba(0, 255, 156, 0.1);
  color: var(--fg);
  border-left: 4px solid var(--fg);
}

.profile-message.error {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border-left: 4px solid #ff6b6b;
}

.profile-message.info {
  background: rgba(90, 215, 255, 0.1);
  color: var(--link);
  border-left: 4px solid var(--link);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .profile-modal {
    width: 95vw;
    margin: 20px;
  }
  
  .profile-section {
    padding: 20px 16px;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .info-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .info-item label {
    min-width: auto;
  }
}/* Enha
nced Welcome Auth Modal Styles */
.auth-links {
  margin-top: 16px;
  text-align: center;
}

.forgot-password-btn,
.back-to-login-btn {
  background: none;
  border: none;
  color: var(--link);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.forgot-password-btn:hover,
.back-to-login-btn:hover {
  color: #4ac3e8;
}

.reset-form .auth-form-header {
  text-align: center;
  margin-bottom: 24px;
}

.reset-form .auth-form-header h3 {
  margin: 0 0 8px 0;
  color: var(--fg);
  font-size: 1.2rem;
}

.reset-form .auth-form-header p {
  margin: 0;
  color: var(--dim);
  font-size: 0.9rem;
  line-height: 1.4;
}
/* Dash
board System Styles */
.dashboard-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
}

.dashboard-modal {
  position: relative;
  width: min(95vw, 1200px);
  max-height: 90vh;
  background: linear-gradient(135deg, rgba(11, 15, 12, 0.95) 0%, rgba(10, 42, 27, 0.95) 100%);
  border: 1px solid #0a2a1b;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 156, 0.15);
  overflow: hidden;
  animation: dashboardSlideIn 0.4s ease-out;
}

@keyframes dashboardSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid #0a2a1b;
  background: rgba(0, 255, 156, 0.08);
}

.dashboard-header h2 {
  margin: 0;
  color: var(--fg);
  font-size: 1.6rem;
  font-weight: 700;
}

.dashboard-close-btn {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.dashboard-close-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.dashboard-content {
  max-height: calc(90vh - 100px);
  overflow-y: auto;
  padding: 32px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(0, 255, 156, 0.05);
  border: 1px solid rgba(0, 255, 156, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(0, 255, 156, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 156, 0.15);
}

.stat-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 156, 0.1);
  border-radius: 10px;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--dim);
  font-weight: 500;
}

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 32px;
}

.dashboard-section h3 {
  margin: 0 0 20px 0;
  color: var(--fg);
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Progress Section */
.progress-info {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #0a2a1b;
  border-radius: 12px;
  padding: 24px;
}

.level-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.level-badge {
  background: var(--fg);
  color: var(--bg);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.rank-badge {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #ffd700;
}

.xp-bar {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  height: 24px;
  margin-bottom: 12px;
  overflow: hidden;
}

.xp-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--fg) 0%, #00e68a 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
}

.xp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--bg);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.achievements-count {
  color: var(--dim);
  font-size: 0.9rem;
}

/* Activity List */
.activity-list {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #0a2a1b;
  border-radius: 12px;
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.activity-loading {
  text-align: center;
  color: var(--dim);
  padding: 20px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  font-size: 1.2rem;
  width: 32px;
  text-align: center;
}

.activity-content {
  flex: 1;
}

.activity-text {
  color: var(--fg);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.activity-time {
  color: var(--dim);
  font-size: 0.8rem;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(0, 255, 156, 0.1);
  border: 1px solid rgba(0, 255, 156, 0.3);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(0, 255, 156, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 156, 0.2);
}

.action-icon {
  font-size: 1.3rem;
}

.action-text {
  flex: 1;
  text-align: left;
}

/* Chart Container */
.chart-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #0a2a1b;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

#performance-chart {
  max-width: 100%;
  height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dashboard-modal {
    width: 95vw;
    margin: 20px;
  }
  
  .dashboard-content {
    padding: 20px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .level-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .dashboard-header {
    padding: 16px 20px;
  }
  
  .dashboard-header h2 {
    font-size: 1.3rem;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
}/
* Notification System Styles */
.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: linear-gradient(135deg, rgba(11, 15, 12, 0.95) 0%, rgba(10, 42, 27, 0.95) 100%);
  border: 1px solid #0a2a1b;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 255, 156, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: auto;
  max-width: 100%;
}

.notification.notification-enter {
  transform: translateX(0);
  opacity: 1;
}

.notification.notification-exit {
  transform: translateX(100%);
  opacity: 0;
}

.notification-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  position: relative;
}

.notification-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-body {
  flex: 1;
  min-width: 0;
}

.notification-message {
  color: var(--fg);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  word-wrap: break-word;
}

.notification-description {
  color: var(--dim);
  font-size: 0.8rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
}

/* Notification Types */
.notification-success {
  border-left: 4px solid var(--fg);
}

.notification-error {
  border-left: 4px solid #ff6b6b;
}

.notification-warning {
  border-left: 4px solid #ffd93d;
}

.notification-info {
  border-left: 4px solid var(--link);
}

.notification-achievement {
  border-left: 4px solid #ffd700;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(11, 15, 12, 0.95) 100%);
}

.notification-training {
  border-left: 4px solid var(--fg);
}

/* Progress Bar */
.notification-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fg) 0%, #00e68a 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  color: var(--dim);
  min-width: 35px;
  text-align: right;
}

/* Action Buttons */
.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.notification-btn {
  padding: 6px 12px;
  background: rgba(0, 255, 156, 0.1);
  border: 1px solid rgba(0, 255, 156, 0.3);
  border-radius: 6px;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-btn:hover {
  background: rgba(0, 255, 156, 0.2);
  transform: translateY(-1px);
}

.notification-btn:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 480px) {
  .notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .notification {
    transform: translateY(-100%);
  }
  
  .notification.notification-enter {
    transform: translateY(0);
  }
  
  .notification.notification-exit {
    transform: translateY(-100%);
  }
  
  .notification-content {
    padding: 12px;
  }
  
  .notification-actions {
    flex-direction: column;
  }
}

/* Animation for special notifications */
@keyframes achievementGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.2); }
  50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 215, 0, 0.4); }
}

.notification-achievement {
  animation: achievementGlow 2s ease-in-out infinite;
}