:root {
  --bg: #040507;
  --fg: #f4f4f2;
  --accent: #61ffa8;
  --muted: #6e7b85;
}

* {
  box-sizing: border-box;
}

html {
  overflow: hidden !important;
  height: 100% !important;
  width: 100% !important;
  position: fixed;
  top: 0;
  left: 0;
  overscroll-behavior-y: auto; /* Allow pull-to-refresh */
  overscroll-behavior-x: none; /* Prevent horizontal overscroll */
}

@font-face {
  font-family: 'Source Code Pro';
  src: url('../assets/fonts/SourceCodeVF-Upright.otf.woff2') format('woff2'),
       url('../assets/fonts/SourceCodeVF-Upright.otf.woff') format('woff');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh !important;
  width: 100% !important;
  overflow: hidden !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  font-family: 'Source Code Pro', 'Space Mono', Consolas, 'SFMono-Regular', 'Roboto Mono', Menlo, Monaco, monospace;
  background-color: var(--bg);
  color: var(--fg);
  background-image:
    radial-gradient(circle at 38% 28%, rgba(120, 132, 255, 0.28), transparent 72%),
    radial-gradient(circle at 72% 35%, rgba(208, 148, 255, 0.2), transparent 68%),
    radial-gradient(circle at center, rgba(12, 8, 38, 0.9), rgba(3, 3, 12, 0.98)),
    linear-gradient(150deg, #080031 0%, #03001a 55%, #010106 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center center;
  overscroll-behavior-y: auto;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"160\" height=\"160\" viewBox=\"0 0 160 160\"%3E%3Crect fill=\"rgba(255,255,255,0.03)\" width=\"1\" height=\"1\"/%3E%3C/svg%3E');
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

main.app-shell {
  position: relative;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  z-index: 1;
  overflow: hidden;
}

.background-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
}

.logo-satellite {
  position: absolute;
  width: clamp(800px, 88vw, 1200px);
  max-width: 100vw;
  opacity: 0.07;
  overflow: hidden;
}

.logo-satellite img {
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  filter: grayscale(0.2) contrast(1.2) brightness(1.1);
  animation: spin 300s linear infinite;
}

.particle-field {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 160px 160px;
  opacity: 0.25;
  animation: drift 60s linear infinite;
}

.boot-sequence,
.terminal {
  width: min(960px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  background: rgba(4, 5, 7, 0.52);
  backdrop-filter: blur(2px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

.boot-sequence {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1.5rem;
  width: min(960px, 90vw);
  z-index: 2;
}

.boot-log {
  margin: 0;
  font: inherit;
  color: #1c9f63;
  white-space: pre-wrap;
  min-height: 12rem;
}

.boot-sequence.boot-complete {
  opacity: 0;
  transform: translate(-50%, -55%);
  transition: opacity 300ms ease, transform 300ms ease;
  pointer-events: none;
}

.terminal {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  height: min(640px, 85vh);
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease;
  position: relative;
}

.terminal-logo {
  position: absolute;
  top: 0;
  right: 0;
  width: 5rem;
  height: 5rem;
  transform: translate(20%, -20%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 20;
}

.terminal-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(0.3) contrast(1.1);
}

.terminal.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.terminal-heading {
  font-size: 1.8rem; /* same as h2 */
  font-weight: 700;
  margin: 0;
}

.terminal-output {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: none;
  position: relative;
}

.terminal-output::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.scroll-indicator {
  position: absolute;
  bottom: calc(1.25rem + 1.5rem + 2.25rem); 
  left: 1.5rem; /* Match terminal padding */
  right: 1.5rem; /* Match terminal padding */
  height: 3rem;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(4, 5, 7, 0.3) 30%,
    rgba(4, 5, 7, 0.6) 60%,
    rgba(4, 5, 7, 0.9) 85%,
    rgba(4, 5, 7, 1) 100%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.5rem;
  z-index: 10;
}

.scroll-indicator.is-visible {
  opacity: 1;
}

.scroll-indicator::after {
  content: '↓';
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(97, 255, 168, 0.6);
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.output-block p,
.output-block pre,
.output-block code {
  margin: 0;
  line-height: 1.4;
  flex-shrink: 0;
}

.output-block {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.0rem;
  padding: 0.0rem 1.25rem 0.5rem 1.25rem;
  border-left: 3px solid var(--accent);
  animation: slide-in 240ms ease;
  min-height: fit-content;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  flex-shrink: 0;
}

.paged-block {
  padding-bottom: 0.75rem;
}

.paged-body {
  min-height: 0;
}

.page-chunk.hidden {
  display: none !important;
}

.page-nav {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.page-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.page-btn[disabled] {
  opacity: 0.3;
  cursor: default;
}

.page-counter {
  min-width: 3.2rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.output-block.is-error {
  border-left-color: #ff6b6b;
}

.output-block.is-system {
  border-left-color: var(--accent);
}

.error {
  color: #ff8a8a;
}

.muted {
  color: var(--muted);
}

.marked {
  color: var(--accent);
}

.hidden {
  display: none !important;
}

code {
  background: rgba(60, 60, 60, 0.30);
  color: #776af0;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 1.15em;
}

.content-block {
  margin: 0;
}



.command-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.command-list li {
  margin-bottom: 0.35rem;
}

.highlights-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.highlight {
  flex: 1;
  min-width: min(260px, 100%);
}

.highlight h4 {
  margin: 0 0 0.2rem;
}

.highlight p {
  margin: 0.15rem 0;
}

.badge-strip {
  display: flex;
  gap: 0.75rem;
  margin: 0.4rem 0;
}

.badge-strip img {
  width: 82px;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.cat-block {
  margin: 0;
  text-align: left;
}

.cat-block img {
  display: block;
  width: 50%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  border-radius: 0.5rem;
  margin: 0;
}

.cat-block figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
form.terminal-input {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.prompt-label {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.input-wrapper {
  position: relative;
  flex: 1;
  font: inherit;
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  font: inherit;
  color: var(--fg);
  caret-color: var(--accent);
  position: relative;
  z-index: 1;
}

.input-wrapper input:focus {
  outline: none;
}

#input-suggestion {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font: inherit;
  color: var(--muted);
  opacity: 0.35;
  pointer-events: none;
  white-space: pre;
  z-index: 0;
}

@keyframes orbit {
  0% {
    transform: translate(-20%, -20%);
  }
  25% {
    transform: translate(80%, -10%);
  }
  50% {
    transform: translate(60%, 60%);
  }
  75% {
    transform: translate(-10%, 70%);
  }
  100% {
    transform: translate(-20%, -20%);
  }
}

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

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-160px, -160px, 0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
