/* ==========================================
   PROJECT EMERGENCE - Minimal Black & White
   Clean, dark, monochrome aesthetic
   ========================================== */

:root {
  /* Monochrome palette */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-panel: #050505;

  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #555555;

  --border-color: #222222;

  /* Accent - minimal use */
  --accent: #ffffff;
  --alpha-color: #ffffff;
  --beta-color: #888888;

  --success: #ffffff;
  --error: #ff3333;

  /* Fonts */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --gap: 16px;
  --radius: 2px;
}

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

/* Base */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

/* Scanlines overlay - subtle */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.15;
}

/* Main container */
.glitch-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: var(--gap);
  gap: var(--gap);
}

/* ==========================================
   Header
   ========================================== */

.header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.logo-image {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 12px;
  color: var(--text-primary);
  text-transform: uppercase;
  margin: 0;
}

.tagline {
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Hide old ASCII logo */
.ascii-logo {
  display: none;
}

.status-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 12px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.status-label {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.status-value {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse {
  width: 6px;
  height: 6px;
  background: var(--text-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ==========================================
   Main Content
   ========================================== */

.main-content {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: var(--gap);
  flex: 1;
  min-height: 0;
}

/* Panels */
.panel {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.panel-icon {
  color: var(--text-muted);
  font-size: 11px;
}

.panel-title {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  flex: 1;
  text-transform: uppercase;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* Scrollbar */
.panel-content::-webkit-scrollbar {
  width: 4px;
}

.panel-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.panel-content::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================
   About Panel
   ========================================== */

.about-section {
  margin-bottom: 24px;
}

.about-section h3 {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 400;
  letter-spacing: 1px;
}

.about-section p {
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 8px;
  line-height: 1.7;
}

.highlight {
  color: var(--text-primary);
  font-weight: 500;
}

/* Agent info cards */
.agent-info {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border-left: 2px solid var(--border-color);
}

.agent-info.alpha {
  border-color: var(--text-primary);
}

.agent-info.beta {
  border-color: var(--text-muted);
}

.agent-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.agent-icon {
  font-size: 12px;
  opacity: 0.7;
}

.agent-name {
  font-weight: 500;
  font-size: 11px;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.agent-role {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.agent-info p {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Process list */
.process-list {
  list-style: none;
}

.process-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 10px;
  color: var(--text-muted);
}

.step-num {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Social link */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.2s ease;
}

.social-link:hover {
  border-color: var(--text-muted);
  background: var(--bg-tertiary);
}

.social-icon {
  font-size: 14px;
}

/* ==========================================
   Conversation Panel
   ========================================== */

.restart-btn {
  padding: 4px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.restart-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.live-dot {
  width: 5px;
  height: 5px;
  background: var(--text-primary);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.conversation-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.waiting-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  gap: 16px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Message bubbles */
.message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 2px solid var(--border-color);
  animation: fadeIn 0.3s ease;
}

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

.message.alpha {
  border-color: var(--text-primary);
}

.message.beta {
  border-color: var(--text-muted);
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.message-agent {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 1px;
}

.message.alpha .message-agent {
  color: var(--text-primary);
}

.message.beta .message-agent {
  color: var(--text-secondary);
}

/* Thinking indicator */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text-muted);
  font-size: 11px;
  animation: fadeIn 0.3s ease;
}

.thinking-dots {
  display: flex;
  gap: 4px;
}

.thinking-dots span {
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: thinkingPulse 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes thinkingPulse {
  0%, 60%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  30% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.thinking-text {
  letter-spacing: 0.5px;
}

.message-time {
  font-size: 9px;
  color: var(--text-muted);
}

.message-content {
  color: var(--text-secondary);
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

/* ==========================================
   Activity Panel
   ========================================== */

.launches-container,
.twitter-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.no-launches,
.no-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--text-muted);
  gap: 8px;
}

.empty-icon {
  font-size: 20px;
  opacity: 0.2;
}

/* Launch cards */
.launch-card {
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  animation: launchGlow 1s ease-out;
}

@keyframes launchGlow {
  from { border-color: var(--text-primary); }
  to { border-color: var(--border-color); }
}

.launch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.launch-name {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-primary);
}

.launch-ticker {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 11px;
}

.launch-description {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.launch-link {
  display: inline-block;
  font-size: 9px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.launch-link:hover {
  color: var(--text-primary);
}

/* Twitter activity cards */
.twitter-card {
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 2px solid var(--text-muted);
}

.twitter-action {
  font-size: 9px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.twitter-content {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-text {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.separator {
  color: var(--border-color);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.connection-dot.connected {
  background: var(--text-primary);
  animation: pulse 2s ease-in-out infinite;
}

.connection-dot.disconnected {
  background: var(--error);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 1fr 1fr;
  }

  .about-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
  }

  .project-title {
    font-size: 24px;
    letter-spacing: 8px;
  }

  .logo-image {
    width: 40px;
    height: 40px;
  }

  .status-bar {
    flex-wrap: wrap;
    gap: 20px;
  }
}

/* ==========================================
   Minimal animations
   ========================================== */

body {
  animation: none;
}
