@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;700&display=swap');

:root {
  --bg:           #0C0C14;
  --bg-secondary: #141420;
  --bg-highlight: #1E1E30;
  --border:       #2A2A40;
  --text:         #CCCCCC;
  --text-dim:     #555577;
  --green:        #33FF33;
  --amber:        #FFB000;
  --cyan:         #00CCCC;
  --magenta:      #DD00DD;
  --red:          #DD4444;
}

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

html {
  font-size: clamp(12px, 1.4vw, 16px);
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  line-height: 1.6;
}

/* ── Scanline overlay ─────────────────────────── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.06) 0px,
    rgba(0, 0, 0, 0.06) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ── Main screen container ────────────────────── */
.screen {
  max-width: 80ch;
  width: 100%;
  border-radius: 8px;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(12, 12, 20, 0.8);
  padding: 0 0 1rem;
  position: relative;
  background: var(--bg);
}

/* Content inside the ASCII border gets indented */
.screen-content {
  padding: 0 3ch;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
}

/* ── Box-drawing header bar ───────────────────── */
.screen-header {
  color: var(--cyan);
  margin-bottom: 1em;
  overflow: hidden;
}

/* ── ASCII art blocks ─────────────────────────── */
pre {
  font-family: inherit;
  line-height: 1.3;
  overflow-x: auto;
  margin: 0;
}

.logo-art {
  color: var(--amber);
  display: flex;
  justify-content: center;
  margin: 0 0 0.75rem 0;
  padding: 0;
  text-shadow:
    0 0 4px rgba(255, 176, 0, 0.3),
    0 0 8px rgba(255, 176, 0, 0.15);
}

.logo-art pre {
  text-align: left;
}

.logo-art-full pre {
  font-size: clamp(4px, 1.1vw, 8px);
  line-height: 1.2;
  overflow: hidden;
}

.logo-svg {
  width: clamp(100px, 25vw, 180px);
  height: auto;
  filter: invert(1) brightness(0.8) sepia(1) hue-rotate(10deg) saturate(5);
  opacity: 0.9;
}

/* ── Section dividers ─────────────────────────── */
.divider,
.divider-bottom,
.section-underline {
  color: var(--text-dim);
  white-space: pre;
  overflow: hidden;
  max-width: 100%;
}

.divider {
  margin: 1.5rem 0 0.5rem;
}

.divider-bottom {
  margin: 0.5rem 0 0;
}

/* ── Welcome section ──────────────────────────── */
.welcome {
  margin-bottom: 1rem;
  text-align: center;
}

.welcome .tagline {
  color: var(--text);
  margin: 0.25rem 0;
}

/* ── Menu items ───────────────────────────────── */
.menu-number {
  color: var(--cyan);
  font-weight: 700;
}

.section-title {
  color: var(--green);
  font-weight: 700;
  text-shadow:
    0 0 3px rgba(51, 255, 51, 0.3);
}

.section {
  margin-bottom: 1.5rem;
}

/* ── Quick start commands ─────────────────────── */
.cmd {
  margin: 0.25rem 0;
  overflow-wrap: break-word;
  word-break: break-all;
}

.cmd .prompt {
  color: var(--green);
  font-weight: 700;
}

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

/* ── Links ── overflow handling ────────────────── */
.section p {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Links ────────────────────────────────────── */
a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
}

a:hover {
  color: var(--green);
  text-shadow: 0 0 6px rgba(51, 255, 51, 0.4);
}

.arrow {
  color: var(--amber);
}

/* ── Prompt / cursor ──────────────────────────── */
.prompt-line {
  margin-top: 1.5rem;
  color: var(--text-dim);
}

.cursor {
  color: var(--green);
  font-weight: 700;
}

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

.cursor::after {
  content: '█';
  animation: cursor-blink 1s step-end infinite;
}

/* ── Status bar ───────────────────────────────── */
.status-bar {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.status-bar .label {
  color: var(--cyan);
}

.status-bar .sep {
  color: var(--border);
  margin: 0 0.5ch;
}

.footer-line {
  margin-top: 0.25rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ── Typing animation ─────────────────────────── */
.typed-section {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.typed-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skip animation entirely if no JS */
.no-js .typed-section {
  opacity: 1;
  transform: none;
}

/* ── Responsive ───────────────────────────────── */

/* Tablet */
@media (max-width: 720px) {
  .screen {
    padding: 1rem 0;
  }

  .screen-content {
    padding: 0 2ch;
  }
}

/* Mobile */
@media (max-width: 480px) {
  html {
    font-size: 12px;
  }

  .screen {
    border-radius: 0;
    box-shadow: none;
    padding: 0.5rem 0;
  }

  .screen-content {
    padding: 0 1ch;
  }

  .logo-art-full {
    display: none;
  }

  .logo-art-mini {
    display: flex;
    justify-content: center;
  }

  .screen-header .header-full {
    display: none;
  }

  .screen-header .header-mini {
    display: block;
    text-align: center;
  }
}

@media (min-width: 481px) {
  .logo-art-mini {
    display: none;
  }

  .screen-header .header-mini {
    display: none;
  }
}

/* ── Accessibility ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }

  .typed-section {
    opacity: 1;
    transform: none;
  }
}

/* ── Selection color ──────────────────────────── */
::selection {
  background: var(--green);
  color: var(--bg);
}
