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

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

:root {
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-dark: #009922;
  --green-glow: rgba(0, 255, 65, 0.15);
  --bg: #0a0a0a;
  --bg-light: #111111;
  --border: #1a3a1a;
  --text-dim: #4a7a4a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--green);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: var(--green);
  color: var(--bg);
}

/* Scanline effect */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* CRT flicker */
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.9; }
  97% { opacity: 1; }
}

#crt-wrapper {
  animation: flicker 8s infinite;
}

/* Terminal window */
.terminal {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
}

/* Top bar */
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1px solid;
}
.dot-red { background: #ff5f56; border-color: #e0443e; }
.dot-yellow { background: #ffbd2e; border-color: #dea123; }
.dot-green { background: #27c93f; border-color: #1aab29; }

.terminal-title {
  flex: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

.terminal-body {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  padding: 30px 24px;
  background: var(--bg);
  min-height: calc(100vh - 80px);
}

/* Navigation */
.nav {
  display: flex;
  gap: 6px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.nav-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--green-dim);
  font-family: inherit;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}

.nav-link:hover, .nav-link.active {
  background: var(--green-glow);
  border-color: var(--green-dark);
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

/* Prompt line */
.prompt {
  color: var(--green-dim);
  margin-bottom: 4px;
}
.prompt .path { color: #5599ff; }
.prompt .arrow { color: var(--green); }

/* Cursor */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ASCII art */
.ascii-art {
  font-size: 10px;
  line-height: 1.15;
  white-space: pre;
  color: var(--green);
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
  margin: 20px 0;
  overflow-x: hidden;
}

@media (max-width: 700px) {
  .ascii-art { font-size: 5.5px; }
}
@media (max-width: 400px) {
  .ascii-art { font-size: 4px; }
}

/* Output text */
.output {
  margin: 16px 0;
  padding-left: 2px;
}

.output p {
  margin-bottom: 10px;
  color: #b0e0b0;
}

.output .highlight {
  color: var(--green);
  text-shadow: 0 0 6px var(--green-glow);
}

.output a {
  color: #5599ff;
  text-decoration: none;
  border-bottom: 1px dashed #5599ff44;
}
.output a:hover {
  text-shadow: 0 0 10px rgba(85, 153, 255, 0.4);
  border-bottom-color: #5599ff;
}

/* Separator */
.sep {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 24px 0;
}

/* Status bar */
.status-line {
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 8px;
}

/* Section headers */
.section-header {
  color: var(--green);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Legal text */
.legal-text {
  color: #8ab88a;
  font-size: 13px;
  line-height: 1.8;
}

.legal-text h3 {
  color: var(--green);
  font-size: 13px;
  margin: 20px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.legal-text p {
  margin-bottom: 10px;
}

.legal-text ul {
  margin: 8px 0 8px 20px;
}

.legal-text li {
  margin-bottom: 4px;
}

/* Info blocks */
.info-block {
  border-left: 2px solid var(--green-dark);
  padding: 12px 16px;
  margin: 16px 0;
  background: rgba(0, 255, 65, 0.02);
}

.info-block h3 {
  color: var(--green);
  font-size: 13px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.info-block p, .info-block li {
  color: #8ab88a;
  font-size: 13px;
  margin-bottom: 4px;
}

/* Boot sequence */
.boot-line {
  opacity: 0;
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 2px;
}

.boot-line.ok::after {
  content: ' [OK]';
  color: var(--green);
}

.boot-line.visible {
  opacity: 1;
}

/* Focus area hover effect */
.focus-item {
  padding: 8px 12px;
  margin: 4px 0;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.focus-item:hover {
  border-left-color: var(--green);
  background: rgba(0, 255, 65, 0.03);
}

.focus-item .label {
  color: var(--green-dim);
  font-size: 12px;
}

.focus-item .desc {
  color: #8ab88a;
  font-size: 12px;
  margin-top: 2px;
}

/* Footer */
.footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* Matrix rain canvas */
#matrix-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.04;
}
