:root {
  --background: #101010;
  --foreground: #f0f0f0;
  --green: #39ff14;
  --yellow: #f8d808;
  --blue: #00bfff;
  --red: #ff3131;
  --purple: #d420ff;
  --cyan: #00ffff;
  --orange: #ffac1c;
}

/* MATE Terminal Theme Variables */
:root {
  --mate-bg: #000000; /* Pure black background */
  --mate-fg: #aaaaaa; /* Light gray foreground */
  --mate-border: #cc0000; /* Red border */
  --mate-glow: rgba(255, 0, 0, 0.2); /* Subtle red glow */

  --font-primary: "Rajdhani", "Orbitron", sans-serif;
  --font-mono: "DejaVu Sans Mono", "Liberation Mono", "Consolas", monospace;
}

body {
  margin: 0;
  padding: 0;
  background: var(--mate-bg);
  font-family: var(--font-mono);
  overflow: hidden;
  color: var(--mate-fg);
}

#terminal {
  width: 100vw;
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
  /* Clean styling with subtle red glow */
  border: 1px solid var(--mate-border);
  border-radius: 3px;
  box-shadow: 0 0 15px var(--mate-glow);
}

.xterm .xterm-viewport {
  background-color: var(--background);
}

/* ========================================
   MOBILE OPTIMIZATION (70% of traffic!)
   ======================================== */

/* Mobile-first responsive design */
@media (max-width: 768px) {
  #terminal {
    padding: 10px;
    border-width: 1px;
    font-size: 14px;
  }

  /* Optimize touch targets */
  .xterm-rows {
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  #terminal {
    padding: 5px;
    font-size: 12px;
  }
}

/* Mobile keyboard shortcuts bar */
#mobile-shortcuts {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid var(--mate-border);
  padding: 8px;
  z-index: 1000;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 5px;
}

@media (max-width: 768px) {
  #mobile-shortcuts {
    display: flex;
  }

  #terminal {
    padding-bottom: 60px; /* Space for shortcuts bar */
  }
}

.shortcut-btn {
  background: var(--mate-border);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.shortcut-btn:active {
  transform: scale(0.95);
  background: var(--red);
}

/* Responsive font scaling */
@media (min-width: 1920px) {
  #terminal {
    font-size: 16px;
  }
}

/* Touch feedback */
.xterm-screen {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Loading spinner for async operations */
.loading-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--mate-border);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
