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

:root {
  --neon: #00ff41;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background-color: #0a0f0a;
  color: #ffffff;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  margin: 0px;
  overflow: hidden;
  height: 100vh;
  cursor: cell;
}

a, button, .icon, .sidebarentry, .backbtn, #welcomeopen, #soundToggle,
.closebutton, .minimizebutton, .context-menu-item, .terminal-input {
  cursor: pointer;
}

/* ---- Boot Screen ---- */
#bootScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
}

#bootText {
  color: var(--neon);
  font-size: 30px;
  letter-spacing: 1px;
  min-height: 26px;
}

#bootBarWrap {
  width: 500px;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid var(--neon);
  border-radius: 4px;
  margin-top: 20px;
  overflow: hidden;
}

#bootProgress {
  width: 0%;
  height: 100%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
}

#bootPercent {
  color: var(--neon);
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.7;
}

/* ---- Glow pulse on windows ---- */
@keyframes glowPulse {
  0%   { box-shadow: 0 0 6px var(--neon), 0 0 2px var(--neon) inset; }
  50%  { box-shadow: 0 0 16px var(--neon), 0 0 4px var(--neon) inset; }
  100% { box-shadow: 0 0 6px var(--neon), 0 0 2px var(--neon) inset; }
}

/* ---- Window base: hidden + animatable by default ---- */
.window {
  border: 1px solid var(--neon);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  position: absolute;
  width: 460px;
  min-height: 400px;
  max-height: 78vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: rgba(0, 0, 0, 0.85);
  padding: 20px;
  box-sizing: border-box;
  z-index: 1;
  backdrop-filter: blur(9px);
  animation: glowPulse 3s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, left 0.3s ease, top 0.3s ease, border-color 0.3s ease;
}

.window.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Individual window sizes so the layout math in JS matches exactly */
#welcome { width: 460px; height: 460px; }
#reconlog { width: 320px; height: 460px; }

.window.minimized {
  height: 48px !important;
  min-height: 48px !important;
  overflow: hidden;
}

.windowheader {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.headertext {
  margin: 0px;
  color: var(--neon);
  font-weight: 500;
  font-family: 'Orbitron', sans-serif;
}

.closebutton {
  width: 15.8px;
  height: 16px;
  background-color: #EC6B5E;
  border-radius: 16px;
  border: solid 1px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.minimizebutton {
  width: 15.9px;
  height: 16px;
  background-color: #F5BD4F;
  border-radius: 16px;
  border: solid 1px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.icon {
  text-align: center;
  padding: 8px;
  width: 68px;
  border-radius: 12px;
  user-select: none;
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.icon:hover {
  box-shadow: 0 0 12px var(--neon);
  background-color: rgba(255, 255, 255, 0.05);
}

.icon.selected {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--neon);
}

.sidebarentry {
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.sidebarentry:before {
  content: " ^";
  color: var(--neon);
}

.sidebarentry:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--neon);
  box-shadow: 0 0 10px var(--neon);
}

.backbtn {
  color: var(--neon);
  margin: 0 0 14px 0;
  border: 2px solid var(--neon);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
  transition: box-shadow 0.2s ease;
  flex-shrink: 0;
}

.backbtn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px var(--neon);
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
  padding-right: 10px;
  box-sizing: border-box;
}

.terminal-line {
  margin: 2px 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line.command {
  color: #ece7e7;
}

.terminal-line.output {
  color: var(--neon);
}

.terminal-inputrow {
  display: flex;
  align-items: center;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 8px;
  flex-shrink: 0;
}

.terminal-prompt {
  color: var(--neon);
  margin-right: 6px;
  white-space: nowrap;
  font-size: 14px;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}

.context-menu {
  position: fixed;
  display: none;
  background-color: rgba(0, 0, 0, 0.95);
  border: 1px solid var(--neon);
  border-radius: 8px;
  padding: 6px;
  z-index: 100;
  min-width: 190px;
  box-shadow: 0 0 20px var(--neon);
}

.context-menu-item {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--neon);
}

.context-menu-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ---- Custom themed scrollbars (Webkit browsers: Chrome/Edge/Safari) ---- */
.window::-webkit-scrollbar,
.terminal-output::-webkit-scrollbar {
  width: 6px;
}

.window::-webkit-scrollbar-track,
.terminal-output::-webkit-scrollbar-track {
  background: transparent;
}

.window::-webkit-scrollbar-thumb,
.terminal-output::-webkit-scrollbar-thumb {
  background-color: var(--neon);
  border-radius: 6px;
  box-shadow: 0 0 4px var(--neon);
}

/* Firefox */
.window, .terminal-output {
  scrollbar-width: thin;
  scrollbar-color: var(--neon) transparent;
}
#welcome {
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* old Edge/IE */
}

#welcome::-webkit-scrollbar {
  display: none;              /* Chrome, Safari, new Edge */
}