:root {
  --bg: #c9d3c6;
  --panel: #e7ece4;
  --panel-dark: #c7d0c3;
  --ink: #1f2328;
  --accent: #6b72ff;
  --accent-2: #8892ff;
  --line: #5c675d;
  --shadow: 2px 2px 0 rgba(40, 52, 43, 0.35);
  --mono: "SFMono-Regular", "Menlo", "Monaco", "Liberation Mono", "Courier New", monospace;
  --sans: "Inter", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #111; color: var(--ink); font-family: var(--sans); }
body { overflow: hidden; }
.hidden { display: none !important; }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 20% 20%, rgba(107,114,255,.05), transparent 30%), radial-gradient(circle at 80% 30%, rgba(107,114,255,.04), transparent 28%), radial-gradient(circle at 60% 80%, rgba(31,35,40,.05), transparent 32%);
}

.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background:
    linear-gradient(rgba(255,255,255,.03), rgba(255,255,255,0)),
    radial-gradient(circle at center, transparent 60%, rgba(0,0,0,.08) 100%);
  mix-blend-mode: multiply;
}

.desktop {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.03)),
    linear-gradient(135deg, #cfd8cc 0%, #c4cfc2 45%, #bac4ba 100%);
  position: relative;
  padding: 56px 24px 72px;
}

.topbar, .taskbar {
  position: fixed; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(231,236,228,.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(92,103,93,.5);
  padding: 10px 16px; font-family: var(--mono);
}
.topbar { top: 0; }
.taskbar {
  bottom: 0; top: auto; border-top: 2px solid var(--line); border-bottom: none; gap: 8px; justify-content: flex-start;
}
.start-menu {
  position: fixed; left: 12px; bottom: 58px; z-index: 30;
  display: grid; gap: 8px; width: 220px; padding: 12px;
  background: var(--panel-dark); border: 2px solid var(--line); box-shadow: 8px 8px 0 rgba(30,24,32,.35);
}
.start-menu button {
  appearance: none; border: 2px solid var(--line); background: var(--panel); color: var(--ink);
  font-family: var(--mono); padding: 10px; text-align: left; cursor: pointer; box-shadow: var(--shadow);
}
.start-menu button:hover { background: #eceee1; }
.taskbar button, .quick-actions button, .action {
  appearance: none; border: 2px solid var(--line); background: var(--panel); color: var(--ink);
  font-family: var(--mono); padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow);
}
.taskbar button:hover, .quick-actions button:hover, .action:hover { background: #eceee1; }
.ghost-button { background: #cec7ec !important; }
.brand { letter-spacing: 1px; }
.statusline { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
#status-rotator {
  color: #8b1e3f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#status-rotator.glitching {
  animation: statusGlitch 180ms steps(2) 3;
}
@keyframes statusGlitch {
  0% { transform: translateX(0); text-shadow: 0 0 0 transparent; }
  25% { transform: translateX(-1px); text-shadow: 2px 0 #6b72ff; }
  50% { transform: translateX(1px); text-shadow: -2px 0 #8b1e3f; }
  100% { transform: translateX(0); text-shadow: 0 0 0 transparent; }
}
#scraper-shame {
  background: rgba(139, 30, 63, 0.1);
  border: 1px solid rgba(139, 30, 63, 0.35);
  padding: 2px 8px;
  border-radius: 999px;
}
.wallet-address {
  word-break: break-all;
  padding: 10px;
  border: 2px dashed var(--line);
  background: rgba(255,255,255,.35);
}
.offering-panel {
  position: relative;
}
.bitcoin-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 0 12px;
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.glitch-echo {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 8;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(139, 30, 63, 0.28);
  pointer-events: none;
  user-select: none;
  text-transform: uppercase;
  mix-blend-mode: multiply;
}
body.glitch-mode .glitch-echo {
  animation: ghostFlicker 900ms steps(2) infinite;
}
@keyframes ghostFlicker {
  0%, 100% { opacity: .18; transform: translate(0,0); }
  25% { opacity: .35; transform: translate(-2px, 1px); }
  50% { opacity: .12; transform: translate(2px, -1px); }
  75% { opacity: .3; transform: translate(-1px, 0); }
}

.icons {
  position: absolute; top: 92px; left: 20px; display: grid; gap: 16px;
}
.desktop-icon {
  display: flex; flex-direction: column; gap: 8px; width: 90px; align-items: center;
  background: transparent; border: 0; font-family: var(--mono); cursor: pointer; color: var(--ink);
}
.icon-art { font-size: 34px; filter: grayscale(.15); }

.window {
  position: absolute; width: min(780px, calc(100vw - 140px));
  background: rgba(231,236,228,.94);
  border: 1px solid rgba(92,103,93,.55);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(31,35,40,.18);
  overflow: hidden;
}
.active { display: block; }
#welcome-window { top: 78px; right: 32px; }
#about { top: 110px; left: 140px; }
#lessons { top: 130px; left: 210px; }
#lab { top: 160px; left: 260px; }
#hidden-content-lab { top: 100px; left: 180px; }
#rag-contamination-lab { top: 150px; left: 300px; }
#walkthrough { top: 120px; left: 220px; }
#omens { top: 140px; left: 240px; }
#offerings { top: 170px; left: 280px; }
#defenses { top: 190px; left: 200px; }

.desktop::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(107,114,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(107,114,255,.02) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .35;
}

.titlebar {
  display: flex; justify-content: space-between; align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(199,208,195,.65));
  border-bottom: 1px solid rgba(92,103,93,.4);
  padding: 10px 12px; font-family: var(--mono); font-weight: 700;
}
.titlebar-actions { display: flex; gap: 6px; }
.titlebar-actions span, .close {
  width: 20px; height: 20px; border: 1px solid rgba(92,103,93,.55); background: rgba(255,255,255,.65);
  border-radius: 999px;
  display: inline-grid; place-items: center; font-weight: 700; cursor: pointer;
  font-family: var(--mono);
}
.close { padding: 0; line-height: 1; }
.window-body { padding: 18px; }
.window-body h1, .window-body h2, .window-body h3 { margin-top: 0; }
.window-body p, .window-body li, .window-body a, .window-body label { font-family: var(--mono); }
.window-body h1, .window-body h2 { text-shadow: 1px 1px 0 rgba(114,104,246,.18); }
.mono { font-family: var(--mono); }
.dim { opacity: .7; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.panel, .card {
  border: 2px solid var(--line); background: rgba(255,255,255,.25); padding: 14px; box-shadow: var(--shadow);
}
.card { cursor: pointer; }
.app-grid, .post-list { display: grid; gap: 14px; }
.linkish { color: var(--accent); font-weight: 700; }
.selected-app { outline: 3px solid var(--accent); }
.muted-card { opacity: .8; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .desktop { padding: 70px 12px 88px; }
  .icons { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
  .window, #welcome-window, #about, #lessons, #lab, #hidden-content-lab, #rag-contamination-lab, #walkthrough, #omens, #offerings, #defenses {
    position: static; width: 100%; margin-bottom: 16px;
  }
  .hidden { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .taskbar { flex-wrap: wrap; }
}
