:root {
  --bg: #060f11;
  --fg: #ffffff;
  --fg-dim: #6f93a0;
  --accent: #48d597;

  /* Orb mode colors (single source of truth) */
  --orb-smart-primary: #7cff7c;
  --orb-smart-secondary: #48d597;
  --orb-chill-primary: #0078ff;
  --orb-chill-secondary: #b4dcff;
  --orb-rush-primary: #ff5000;
  --orb-rush-secondary: #ffe696;

  /* Orb display gradient (used by #orb) */
  --orb-gradient-from: var(--orb-smart-primary);
  --orb-gradient-to: var(--orb-smart-secondary);
  /* Five-color palette */
  --p1: #236a4c;
  /* Dark emerald */
  --p2: #48d597;
  /* Emerald */
  --p3: #060f11;
  /* Ink black */
  --p4: #151515;
  /* Onyx */
  --p5: #d7d8d9;
  /* Alabaster Grey */
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Fira Code", Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 1.5rem;
  width: min(960px, calc(100% - 32px));
  height: min(560px, 100vh - 32px);
}

@media (max-width: 800px) {
  body {
    align-items: stretch;
    justify-content: stretch;
  }

  .page {
    grid-template-columns: 1fr;
    /* Give the animation more screen space on mobile */
    grid-template-rows: minmax(180px, 35vh) 1fr;
    height: calc(100vh - 32px);
    height: calc(100svh - 32px);
  }

  /* Padding belongs on the panel, not the xterm container (padding can break fit). */
  .left {
    padding: 10px 8px;
  }

  #terminal {
    padding: 0;
  }
}

.left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-size: 13px;
  min-height: 0;
}

#terminal {
  flex: 1;
  min-height: 0;
}

/* Ensure xterm inherits your color scheme */
#terminal .xterm-viewport {
  background: transparent;
}

.prompt-line {
  color: var(--accent);
}

.path {
  color: var(--fg-dim);
}

.command {
  color: var(--fg);
}

.output-muted {
  color: var(--fg-dim);
}

.block {
  margin-bottom: 0.9rem;
}

.links a {
  color: var(--accent);
  text-decoration: none;
}

.links a+a {
  margin-left: 1.1rem;
}

.links a:hover {
  color: #e6ffe6;
  text-decoration: underline;
}

.cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  background: var(--accent);
  animation: blink 1.1s steps(1, end) infinite;
  vertical-align: baseline;
}

@keyframes blink {

  0%,
  60% {
    opacity: 1;
  }

  60.001%,
  100% {
    opacity: 0;
  }
}

.note {
  margin-top: auto;
  font-size: 11px;
  color: var(--fg-dim);
}

.right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  min-height: 0;
  overflow: hidden;
}

#orb {
  margin: 0;
  line-height: 1.0;
  font-size: 12px;
  user-select: none;
  cursor: crosshair;
  /* Fallback if background-clip:text isn't supported */
  color: var(--orb-gradient-to);
  background-image: linear-gradient(90deg, var(--orb-gradient-from), var(--orb-gradient-to));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: pre;
}

@media (max-width: 600px) {
  #orb {
    font-size: 10px;
  }
}
