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

:root {
  --bg: #020a12;
  --panel: #050f1c;
  --border: #0c2236;
  --surface: #071422;
  --laser: #ff2040;
  --blue: #00aaff;
  --cyan: #00ffe0;
  --green: #00ff88;
  --amber: #ffc400;
  --text: #c5e5ff;
  --muted: #3e6a88;
  --dim: #0e1e2e;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

header {
  background: linear-gradient(90deg, #020a12, #061526, #020a12);
  border-bottom: 1px solid var(--border);
  padding: 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--laser), var(--cyan), transparent);
}

.h-title {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 2px;
}

.h-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--muted);
  margin-top: 1px;
}

.laser-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--laser);
  padding: 3px 10px;
  background: rgba(255, 32, 64, .07);
  border: 1px solid rgba(255, 32, 64, .3);
  border-radius: 2px;
}

.ldot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  transition: all .3s;
}

.ldot.on {
  animation: pulse 1.2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

.nav {
  display: flex;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  gap: 2px;
  flex-shrink: 0;
}

.ntab {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 7px 15px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
  transition: all .2s;
}

.ntab:hover {
  color: var(--text);
}

.ntab.active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.ws {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.page {
  display: none;
  flex: 1;
  overflow: hidden;
}

.page.active {
  display: flex;
}

/* LEFT */
.left-panel {
  width: 310px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.left-panel::-webkit-scrollbar {
  width: 3px;
}

.left-panel::-webkit-scrollbar-thumb {
  background: var(--border);
}

.ph {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--blue);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 5;
}

.laser-selector-wrap {
  padding: 8px 10px;
  border-bottom: 1px solid var(--dim);
}

.laser-selector-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.laser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.lbtn {
  padding: 7px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  line-height: 1.6;
}

.lbtn:hover {
  border-color: rgba(255, 255, 255, .2);
}

.lbtn.active {
  font-weight: 700;
}

.lbtn .lname {
  font-size: 11px;
}

.lbtn .lwave {
  font-size: 9px;
}

.wire-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--dim);
}

.wb {
  padding: 7px 4px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--muted);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  line-height: 1.5;
}

.wb:hover {
  border-color: var(--amber);
}

.wb.active {
  background: rgba(255, 196, 0, .07);
  border-color: var(--amber);
  color: var(--amber);
}

.wb .wname {
  font-size: 11px;
  font-weight: 700;
}

.wb .wval {
  font-size: 9px;
  color: var(--dim);
}

.wb.active .wval {
  color: rgba(255, 196, 0, .5);
}

.ctrl-group {
  padding: 10px 12px;
  border-bottom: 1px solid var(--dim);
}

.ctrl-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.ctrl-val {
  color: var(--cyan);
  font-size: 13px;
}

input[type=range] {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  cursor: pointer;
}

.d-ticks {
  display: flex;
  justify-content: space-between;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--dim);
  margin-top: 3px;
}

.laser-btn {
  margin: 8px 12px;
  padding: 9px;
  border: 1px solid rgba(255, 32, 64, .3);
  border-radius: 3px;
  background: rgba(255, 32, 64, .05);
  color: var(--laser);
  font-family: 'Orbitron', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all .25s;
  text-align: center;
}

.laser-btn:hover {
  border-color: var(--laser);
  background: rgba(255, 32, 64, .1);
}

.laser-btn.on {
  background: rgba(255, 32, 64, .15);
  border-color: var(--laser);
  color: #ff7090;
  box-shadow: 0 0 14px rgba(255, 32, 64, .3) inset;
  text-shadow: 0 0 8px var(--laser);
}

.readout {
  padding: 12px 14px;
  background: rgba(0, 0, 0, .35);
  border-bottom: 1px solid var(--dim);
}

.row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
}

.rk {
  color: var(--muted);
}

.rv {
  color: var(--cyan);
}

.rv-b {
  color: var(--green);
  font-weight: 700;
  font-size: 13px;
}

.rv-d {
  color: var(--amber);
}

.btn-area {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.abtn {
  padding: 9px;
  border-radius: 3px;
  border: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  width: 100%;
}

.abtn-add {
  background: rgba(0, 170, 255, .1);
  color: var(--blue);
  border: 1px solid rgba(0, 170, 255, .25);
}

.abtn-add:hover:not(:disabled) {
  background: rgba(0, 170, 255, .18);
  border-color: var(--blue);
}

.abtn-calc {
  background: rgba(0, 255, 136, .1);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, .25);
}

.abtn-calc:hover:not(:disabled) {
  background: rgba(0, 255, 136, .18);
  border-color: var(--green);
}

.abtn-clear {
  background: rgba(255, 32, 64, .07);
  color: var(--laser);
  border: 1px solid rgba(255, 32, 64, .2);
}

.abtn-clear:hover {
  background: rgba(255, 32, 64, .14);
  border-color: var(--laser);
}

.abtn-load {
  background: rgba(255, 196, 0, .08);
  color: var(--amber);
  border: 1px solid rgba(255, 196, 0, .2);
  font-size: 11px;
}

.abtn-load:hover {
  background: rgba(255, 196, 0, .15);
  border-color: var(--amber);
}

.abtn:disabled {
  cursor: not-allowed !important;
  opacity: .28;
  filter: grayscale(.6);
}

.laser-lock-notice {
  margin: 0 0 4px;
  padding: 5px 8px;
  background: rgba(255, 32, 64, .06);
  border: 1px dashed rgba(255, 32, 64, .25);
  border-radius: 3px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: rgba(255, 80, 80, .7);
  text-align: center;
  display: none;
}

.laser-lock-notice.show {
  display: block;
}

/* CENTER */
.center {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

#vc {
  display: block;
}

.c-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--laser);
  background: rgba(2, 10, 18, .92);
  padding: 6px 10px;
  border: 1px solid rgba(255, 32, 64, .3);
  border-radius: 2px;
  line-height: 1.9;
  pointer-events: none;
}

.b-hud {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--cyan);
  background: rgba(2, 10, 18, .92);
  padding: 4px 12px;
  border: 1px solid rgba(0, 255, 224, .2);
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
}

/* RIGHT */
.right-panel {
  width: 520px;
  flex-shrink: 0;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.right-panel::-webkit-scrollbar {
  width: 3px;
}

.right-panel::-webkit-scrollbar-thumb {
  background: var(--border);
}

.wire-block {
  margin: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.wire-block-header {
  padding: 8px 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: .5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

table.obs {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
}

table.obs th {
  background: rgba(0, 0, 0, .4);
  color: var(--muted);
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

table.obs td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid rgba(14, 30, 46, .8);
  font-size: 13px;
}

table.obs tr:hover td {
  background: rgba(0, 130, 255, .04);
}

.tc {
  color: var(--cyan) !important;
}

.ta {
  color: var(--amber) !important;
  font-weight: 700;
}

.tg {
  color: var(--green) !important;
}

.tm-dim {
  color: var(--muted) !important;
  font-style: italic;
}

.mean-row {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

.mean-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--muted);
}

.mean-val {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 700;
}

.mean-err {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  text-align: right;
}

.formula-band {
  margin: 8px;
  padding: 8px 12px;
  background: rgba(0, 100, 200, .07);
  border: 1px solid rgba(0, 150, 255, .15);
  border-radius: 3px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: var(--cyan);
  text-align: center;
  letter-spacing: 1px;
}

/* INFO */
.info-page {
  flex: 1;
  overflow-y: auto;
  padding: 20px 30px;
}

.info-page h2 {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  color: var(--blue);
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.info-page h3 {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 2px;
  margin: 14px 0 6px;
  text-transform: uppercase;
}

.info-page p {
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 8px;
  font-size: 13px;
}

.fbox {
  background: rgba(0, 100, 200, .08);
  border: 1px solid rgba(0, 150, 255, .2);
  border-radius: 4px;
  padding: 11px 16px;
  margin: 9px 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  color: var(--cyan);
  text-align: center;
  letter-spacing: 2px;
}

.nbox {
  background: rgba(255, 196, 0, .05);
  border: 1px solid rgba(255, 196, 0, .2);
  border-radius: 3px;
  padding: 9px 13px;
  margin: 9px 0;
  font-size: 12px;
  color: var(--amber);
}

.step {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-start;
}

.sn {
  width: 20px;
  height: 20px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.st {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

/* QUIZ */
.qq {
  background: rgba(0, 100, 200, .05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.qt {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 9px;
  line-height: 1.6;
}

.qopts {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.qo {
  padding: 6px 10px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all .2s;
}

.qo:hover {
  border-color: var(--blue);
  color: var(--text);
}

.qo.correct {
  background: rgba(0, 255, 136, .07);
  border-color: var(--green);
  color: var(--green);
}

.qo.wrong {
  background: rgba(255, 32, 64, .07);
  border-color: var(--laser);
  color: var(--laser);
}

.qfb {
  margin-top: 7px;
  font-size: 11px;
  font-family: 'Share Tech Mono', monospace;
  color: var(--muted);
  display: none;
  line-height: 1.5;
}

.qscore {
  font-family: 'Orbitron', monospace;
  font-size: 13px;
  color: var(--green);
  text-align: center;
  padding: 10px;
  border: 1px solid rgba(0, 255, 136, .2);
  border-radius: 4px;
  margin-top: 12px;
  display: none;
}

/* GRAPH */
.graph-page {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.graph-page h2 {
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.slope-box {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--cyan);
  padding: 8px 12px;
  background: rgba(0, 100, 200, .07);
  border: 1px solid rgba(0, 150, 255, .15);
  border-radius: 3px;
  line-height: 1.8;
  white-space: pre-line;
}

.footer {
  flex-shrink: 0;
  background: linear-gradient(90deg, #020a12, #061526, #020a12);
  border-top: 1px solid #0c2236;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00aaff, #ff2040, #00ffe0, transparent);
}

.footer-left {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: #3e6a88;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  transition: all .2s;
}

.footer-link.linkedin {
  color: #0a8abe;
  border-color: rgba(10, 138, 190, .3);
  background: rgba(10, 138, 190, .06);
}

.footer-link.linkedin:hover {
  background: rgba(10, 138, 190, .15);
  border-color: #0a8abe;
  box-shadow: 0 0 10px rgba(10, 138, 190, .25);
}

.footer-link.github {
  color: #c5e5ff;
  border-color: rgba(197, 229, 255, .2);
  background: rgba(197, 229, 255, .04);
}

.footer-link.github:hover {
  background: rgba(197, 229, 255, .1);
  border-color: rgba(197, 229, 255, .5);
  box-shadow: 0 0 10px rgba(197, 229, 255, .15);
}

.footer-link svg {
  flex-shrink: 0;
}