@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --neon-blue: #00f5ff;
  --neon-purple: #bf00ff;
  --neon-green: #39ff14;
  --neon-orange: #ff6600;
  --neon-pink: #ff1493;
  --neon-yellow: #ffff00;
  --neon-red: #ff0040;
  --mobile-padding: 1rem;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
  color: #ffffff;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.agent-card {
  background: rgba(30, 30, 60, 0.85);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform-origin: center;
}

.agent-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 245, 255, 0.3);
  border-color: var(--neon-blue);
}

.agent-card.active {
  border-color: var(--neon-purple);
  box-shadow: 0 0 30px rgba(191, 0, 255, 0.6);
  background: rgba(60, 30, 90, 0.9);
}

.agent-card.communicating {
  animation: pulse-communication 1.5s infinite;
  border-color: var(--neon-green);
}

.agent-card.thinking {
  animation: thinking-pulse 2s infinite;
  border-color: var(--neon-yellow);
}

.agent-card.transferring {
  animation: transfer-glow 2s infinite;
  border-color: var(--neon-orange);
}

.agent-card.learning {
  animation: learning-shimmer 3s infinite;
  border-color: var(--neon-pink);
}

@keyframes pulse-communication {
  0%, 100% { box-shadow: 0 0 20px rgba(57, 255, 20, 0.3); }
  50% { box-shadow: 0 0 40px rgba(57, 255, 20, 0.8); }
}

@keyframes thinking-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 0, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 255, 0, 0.8); }
}

@keyframes transfer-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 102, 0, 0.3); }
  50% { box-shadow: 0 0 40px rgba(255, 102, 0, 0.8); }
}

@keyframes learning-shimmer {
  0% { box-shadow: 0 0 20px rgba(255, 20, 147, 0.3); }
  33% { box-shadow: 0 0 40px rgba(255, 20, 147, 0.6); }
  66% { box-shadow: 0 0 60px rgba(255, 20, 147, 0.8); }
  100% { box-shadow: 0 0 20px rgba(255, 20, 147, 0.3); }
}

.neural-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.autonomy-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  animation: autonomyPulse 1.8s infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: none !important;
}

.autonomy-indicator.level-0 { background: #6b7280; }
.autonomy-indicator.level-1 { background: var(--neon-green); }
.autonomy-indicator.level-2 { background: var(--neon-blue); }
.autonomy-indicator.level-3 { background: var(--neon-orange); }
.autonomy-indicator.level-4 { background: var(--neon-pink); }

@keyframes autonomyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

.brain-activity {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 3px;
}

.brain-model {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: brainPulse 2s infinite;
}

.brain-model.gpt4 { background: var(--neon-blue); animation-delay: 0s; }
.brain-model.deepseek { background: var(--neon-purple); animation-delay: 0.5s; }
.brain-model.claude { background: var(--neon-green); animation-delay: 1s; }

@keyframes brainPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

.glass-panel {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  color: white;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.communication-flow {
  position: fixed;
  bottom: 0;
  left: 20px;
  width: calc(100% - 470px);
  height: 300px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--neon-blue);
  border-radius: 15px 15px 0 0;
  backdrop-filter: blur(25px);
  z-index: 1000;
  transform: translateY(calc(100% - 55px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.communication-flow.expanded {
  transform: translateY(0);
}

.system-monitor {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 450px;
  max-height: 65vh;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--neon-green);
  border-radius: 15px 15px 0 0;
  transform: translateY(calc(100% - 55px));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  backdrop-filter: blur(25px);
}

.system-monitor.expanded {
  transform: translateY(0);
}

.monitor-header {
  padding: 16px;
  border-bottom: 1px solid rgba(57, 255, 20, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(57, 255, 20, 0.08);
}

.monitor-content {
  padding: 16px;
  max-height: calc(65vh - 160px);
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.monitor-content::-webkit-scrollbar {
  width: 8px;
}

.monitor-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
}

.monitor-content::-webkit-scrollbar-thumb {
  background: var(--neon-green);
  border-radius: 4px;
}

.communication-bubble {
  background: rgba(30, 30, 60, 0.9);
  border: 1px solid rgba(0, 245, 255, 0.4);
  border-radius: 15px;
  padding: 12px;
  margin: 8px 0;
  animation: bubbleSlide 0.3s ease-out;
  position: relative;
}

@keyframes bubbleSlide {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.reputation-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
}

.reputation-star {
  width: 8px;
  height: 8px;
  background: var(--neon-yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: starTwinkle 2s infinite;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.mobile-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1001;
}

.floating-control {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--neon-blue);
  border-radius: 50px;
  padding: 12px 20px;
  color: var(--neon-blue);
  font-weight: bold;
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.floating-control:active {
  transform: scale(0.95);
  box-shadow: 0 0 20px var(--neon-blue);
}

.floating-control.stop {
  border-color: var(--neon-red);
  color: var(--neon-red);
}

.floating-control.stop:active {
  box-shadow: 0 0 20px var(--neon-red);
}

.google-sign-in-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  min-height: 48px;
}

.google-sign-in-btn:hover {
  background: #3367d6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
}

.metamask-connect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f6851b;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  min-height: 48px;
}

.metamask-connect-btn:hover {
  background: #e2761b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(246, 133, 27, 0.4);
}

.metamask-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(246, 133, 27, 0.1);
  border: 1px solid rgba(246, 133, 27, 0.3);
  border-radius: 8px;
  font-size: 12px;
  min-height: 48px;
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 255, 0, 0.1);
  border: 1px solid rgba(0, 255, 0, 0.3);
  border-radius: 8px;
  font-size: 12px;
  min-height: 48px;
}

.auth-status img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.knowledge-network {
  display: none !important;
}

.personality-evolution {
  display: none !important;
}

.predictive-indicator {
  display: none !important;
}

.trust-network {
  display: none !important;
}

@keyframes handleThinking {
  0% { background-position: 300% 0; }
  100% { background-position: -300% 0; }
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes balanceGlow {
  0%, 100% { color: #ffffff; }
  50% { color: var(--neon-green); text-shadow: 0 0 12px var(--neon-green); }
}

.balance-update {
  animation: balanceGlow 2.5s ease-in-out;
}

@media (max-width: 768px) {
  body {
    padding: 0;
    font-size: 14px;
  }
  
  .min-h-screen {
    padding: 1rem;
  }
  
  header h1 {
    font-size: 2.5rem !important;
    line-height: 1.2;
    margin-bottom: 0.5rem;
  }
  
  header p {
    font-size: 1rem !important;
    margin-bottom: 1rem;
  }
  
  .metric-card {
    padding: 12px;
    margin-bottom: 0.75rem;
  }
  
  .metric-card h3 {
    font-size: 0.75rem;
  }
  
  .metric-card p {
    font-size: 1.25rem !important;
  }
  
  .agent-card {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    min-height: auto;
  }
  
  .agent-card h3 {
    font-size: 0.875rem;
  }
  
  .agent-card .text-sm {
    font-size: 0.75rem;
  }
  
  .agent-card .text-xs {
    font-size: 0.625rem;
  }
  
  .agent-card .w-12.h-12 {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 0.75rem !important;
  }
  
  .agent-card .flex.items-center.justify-between.mb-3 {
    margin-bottom: 0.5rem !important;
  }
  
  .agent-card .space-y-1 {
    gap: 0.25rem !important;
  }
  
  .agent-card .grid.grid-cols-3 {
    gap: 0.25rem !important;
    padding: 0.5rem !important;
    margin-top: 0.5rem !important;
  }
  
  .agent-card .grid.grid-cols-3 > div {
    padding: 0.25rem !important;
  }
  
  .agent-card button {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem !important;
    margin-top: 0.5rem !important;
  }
  
  .agent-card .mt-2.p-2,
  .agent-card .mt-3.p-2,
  .agent-card .mt-3.p-3 {
    margin-top: 0.5rem !important;
    padding: 0.5rem !important;
  }
  
  .glass-panel {
    padding: 1rem !important;
    margin-bottom: 1rem;
  }
  
  .grid.grid-cols-1.md\:grid-cols-2.xl\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }
  
  .grid.grid-cols-1.lg\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  
  .system-monitor {
    width: calc(100% - 1rem);
    right: 0.5rem;
    left: 0.5rem;
  }
  
  .communication-flow {
    width: calc(100% - 1rem);
    left: 0.5rem;
    right: auto;
  }
  
  .mobile-controls {
    position: fixed;
    bottom: 10px;
    left: 0.5rem;
    right: 0.5rem;
    transform: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .floating-control {
    padding: 8px 12px;
    font-size: 0.75rem;
    margin: 2px;
    flex: 1;
    min-width: calc(33.333% - 0.5rem);
    text-align: center;
  }
  
  input, button, select {
    font-size: 16px !important;
    padding: 12px !important;
    border-radius: 8px !important;
    min-height: 48px !important;
  }
  
  .flex.flex-col.md\:flex-row.items-stretch.md\:items-center {
    gap: 0.75rem;
  }
  
  .flex.flex-col.md\:flex-row.items-stretch.md\:items-center > * {
    width: 100%;
  }
  
  .google-sign-in-btn,
  .metamask-connect-btn {
    width: 100% !important;
    min-width: 100% !important;
    justify-content: center;
  }
  
  .metamask-status,
  .auth-status {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  .chat-interface {
    height: auto !important;
  }
  
  .chat-messages {
    max-height: 200px !important;
  }
  
  .space-y-4.md\:space-y-6 {
    gap: 1rem !important;
  }
  
  .space-y-2 {
    gap: 0.5rem !important;
  }
  
  .flex.space-x-2 {
    gap: 0.5rem !important;
  }
  
  .text-xl.md\:text-2xl {
    font-size: 1.25rem !important;
  }
  
  .mb-3.md\:mb-4 {
    margin-bottom: 0.75rem !important;
  }
  
  .mb-4.md\:mb-6 {
    margin-bottom: 1rem !important;
  }
  
  .mb-6.md\:mb-8 {
    margin-bottom: 1.5rem !important;
  }
  
  .mt-8.md\:mt-12 {
    margin-top: 2rem !important;
  }
  
  .pt-6.md\:pt-8 {
    padding-top: 1.5rem !important;
  }
  
  .gap-3.md\:gap-4 {
    gap: 0.75rem !important;
  }
  
  .gap-4.md\:gap-6 {
    gap: 1rem !important;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2rem !important;
  }
  
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
  }
  
  .metric-card {
    padding: 8px;
  }
  
  .metric-card p {
    font-size: 1rem !important;
  }
  
  .agent-card {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .agent-card h3 {
    font-size: 0.75rem !important;
  }
  
  .agent-card .w-12.h-12 {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.625rem !important;
  }
  
  .agent-card .grid.grid-cols-3 {
    gap: 0.125rem !important;
    padding: 0.25rem !important;
  }
  
  .agent-card button {
    padding: 0.375rem 0.5rem !important;
    font-size: 0.625rem !important;
  }
  
  .floating-control {
    padding: 6px 8px;
    font-size: 0.625rem;
    min-width: calc(50% - 0.25rem);
  }
  
  .glass-panel {
    padding: 0.75rem !important;
  }
  
  input, button, select {
    padding: 10px !important;
    font-size: 14px !important;
    min-height: 44px !important;
  }
  
  .google-sign-in-btn,
  .metamask-connect-btn {
    padding: 10px 12px !important;
    font-size: 12px !important;
    min-height: 44px !important;
  }
  
  .metamask-status,
  .auth-status {
    padding: 6px 8px !important;
    font-size: 10px !important;
    min-height: 44px !important;
  }
}

.agent-card .text-xs.px-2.py-1.bg-green-500.bg-opacity-20.text-green-400.border.border-green-500.border-opacity-40.rounded {
  display: none !important;
}


.agent-card span[class*="bg-green-500"][class*="text-green-400"]:not([class*="purple"]):not([title*="edit"]):not([title*="Update"]) {
  display: none !important;
}


.agent-card span:contains("⛓️") {
  display: none !important;
}


.agent-card .flex.items-center.space-x-2 span.text-xs.px-2.py-1.bg-green-500 {
  display: none !important;
}


.agent-card span.text-xs.px-2.py-1.bg-green-500.bg-opacity-20.text-green-400 {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}


.agent-card .flex.items-center.space-x-2 > span.text-xs.px-2.py-1.bg-green-500 {
  display: none !important;
}


.agent-card span.text-xs.px-2.py-1.bg-green-500.bg-opacity-20.text-green-400::before {
  content: '' !important;
}

.agent-card span.text-xs.px-2.py-1.bg-green-500.bg-opacity-20.text-green-400 {
  font-size: 0 !important;
  color: transparent !important;
  background: transparent !important;
  border: none !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}


