/* DARKLEDGER — RETRO TERMINAL & DOS STYLESHEET */

:root {
  --global-font-family: 'VT323', monospace;
  --mono-font-family: 'IBM Plex Mono', monospace;
  --pixel-font-family: 'Press Start 2P', monospace;
  
  --color-bg: #0a0a0a;
  --color-text: #33ff33;
  --color-dim: #1e991e;
  --color-glow: rgba(51, 255, 51, 0.4);
  
  --color-danger: #ff3355;
  --color-danger-glow: rgba(255, 51, 85, 0.4);
  --color-warning: #ffb733;
  --color-warning-glow: rgba(255, 183, 51, 0.4);
  --color-cyan: #00ffff;
  --color-white: #e0e0e0;
  
  --border-color: #33ff33;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--global-font-family);
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 0.5px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Scanline Overlay */
body::before {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
  z-index: 99999;
}

body::after {
  content: " ";
  display: block;
  position: fixed;
  top: 0; left: 0; bottom: 0; right: 0;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.15) 0 1px, transparent 1px 2px);
  pointer-events: none;
  z-index: 99998;
}

/* CRT Load Flicker */
@keyframes crtFlicker {
  0% { opacity: 0.8; filter: brightness(1.5) contrast(1.2); }
  50% { opacity: 1; filter: brightness(0.9); }
  100% { opacity: 1; filter: brightness(1); }
}

body {
  animation: crtFlicker 200ms ease-out;
}

/* Layout container */
.terminal-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 80px 16px;
  min-height: calc(100vh - 40px);
}

/* Header & ASCII Banner */
.ascii-banner {
  font-family: var(--mono-font-family);
  font-size: 11px;
  line-height: 1.15;
  color: var(--color-text);
  text-shadow: 0 0 6px var(--color-glow);
  white-space: pre;
  overflow-x: auto;
  margin: 0 0 12px 0;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-dim);
}

@media (max-width: 600px) {
  .ascii-banner {
    font-size: 7px;
  }
}

.brand-title {
  font-family: var(--pixel-font-family);
  font-size: 18px;
  color: var(--color-text);
  margin: 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brand-tagline {
  font-family: var(--global-font-family);
  font-size: 24px;
  color: var(--color-white);
  margin: 4px 0 16px 0;
  letter-spacing: 1px;
}

.brand-subtagline {
  font-family: var(--mono-font-family);
  font-size: 14px;
  color: var(--color-dim);
  margin-bottom: 24px;
}

/* Nav Menu */
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: #001100;
  border: 1px solid var(--color-dim);
  font-family: var(--mono-font-family);
  font-size: 13px;
}

.top-nav a {
  color: var(--color-text);
  text-decoration: none;
  padding: 2px 6px;
}

.top-nav a:hover, .top-nav a.active {
  background: var(--color-text);
  color: #000;
}

/* Section Paths */
.dos-path {
  font-family: var(--mono-font-family);
  font-size: 14px;
  color: var(--color-warning);
  margin: 20px 0 8px 0;
  text-transform: uppercase;
}

/* Blinking Cursor */
.cursor-block {
  display: inline-block;
  width: 10px;
  height: 18px;
  background-color: var(--color-text);
  vertical-align: middle;
  animation: blinkCursor 1s step-start infinite;
  margin-left: 4px;
}

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

/* Terminal Buttons */
.btn-retro {
  display: inline-block;
  font-family: var(--global-font-family);
  font-size: 22px;
  padding: 6px 18px;
  background: #000;
  color: var(--color-text);
  border: 2px solid var(--color-text);
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
  transition: none;
  user-select: none;
}

.btn-retro:hover {
  background: var(--color-text);
  color: #000;
  box-shadow: 0 0 10px var(--color-glow);
}

.btn-retro:active {
  transform: translateY(1px);
}

.btn-retro-danger {
  color: var(--color-danger);
  border-color: var(--color-danger);
}

.btn-retro-danger:hover {
  background: var(--color-danger);
  color: #000;
  box-shadow: 0 0 10px var(--color-danger-glow);
}

.btn-retro-warning {
  color: var(--color-warning);
  border-color: var(--color-warning);
}

.btn-retro-warning:hover {
  background: var(--color-warning);
  color: #000;
  box-shadow: 0 0 10px var(--color-warning-glow);
}

/* DOS Tabs */
.dos-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: -1px;
}

.dos-tab {
  font-family: var(--global-font-family);
  font-size: 20px;
  padding: 4px 16px;
  background: #001500;
  border: 1px solid var(--color-dim);
  border-bottom: none;
  color: var(--color-dim);
  cursor: pointer;
}

.dos-tab.active {
  background: #002200;
  border-color: var(--color-text);
  color: var(--color-text);
  font-weight: bold;
}

/* Lookups & Inputs */
.lookup-box {
  background: #001100;
  border: 2px solid var(--color-text);
  padding: 20px;
  box-shadow: 0 0 15px rgba(51, 255, 51, 0.2);
  margin-bottom: 28px;
}

/* Live Perimeter Telemetry HUD Banner */
.telemetry-banner {
  background: #050a05;
  border: 1px solid var(--color-warning);
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: 0 0 14px rgba(255, 183, 51, 0.15);
  font-family: var(--mono-font-family);
  animation: pulseTelemetryBorder 3s infinite;
}

@keyframes pulseTelemetryBorder {
  0%, 100% { border-color: rgba(255, 183, 51, 0.5); }
  50% { border-color: rgba(255, 183, 51, 1); box-shadow: 0 0 16px rgba(255, 183, 51, 0.3); }
}

.telemetry-header {
  font-family: var(--pixel-font-family);
  font-size: 11px;
  color: var(--color-warning);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 183, 51, 0.3);
  padding-bottom: 6px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13px;
  color: #bbb;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .telemetry-grid {
    grid-template-columns: 1fr;
  }
}

.telemetry-grid span.highlight {
  color: #33ff33;
  font-weight: bold;
}

.telemetry-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 183, 51, 0.2);
}

.prompt-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.prompt-prefix {
  font-family: var(--mono-font-family);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  text-shadow: 0 0 4px var(--color-glow);
}

/* Global High-Contrast Inputs */
input, select, textarea, .retro-input, .terminal-input {
  background: #000000 !important;
  border: 2px solid #33ff33 !important;
  color: #33ff33 !important;
  font-family: var(--mono-font-family) !important;
  font-size: 16px !important;
  font-weight: 600;
  padding: 10px 14px !important;
  outline: none !important;
  box-shadow: inset 0 0 8px rgba(0, 50, 0, 0.6);
  border-radius: 0;
  caret-color: #33ff33;
  line-height: 1.4;
}

.retro-input {
  flex: 1;
  min-width: 260px;
}

input::placeholder, textarea::placeholder, .retro-input::placeholder, .terminal-input::placeholder {
  color: #55aa55 !important;
  opacity: 0.9 !important;
  font-style: italic;
}

input:focus, select:focus, textarea:focus, .retro-input:focus, .terminal-input:focus {
  border-color: #00ffff !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.5), inset 0 0 8px rgba(0, 255, 255, 0.2) !important;
  text-shadow: 0 0 4px rgba(0, 255, 255, 0.6);
}

/* Native Select & Option dark styling */
select.retro-input, select {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
}

select option {
  background-color: #0a110a !important;
  color: #33ff33 !important;
  font-family: var(--mono-font-family) !important;
  font-size: 15px !important;
  padding: 8px 12px !important;
}

select option:checked, select option:hover {
  background-color: #003300 !important;
  color: #ffffff !important;
}

/* High Visibility Selection Highlight */
::selection {
  background-color: #33ff33 !important;
  color: #000000 !important;
}

::-moz-selection {
  background-color: #33ff33 !important;
  color: #000000 !important;
}

/* Terminal Log Rows (How It Works) */
.terminal-log-row {
  font-family: var(--mono-font-family);
  font-size: 15px;
  color: var(--color-white);
  padding: 8px 12px;
  background: #050505;
  border-left: 3px solid var(--color-text);
  margin-bottom: 8px;
}

.terminal-log-row span.step {
  color: var(--color-warning);
  font-weight: bold;
}

/* Mono Paragraphs */
.mono-text {
  font-family: var(--mono-font-family);
  font-size: 14px;
  line-height: 1.6;
  color: #bbb;
  margin-bottom: 16px;
}

/* Stats Strip */
.stats-strip {
  font-family: var(--mono-font-family);
  font-size: 13px;
  color: var(--color-cyan);
  background: #000;
  border: 1px dashed var(--color-cyan);
  padding: 10px 14px;
  margin: 24px 0;
  text-align: center;
}

/* 98.css Overrides & Integrations */
.window {
  background: #111 !important;
  border: 2px solid var(--color-dim) !important;
  color: var(--color-text) !important;
  box-shadow: 4px 4px 0 #000 !important;
  margin-bottom: 20px;
}

.title-bar {
  background: #002200 !important;
  color: var(--color-text) !important;
  padding: 4px 8px !important;
  font-family: var(--mono-font-family) !important;
  font-size: 13px !important;
  border-bottom: 1px solid var(--color-dim);
}

.title-bar-text {
  font-weight: bold;
}

.window-body {
  padding: 16px !important;
  font-family: var(--mono-font-family);
  font-size: 14px;
  color: var(--color-white);
}

/* Pricing / Unlock Windows Grid */
.windows-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

@media (max-width: 768px) {
  .windows-grid {
    grid-template-columns: 1fr;
  }
}

.price-tag {
  font-family: var(--pixel-font-family);
  font-size: 20px;
  color: var(--color-warning);
  margin: 12px 0;
}

/* LED Status Indicator */
.led-light {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.led-green {
  background: #33ff33;
  box-shadow: 0 0 8px #33ff33;
}

.led-red {
  background: #ff3355;
  box-shadow: 0 0 8px #ff3355;
  animation: pulseLed 1.2s infinite;
}

.led-amber {
  background: #ffb733;
  box-shadow: 0 0 8px #ffb733;
}

@keyframes pulseLed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Typing output log on result page */
.typing-output {
  font-family: var(--mono-font-family);
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  background: #000;
  border: 1px solid var(--color-dim);
  padding: 16px;
  margin: 16px 0;
  min-height: 120px;
}

/* Verdict box */
.verdict-box {
  border: 2px solid var(--color-danger);
  background: rgba(255, 51, 85, 0.08);
  padding: 18px;
  margin: 20px 0;
}

.verdict-box.clean {
  border-color: var(--color-text);
  background: rgba(51, 255, 51, 0.08);
}

.verdict-title {
  font-family: var(--pixel-font-family);
  font-size: 18px;
  color: var(--color-danger);
  margin-bottom: 12px;
}

.verdict-box.clean .verdict-title {
  color: var(--color-text);
}

/* Data Tables */
.retro-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono-font-family);
  font-size: 13px;
  margin: 14px 0;
}

.retro-table th, .retro-table td {
  border: 1px solid var(--color-dim);
  padding: 8px 10px;
  text-align: left;
}

.retro-table th {
  background: #001a00;
  color: var(--color-warning);
}

.retro-table tr:hover {
  background: #001100;
}

/* Bottom Status Bar */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: #000;
  border-top: 1px solid var(--color-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-family: var(--mono-font-family);
  font-size: 12px;
  color: var(--color-dim);
  z-index: 99990;
}

.status-bar span.highlight {
  color: var(--color-text);
}

/* Footer info */
.terminal-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px dashed var(--color-dim);
  font-family: var(--mono-font-family);
  font-size: 13px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.terminal-footer a {
  color: var(--color-dim);
  text-decoration: none;
}

.terminal-footer a:hover {
  color: var(--color-text);
}

/* QR Code & Invoices */
.invoice-card {
  text-align: center;
  padding: 20px;
  border: 2px solid var(--color-warning);
  background: #050905;
  margin: 16px 0;
  box-shadow: 0 0 15px rgba(255, 183, 51, 0.15);
}

.qr-image, .qr-code-img {
  display: block;
  background: #ffffff !important;
  padding: 10px;
  border: 3px solid #000000;
  outline: 2px solid #33ff33;
  margin: 14px auto;
  max-width: 220px;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  image-rendering: pixelated;
  box-shadow: 0 0 15px rgba(51, 255, 51, 0.3);
}

.timer-readout {
  font-family: var(--pixel-font-family);
  font-size: 18px;
  color: var(--color-warning);
  margin: 8px 0;
  text-shadow: 0 0 8px var(--color-warning-glow);
}

/* Crypto Tag Selector in Invoice */
.crypto-tags-container {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.crypto-tag-btn {
  background: #001100;
  border: 2px solid var(--color-dim);
  color: var(--color-text);
  font-family: var(--mono-font-family);
  font-size: 15px;
  font-weight: bold;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s ease;
  user-select: none;
}

.crypto-tag-btn:hover {
  border-color: #00ffff;
  color: #00ffff;
  background: #002211;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.crypto-tag-btn.active {
  background: #003300 !important;
  border-color: #33ff33 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(51, 255, 51, 0.5), inset 0 0 8px rgba(51, 255, 51, 0.3);
}

.crypto-tag-btn .tag-icon {
  color: #ffb733;
  margin-right: 4px;
}

/* Tier Switcher Pills */
.tier-tabs-container {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tier-tab-btn {
  background: #050505;
  border: 1px solid var(--color-dim);
  color: var(--color-dim);
  font-family: var(--pixel-font-family);
  font-size: 11px;
  padding: 8px 12px;
  cursor: pointer;
}

.tier-tab-btn.active {
  background: #001a00;
  border-color: #33ff33;
  color: #33ff33;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(51, 255, 51, 0.3);
}

.vault-badge {
  display: inline-block;
  font-family: var(--pixel-font-family);
  font-size: 11px;
  padding: 4px 8px;
  margin-bottom: 10px;
  border: 1px solid;
  text-align: center;
}

.vault-badge.btc {
  color: #f7931a;
  border-color: #f7931a;
  background: rgba(247, 147, 26, 0.1);
}

.vault-badge.eth {
  color: #00ffff;
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.1);
}

.vault-badge.usdt {
  color: #26a17b;
  border-color: #26a17b;
  background: rgba(38, 161, 123, 0.1);
}

.crypto-address-box {
  background: #000000;
  border: 1px solid #33ff33;
  padding: 10px;
  font-family: var(--mono-font-family);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
  margin: 10px 0;
  line-height: 1.4;
  letter-spacing: 0.5px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
}

.vault-card:hover .crypto-address-box {
  border-color: #00ffff;
  color: #00ffff;
}
