:root {
  --bg-primary: #0a0a2e;
  --bg-secondary: #1a0a3e;
  --bg-surface: rgba(255, 255, 255, 0.05);
  --bg-surface-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #e8eaed;
  --text-secondary: rgba(232, 234, 237, 0.7);
  --text-accent: #80d8ff;
  --accent-cyan: #4fc3f7;
  --accent-green: #00e676;
  --accent-orange: #ff6f00;
  --accent-red: #ff1744;
  --accent-amber: #ffab00;
  --accent-purple: #b388ff;
  --glow-cyan: 0 0 20px rgba(79, 195, 247, 0.5), 0 0 60px rgba(79, 195, 247, 0.2);
  --glow-green: 0 0 20px rgba(0, 230, 118, 0.5), 0 0 60px rgba(0, 230, 118, 0.2);
  --glow-orange: 0 0 20px rgba(255, 111, 0, 0.5), 0 0 60px rgba(255, 111, 0, 0.2);
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 40px;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --border-glow: 1px solid rgba(79, 195, 247, 0.3);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary), #0d1b3e, var(--bg-primary));
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#app {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-width: 500px;
  margin: 0 auto;
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.screen-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  gap: var(--spacing-md);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-hidden {
  display: none !important;
}

.screen-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-accent);
  text-shadow: 0 0 20px rgba(128, 216, 255, 0.3);
}

.hidden {
  display: none !important;
}

/* Star field background */
.star-field {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.star-field::before,
.star-field::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 20% 50%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 30% 10%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 50% 40%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 60% 80%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 90% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 35% 95%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 45% 5%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 55% 55%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 65% 45%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 75% 75%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 25%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 95% 65%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 5% 55%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 48% 88%, rgba(255,255,255,0.5), transparent);
  animation: starDrift 120s linear infinite;
}

.star-field::after {
  animation-duration: 180s;
  animation-direction: reverse;
  opacity: 0.5;
}

@keyframes starDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-25%, -25%); }
}

/* Debug overlay */
.debug-overlay {
  position: fixed;
  bottom: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(79, 195, 247, 0.3);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  z-index: 1000;
  pointer-events: none;
}

.debug-overlay div {
  line-height: 1.4;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(79, 195, 247, 0.3);
  border-radius: 2px;
}
