@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

:root {
  --green:      #00ff41;
  --green-dim:  #00cc33;
  --green-dark: #003d10;
  --bg:         #0a0f0a;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Share Tech Mono', monospace;
  color: var(--green);
}

body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px);
  pointer-events: none;
  z-index: 500;
}

#matrix-canvas {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
}

#terminal {
  position: fixed; inset: 0;
  padding: 20px 28px 80px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
}
#terminal::-webkit-scrollbar { width: 4px; }
#terminal::-webkit-scrollbar-track { background: transparent; }
#terminal::-webkit-scrollbar-thumb { background: var(--green-dark); border-radius: 2px; }

#boot { margin-bottom: 24px; }
.boot-line { font-size: 13px; color: var(--green-dim); line-height: 1.6; opacity: 0; }
.boot-line.show { animation: linein 0.1s ease forwards; }
.boot-line.bright { color: var(--green); }
.boot-line.dim    { color: #006618; }
@keyframes linein { to { opacity: 1; } }

.output-line {
  display: flex; align-items: baseline;
  margin-bottom: 2px; font-size: 15px; line-height: 1.55;
  opacity: 0; animation: linein 0.05s ease forwards;
}
.prompt-prefix { color: var(--green-dim); white-space: nowrap; flex-shrink: 0; }
.prompt-prefix .user { color: var(--green); }
.prompt-prefix .at   { color: #006618; }
.prompt-prefix .host { color: var(--green-dim); }
.prompt-prefix .path { color: #008822; }
.prompt-prefix .sym  { color: var(--green); }
.line-text { color: var(--green); word-break: break-all; flex: 1; }

/* Response lines (command output) */
.response-line {
  display: block;
  margin-bottom: 2px; font-size: 14px; line-height: 1.55;
  color: var(--green-dim);
  padding-left: 2px;
  opacity: 0; animation: linein 0.05s ease forwards;
  white-space: pre-wrap;
}
.response-line.bright { color: var(--green); }
.response-line.error  { color: #ff4444; }

#input-line {
  display: block;
  font-size: 15px; line-height: 1.55; margin-top: 2px;
  word-break: break-all;
}
#input-line .prompt-prefix { display: inline; white-space: pre; }
#current-text { color: var(--green); display: inline; word-break: break-all; }

#cursor {
  display: inline-block; width: 9px; height: 15px;
  background: var(--green); margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 8px var(--green);
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

#gear-btn {
  position: fixed; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: rgba(0,255,65,0.05);
  border: 1px solid rgba(0,255,65,0.2); border-radius: 3px;
  color: rgba(0,255,65,0.5); font-size: 16px;
  cursor: pointer; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.3s, color 0.2s;
}
#gear-btn:hover { background: rgba(0,255,65,0.12); color: var(--green); box-shadow: 0 0 10px rgba(0,255,65,0.2); }
#gear-btn.open  { transform: rotate(90deg); color: var(--green); }

#settings-panel {
  position: fixed; top: 60px; right: 16px; width: 260px;
  background: rgba(4,10,4,0.97);
  border: 1px solid rgba(0,255,65,0.25); border-radius: 4px;
  padding: 16px 18px; z-index: 300;
  transform: translateY(-8px) scale(0.97); opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 0 24px rgba(0,255,65,0.1);
  max-height: calc(100vh - 80px); overflow-y: auto;
}
#settings-panel::-webkit-scrollbar { width: 3px; }
#settings-panel::-webkit-scrollbar-thumb { background: var(--green-dark); }
#settings-panel.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }

.s-title { font-size: 12px; color: var(--green); text-shadow: 0 0 8px var(--green); letter-spacing: 1px; margin-bottom: 14px; }
.s-section { font-size: 10px; color: rgba(0,255,65,0.35); letter-spacing: 2px; margin: 14px 0 10px; }
.s-row { margin-bottom: 14px; }
.s-row:last-child { margin-bottom: 0; }
.s-label { display: flex; justify-content: space-between; font-size: 11px; color: rgba(0,255,65,0.6); margin-bottom: 7px; }
.s-val { color: var(--green); text-shadow: 0 0 6px var(--green); }

input[type=range] {
  width: 100%; -webkit-appearance: none; height: 3px; border-radius: 2px;
  background: rgba(0,255,65,0.18); outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 2px;
  background: var(--green); cursor: pointer; box-shadow: 0 0 6px var(--green);
}
.s-divider { border: none; border-top: 1px solid rgba(0,255,65,0.1); margin: 12px 0; }
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.s-btn {
  background: rgba(0,255,65,0.04); border: 1px solid rgba(0,255,65,0.15); border-radius: 3px;
  color: rgba(0,255,65,0.45); font-family: 'Share Tech Mono', monospace;
  font-size: 11px; padding: 6px 4px; cursor: pointer; text-align: center; transition: all 0.15s;
}
.s-btn:hover { background: rgba(0,255,65,0.1); color: var(--green); }
.s-btn.active { background: rgba(0,255,65,0.14); border-color: rgba(0,255,65,0.45); color: var(--green); box-shadow: 0 0 6px rgba(0,255,65,0.2); }

/* Bottom toolbar */
#toolbar {
  position: fixed; bottom: 18px; right: 16px;
  display: flex; gap: 8px; z-index: 300;
}
.toolbar-btn {
  background: rgba(0,255,65,0.05); border: 1px solid rgba(0,255,65,0.2); border-radius: 3px;
  color: rgba(0,255,65,0.45); font-family: 'Share Tech Mono', monospace;
  font-size: 12px; padding: 6px 14px; cursor: pointer; transition: all 0.2s;
}
.toolbar-btn:hover { background: rgba(0,255,65,0.12); color: var(--green); box-shadow: 0 0 10px rgba(0,255,65,0.2); }
