:root {
  color-scheme: dark;
  --bg: #050608;
  --bg-elevated: #080b10;
  --fg: #e5fff4;
  --accent: #00ff9c;
  --accent-soft: #009f68;
  --cmd: #ffb86c;
  --cmd-list: #c792ea;
  --help: #ffd782;
  --muted: #6f7f7a;
  --danger: #ff4b61;
  --shadow: 0 0 20px rgba(0, 255, 156, 0.15);
  --font-mono: system-ui, -apple-system, BlinkMacSystemFont, "SF Mono",
               "Menlo", "Consolas", "Liberation Mono", monospace;
  --typing-speed: 45ms;
  --typing-speed-fast: 5ms;
}

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

html,
body {
  height: 100%;
  background: radial-gradient(circle at top, #0b1320 0, var(--bg) 55%);
  color: var(--fg);
  font-family: var(--font-mono);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 0.9rem;
}

.skip-animation {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 255, 156, 0.15);
  border: 1px solid rgba(0, 255, 156, 0.4);
  color: var(--accent);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease;
}

.skip-animation:focus,
.skip-animation:hover {
  opacity: 1 !important;
  pointer-events: auto !important;
  background: rgba(0, 255, 156, 0.25);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body:not(.session-complete) .skip-animation {
  opacity: 0.8;
  pointer-events: auto;
}

body.session-complete .skip-animation {
  display: none;
}

/* Pause Banner */
.pause-banner {
  background: rgba(0, 255, 156, 0.1);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  color: var(--accent);
  padding: 0.8rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  animation: banner-fade-in 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pause-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.pause-command {
  color: var(--cmd);
  font-weight: 600;
  padding: 0.1rem 0.3rem;
  background: rgba(255, 184, 108, 0.1);
  border-radius: 3px;
}

@keyframes banner-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header {
  text-align: center;
  margin-bottom: 1.5rem;
  animation: header-fade-in 1s ease-out both;
}

.ascii-logo {
  font-family: monospace;
  font-size: 0.65rem;
  line-height: 1.2;
  color: var(--accent);
  margin: 0 auto;
  text-shadow: 
    0 0 10px rgba(0, 255, 156, 0.5),
    0 0 20px rgba(0, 255, 156, 0.3);
  animation: flicker 3s infinite alternate;
}

.tagline {
  font-size: 0.75rem;
  color: var(--accent-soft);
  letter-spacing: 0.1em;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  opacity: 0.9;
  animation: blink-cursor 2s step-end infinite;
}

@keyframes header-fade-in {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flicker {
  0%, 100% {
    opacity: 1;
    text-shadow: 
      0 0 10px rgba(0, 255, 156, 0.5),
      0 0 20px rgba(0, 255, 156, 0.3);
  }
  50% {
    opacity: 0.95;
    text-shadow: 
      0 0 8px rgba(0, 255, 156, 0.6),
      0 0 15px rgba(0, 255, 156, 0.4);
  }
}

@keyframes blink-cursor {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0.4;
  }
}

.terminal {
  width: 100%;
  max-width: 840px;
  background: linear-gradient(145deg, #050608 0, #090c13 60%, #050608 100%);
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 156, 0.25);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  animation: terminal-in 600ms ease-out both;
  
  /* Subtle CRT curve effect */
  transform: perspective(1000px) rotateX(0.5deg);
  transform-style: preserve-3d;
}

.terminal::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.16) 50%,
    rgba(0, 0, 0, 0) 50%
  );
  background-size: 100% 3px;
  mix-blend-mode: soft-light;
  opacity: 0.65;
}

.terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0, rgba(0, 255, 156, 0.12), transparent 55%);
  opacity: 0;
  pointer-events: none;
  animation: glow-pulse 6s ease-in-out infinite;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(to right, #050608, #090c13);
  border-bottom: 1px solid rgba(0, 255, 156, 0.18);
  position: relative;
  z-index: 1;
}

.traffic-lights {
  display: flex;
  gap: 0.35rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.9;
}

.dot.red {
  background: #ff5f57;
}

.dot.amber {
  background: #febc2e;
}

.dot.green {
  background: #28c840;
}

.terminal-title {
  margin-left: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-body {
  position: relative;
  z-index: 1;
  padding: 1.2rem 1.4rem 1.4rem;
  font-size: 0.95rem;
  line-height: 1.6;
  max-height: 70vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar {
  width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 156, 0.3);
  border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 156, 0.5);
}

.prompt-line {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

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

.path {
  color: var(--accent-soft);
}

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

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

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

.site-name {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tagline {
  color: var(--muted);
  font-size: 0.9rem;
}

blockquote {
  border-left: 2px solid rgba(0, 255, 156, 0.6);
  margin: 0.4rem 0 0.6rem;
  padding-left: 0.8rem;
  color: var(--fg);
  font-style: italic;
}

blockquote footer {
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--muted);
}

.quote-meta {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--accent-soft);
  font-style: normal;
}

.cursor {
  width: 0.6rem;
  height: 1.1em;
  background: var(--accent);
  display: inline-block;
  margin-left: 0.1rem;
  animation: blink 1.1s step-end infinite;
}

.hint {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.meta {
  margin-top: 0.9rem;
  font-size: 0.83rem;
  color: var(--muted);
}

.meta span {
  color: var(--accent-soft);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-soft);
}

a:hover {
  color: var(--accent-soft);
  border-bottom-color: var(--accent);
}

.help-output {
  color: var(--fg);
  font-weight: 400;
}

.help-label {
  color: var(--help);
  margin-right: 0.4rem;
}

.help-command {
  color: var(--cmd-list);
}

.email-link {
  color: var(--fg);
  border-bottom-style: solid;
  border-bottom-color: rgba(255, 215, 130, 0.85);
}

.email-link::before {
  content: "<";
  margin-right: 0.1rem;
  opacity: 0.8;
}

.email-link::after {
  content: ">";
  margin-left: 0.1rem;
  opacity: 0.8;
}

.whitepaper-link {
  font-weight: 500;
  color: var(--fg);
  border-bottom-style: solid;
  border-bottom-color: rgba(255, 215, 130, 0.85);
}

.whitepaper-link::after {
  content: " ↗";
  font-size: 0.75em;
  opacity: 0.75;
}

.page-footer {
  margin-top: 0.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  width: 100%;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-link {
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-soft);
}

.footer-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.footer-button {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 156, 0.45);
  color: var(--accent);
  padding: 0.15rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.12);
}

.footer-button:hover {
  background: rgba(0, 255, 156, 0.09);
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.25);
}

.footer-button--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.prompt-line--idle {
  margin-top: 1.2rem;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

body.session-complete .prompt-line--idle {
  opacity: 1;
  animation: prompt-pulse 2s ease-in-out infinite;
}

@keyframes prompt-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 156, 0);
  }
  50% {
    box-shadow: 0 0 20px 2px rgba(0, 255, 156, 0.3);
  }
}

.prompt-line--idle:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
  animation: none;
}

.noscript-fallback {
  margin-top: 0.6rem;
}

.mobile-commands {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

body.session-complete .mobile-commands {
  opacity: 1;
}

.mobile-cmd-btn {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 156, 0.4);
  color: var(--accent);
  padding: 0.35rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  box-shadow: 0 0 0 1px rgba(0, 255, 156, 0.1);
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-cmd-btn:hover,
.mobile-cmd-btn:active {
  background: rgba(0, 255, 156, 0.12);
  box-shadow: 0 0 12px rgba(0, 255, 156, 0.3);
  border-color: var(--accent);
}

.mobile-cmd-btn:active {
  transform: scale(0.96);
}

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

@keyframes terminal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.whitepaper-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: 0.03em;
}

.whitepaper-author {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  white-space: pre-line;
}

.whitepaper-divider {
  color: rgba(0, 255, 156, 0.3);
  margin: 1.5rem 0 0.8rem;
  font-size: 0.7rem;
  overflow: hidden;
}

.whitepaper-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cmd);
  margin-bottom: 0.8rem;
  letter-spacing: 0.05em;
}

.whitepaper-content {
  color: var(--fg);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  text-align: justify;
}

.reading-dots {
  animation: reading-dots 1.5s infinite;
}

@keyframes reading-dots {
  0%, 20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%, 100% {
    content: "...";
  }
}

/* Halving Command Styles */
.halving-output {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 2px solid var(--accent);
  background: rgba(0, 255, 156, 0.02);
}

.halving-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.halving-section {
  margin: 1rem 0;
}

.halving-label {
  font-size: 0.9rem;
  color: var(--cmd);
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.halving-formula {
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 0.95rem;
  color: var(--fg);
  line-height: 1.5;
  margin: 0.5rem 0;
  padding: 0.5rem 0;
  white-space: pre;
  letter-spacing: 0.02em;
}

.halving-schedule {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0, 255, 156, 0.15);
}

.halving-philosophy {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.5rem;
}

@media (max-width: 600px) {
  .terminal-body {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .terminal-title {
    font-size: 0.7rem;
  }

  .site-header {
    margin-bottom: 1rem;
  }

  .ascii-logo {
    font-size: 0.45rem;
  }

  .tagline {
    font-size: 0.65rem;
  }
}
