/* ============================================================
   ROVER.EXE — Windows XP theme
   The First Dog AI Agent · $ROVER
   ============================================================ */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: Tahoma, 'Segoe UI', Verdana, sans-serif;
  overflow: hidden;
}
::selection { background: #316ac5; color: #fff; }
a { color: #003399; }

/* ---------- wallpaper (real XP Bliss — O'Rear, Napa Valley 1996) ---------- */
#wall {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  background: #4a90d9 url('assets/wall/bliss.jpg') center / cover no-repeat;
  overflow: hidden;
}
/* drifting XP clouds over Bliss — injected by JS, animated here */
.cloud {
  position: absolute; top: 6%; left: -25%;
  width: 55vw; height: 160px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.55), rgba(255,255,255,0) 72%);
  filter: blur(10px); pointer-events: none;
  animation: drift 90s linear infinite;
}
.cloud.c2 {
  top: 16%; left: -40%; width: 70vw; height: 190px; opacity: .8;
  animation-duration: 140s; animation-delay: -45s;
}
.cloud.c3 {
  top: 2%; left: -30%; width: 48vw; height: 120px; opacity: .65;
  animation-duration: 115s; animation-delay: -80s;
}
@keyframes drift { to { transform: translateX(190vw); } }
/* floating ambient particles (dollar signs + paw prints) — injected by JS */
.particle {
  position: absolute; bottom: -30px; z-index: 1;
  color: rgba(255,255,255,.5); font-size: 15px; pointer-events: none;
  animation: rise 16s linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: .55; }
  90%  { opacity: .3; }
  100% { transform: translateY(-108vh) rotate(28deg); opacity: 0; }
}

/* ---------- desktop ---------- */
#desktop {
  position: fixed; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 28px 60px 28px;
}

/* ---------- XP window ---------- */
.xp-window {
  background: #ece9d8;
  border: 1px solid #0831d9;
  border-radius: 8px 8px 3px 3px;
  box-shadow: 4px 5px 18px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
}
/* window is sized, not full-bleed — Bliss shows around it; shrinks to fit small screens */
#window {
  flex: none;
  width: min(1240px, 100%);
  height: min(760px, 100%);
  min-height: 0;
}

/* title bar */
.titlebar {
  height: 32px; flex: none;
  display: flex; align-items: center; gap: 7px;
  padding: 0 4px 0 8px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg,
    #0b76d0 0%, #0564c9 3%, #0151b4 6%, #003f9d 10%,
    #00217c 13%, #002a89 16%, #001880 20%, #001581 23%,
    #000f78 27%, #000d72 30%, #000a69 40%, #000964 55%,
    #000961 75%, #00075d 100%);
  border-bottom: 1px solid #0a4ad4;
  cursor: default; user-select: none;
}
.titlebar .ti { width: 16px; height: 16px; }
.ti-text {
  flex: 1; color: #fff; font-size: 12px; font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-btns { display: flex; gap: 2px; }
.tbtn {
  width: 21px; height: 21px;
  border: 1px solid #fff; border-radius: 3px;
  color: #fff; font-size: 12px; font-weight: bold;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: linear-gradient(180deg, #6aa4f0 0%, #3d74d8 45%, #2a5cc0 100%);
  text-shadow: 1px 1px 1px rgba(0,0,0,.4);
}
.tbtn:hover { background: linear-gradient(180deg, #8cbcf8, #4d84e8 45%, #3a6cd0); }
.tbtn.x { background: linear-gradient(180deg, #f6a5a0 0%, #e0524d 40%, #b21e1a 100%); }
.tbtn.x:hover { background: linear-gradient(180deg, #ffb0aa, #f0625c 40%, #c92e2a); }

/* menu bar */
.menubar {
  flex: none; display: flex; align-items: center; gap: 13px;
  background: #ece9d8; border-bottom: 1px solid #d6d0bf;
  padding: 4px 10px; font-size: 11px; color: #222; user-select: none;
}
.mi { cursor: default; padding: 1px 2px; }
.mi:hover { background: #316ac5; color: #fff; }
.menuright { margin-left: auto; }

/* XP flag */
.xpflag { display: inline-flex; flex-wrap: wrap; width: 14px; height: 14px; vertical-align: middle; }
.xpflag i { width: 7px; height: 7px; }
.xpflag .f1 { background: #f25022; } .xpflag .f2 { background: #7fba00; }
.xpflag .f3 { background: #00a4ef; } .xpflag .f4 { background: #ffb900; }
.xpflag.big { width: 22px; height: 22px; }
.xpflag.big i { width: 11px; height: 11px; }

/* address bar */
.addrbar {
  flex: none; display: flex; align-items: center; gap: 7px;
  background: #d6d2c2; border-bottom: 1px solid #b8b2a0;
  padding: 5px 10px; font-size: 11px;
}
.addr-label { color: #555; font-weight: bold; }
.addr-ico { font-size: 13px; }
.addr-input {
  flex: 1; font-size: 11px; padding: 3px 6px;
  border: 1px solid #7f9db9; background: #fff; color: #000; outline: none;
}
.addr-input:focus { border-color: #2f6fd0; }
.addr-dd { width: 16px; text-align: center; color: #333; cursor: default; }
.addr-go {
  font-weight: bold; color: #0a5a0a; cursor: pointer;
  background: linear-gradient(#eafbe3, #bfe8ac);
  border: 1px solid #6aa84f; border-radius: 3px; padding: 2px 10px;
}
.addr-go:hover { box-shadow: 0 0 6px rgba(90,190,70,.6); }

/* ---------- window body ---------- */
.win-body { flex: 1; display: flex; min-height: 0; }

/* LEFT PANEL */
.left-panel {
  width: 354px; flex: none; overflow-y: auto;
  background: linear-gradient(180deg, #b9d3ee 0%, #93b8e0 60%, #7ba4d4 100%);
  border-right: 1px solid #5c86b8;
  padding: 12px 12px 14px 12px;
}
.left-panel::-webkit-scrollbar, .right-panel::-webkit-scrollbar { width: 9px; }
.left-panel::-webkit-scrollbar-thumb, .right-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(#9db8d8, #7ba0cc); border: 1px solid #5c86b8;
}

/* speech bubble */
.bubble {
  position: relative;
  background: #fff8c4; border: 2px solid #4a3f14; border-radius: 10px;
  padding: 9px 11px; min-height: 56px;
  font-family: 'Comic Sans MS', 'Comic Sans', 'Segoe Print', cursive;
  font-size: 12.5px; font-weight: bold; color: #241d05; line-height: 1.35;
  box-shadow: 2px 3px 8px rgba(0,0,0,.25);
}
.bubble:after {
  content: ''; position: absolute; bottom: -17px; left: 58%;
  border: 9px solid transparent; border-top-color: #4a3f14;
}
.bubble:before {
  content: ''; position: absolute; bottom: -12px; left: calc(58% + 2px);
  border: 7px solid transparent; border-top-color: #fff8c4; z-index: 1;
}

/* rover stage */
.rover-stage {
  position: relative; height: 196px; margin-top: 18px;
  display: flex; align-items: flex-end; justify-content: center;
}
.rover-shadow {
  position: absolute; bottom: 6px; width: 130px; height: 22px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.32), transparent 70%);
}
#rover-sprite { position: relative; width: 172px; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

/* generic panel block */
.panel-block { margin-top: 14px; }
.pb-title { font-size: 11px; font-weight: bold; color: #123a6b; margin-bottom: 6px; }
.ca-row { display: flex; gap: 5px; align-items: center; }
.ca-row label { font-size: 11px; font-weight: bold; color: #123a6b; }
.ca-input {
  flex: 1; min-width: 0; font-size: 10px; padding: 3px 5px;
  border: 1px solid #7f9db9; background: #fff; color: #333;
  font-family: 'Lucida Console', Consolas, monospace;
}
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.btn-grid .xp-btn { text-align: center; }
.tok-line { font-size: 11px; color: #14304f; margin-top: 3px; }
.tok-line.status { color: #0b5c14; font-weight: bold; }

/* XP button */
.xp-btn {
  display: inline-block;
  background: linear-gradient(#fdfdfd, #e8e8e8 45%, #d9d9d9);
  border: 1px solid #7a8bb0; border-radius: 3px;
  padding: 4px 8px; font-size: 11px; font-weight: bold; color: #1a1a5e;
  cursor: pointer; user-select: none; text-decoration: none;
  transition: box-shadow .12s;
}
.xp-btn:hover {
  background: linear-gradient(#fff, #eef4ff 45%, #dde9fb);
  border-color: #2f6fd0;
  box-shadow: 0 0 7px rgba(60,130,240,.55);
}
.xp-btn:active { background: #d5dbe8; }
.xp-btn.small { padding: 3px 6px; font-size: 10px; }

/* ---------- THE TEK ---------- */
.tek {
  margin-top: 16px;
  background: #04120a;
  border: 2px solid #2f7d26; border-radius: 5px;
  color: #7cfc9a;
  font-family: 'Lucida Console', Consolas, monospace;
  font-size: 11px; padding: 9px 10px 11px 10px;
  box-shadow: inset 0 0 22px rgba(0,255,120,.14), 0 0 14px rgba(0,255,120,.12);
}
.tek-head {
  font-weight: bold; color: #b6ffbe; letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 7px; font-size: 12px;
}
.tek-flag { font-size: 14px; }
.tek-live { margin-left: auto; font-size: 10px; color: #4dff88; display: flex; align-items: center; gap: 5px; }
.tek-live .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4dff88; box-shadow: 0 0 9px #4dff88;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .3; } }

.ticker {
  overflow: hidden; white-space: nowrap; margin: 8px 0;
  border-top: 1px solid #1d5c2a; border-bottom: 1px solid #1d5c2a;
  color: #57d97a; font-size: 10.5px; padding: 2px 0;
}
.ticker span {
  display: inline-block; white-space: nowrap;
  padding-left: 100%;
  animation: tick 18s linear infinite;
}
@keyframes tick { to { transform: translateX(-100%); } }

.teq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.teq {
  background: #0a2413; border: 1px solid #1d5c2a;
  padding: 4px 7px; display: flex; justify-content: space-between; gap: 6px;
}
.teq-l { color: #5fae74; font-size: 9.5px; letter-spacing: .5px; align-self: center; }
.teq-v { color: #c9ffe0; font-weight: bold; font-size: 11px; word-break: break-all; }
.teq-v.ok { color: #4dff88; text-shadow: 0 0 6px rgba(77,255,136,.5); }

.sniff { margin-top: 11px; }
.sniff label { font-size: 9.5px; color: #5fae74; letter-spacing: .5px; display: block; margin-bottom: 5px; }
.sniff .hint { color: #3f7a52; }
.sniff-row { display: flex; gap: 5px; }
.sniff-input {
  flex: 1; min-width: 0; background: #02150b; border: 1px solid #1d5c2a; color: #9dffbd;
  font-family: inherit; font-size: 11px; padding: 5px 7px; outline: none;
}
.sniff-input:focus { border-color: #4dff88; box-shadow: 0 0 7px rgba(77,255,136,.35); }
.sniff-out {
  margin-top: 7px; background: #02150b; border: 1px solid #1d5c2a;
  padding: 7px; min-height: 40px; white-space: pre-wrap;
  color: #8df0aa; font-size: 10.5px; line-height: 1.5;
}
.sniff-out b { color: #ffe27a; }
.tek-btn { margin-top: 11px; display: block; text-align: center; color: #0b2d12; }
.scan-out { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.scan-line { color: #9fb8a6; font-size: 10.5px; }
.scan-line.ok { color: #4dff88; font-weight: bold; }
.scan-line.warn { color: #ffb35a; }
.scan-row {
  display: flex; align-items: baseline; gap: 7px;
  background: #0a2413; border: 1px solid #1d5c2a;
  padding: 4px 7px; font-size: 10.5px;
}
.scan-row:hover { border-color: #4dff88; box-shadow: 0 0 7px rgba(77,255,136,.4); }
.scan-row a { color: #ffe27a; font-weight: bold; text-decoration: none; }
.scan-row a:hover { text-decoration: underline; }
.scan-mc { color: #7cfc9a; }
.scan-pct { margin-left: auto; color: #9fb8a6; font-size: 10px; }

/* RIGHT PANEL */
.right-panel {
  flex: 1; min-width: 0; overflow-y: auto;
  background: #fff; padding: 12px 14px 16px 14px;
  position: relative;
}
/* LIVE FEED ticker strip along the top of the results panel */
.feed-live {
  grid-column: 1 / -1;
  background: #0a1f0f; border: 1px solid #1d5c2a; border-radius: 4px;
  color: #57d97a; font-family: 'Lucida Console', Consolas, monospace;
  font-size: 10px; overflow: hidden; white-space: nowrap; position: relative;
  padding: 3px 0; margin-bottom: 12px;
  box-shadow: inset 0 0 14px rgba(77,255,136,.12);
}
.feed-live::before {
  content: '● LIVE FEED'; position: absolute; left: 0; top: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; padding: 0 8px 0 6px;
  background: linear-gradient(90deg, #0a1f0f 78%, rgba(10,31,15,0));
  color: #4dff88; font-weight: bold; letter-spacing: 1px;
}
.feed-live .fl-track {
  display: inline-block; white-space: nowrap; padding-left: 100%;
  animation: fltick 24s linear infinite;
}
@keyframes fltick { to { transform: translateX(-100%); } }
.res-head { font-size: 11px; color: #333; margin-bottom: 16px; user-select: none; }
.res-head a { color: #003399; cursor: pointer; text-decoration: underline; }
.res-head a.on { font-weight: bold; }

.coins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.feed-note {
  grid-column: 1 / -1;
  background: #fff8dc; border: 1px dashed #c9a227; border-radius: 5px;
  padding: 10px 12px; font-size: 11.5px; color: #6b5208;
  font-family: 'Lucida Console', Consolas, monospace;
}
.coin {
  position: relative;
  background: #fff; border: 1px solid #b9c2cc; border-radius: 5px;
  padding: 8px; cursor: pointer;
  transition: box-shadow .12s, transform .12s;
  animation: coindrop .5s ease both;
}
@keyframes coindrop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.coin:hover { box-shadow: 0 0 0 2px #ffb84d, 0 2px 8px rgba(0,0,0,.18); transform: translateY(-1px); }
.c-img {
  width: 100%; aspect-ratio: 1; height: auto;
  object-fit: cover; border-radius: 6px;
  border: 1px solid #c9d2dc; background: #f2f2f2; display: block;
}
.c-img.fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; background: linear-gradient(#eef4fb, #cfe0f2);
}
.c-sym { font-size: 13px; font-weight: bold; color: #003399; margin-top: 7px; }
.c-name { font-size: 10.5px; color: #666; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c-meta { font-size: 10px; color: #333; margin-top: 5px; line-height: 1.5; }
.curve { height: 8px; background: #f4f4f4; border: 1px solid #999; margin-top: 6px; }
.curve span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #b6f06e, #5fd41f 45%, #3ba30d);
}
.crown {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(#ffd76a, #f5a623);
  border: 1px solid #b97a12; color: #5c3d05;
  font-size: 9px; font-weight: bold; padding: 2px 10px; border-radius: 9px;
  white-space: nowrap; z-index: 2;
  animation: crownfloat 2.6s ease-in-out infinite;
}
@keyframes crownfloat { 50% { margin-top: -3px; } }
.coin.king {
  border: 2px solid #f5a623;
  animation: kingpulse 2.4s ease-in-out infinite;
}
.coin.king .curve span {
  background: linear-gradient(90deg, #b6f06e, #8ee64f, #5fd41f, #8ee64f, #b6f06e);
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
}
@keyframes kingpulse {
  0%,100% { box-shadow: 0 0 8px rgba(245,166,35,.45); }
  50% { box-shadow: 0 0 18px rgba(245,166,35,.85); }
}
@keyframes shimmer { to { background-position: 200% 0; } }

.statusbar {
  flex: none; background: #ece9d8; border-top: 1px solid #d6d0bf;
  padding: 3px 10px; font-size: 10.5px; color: #444; user-select: none;
}

/* ---------- taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 36px; z-index: 50;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg, #3a81e2 0%, #2563c8 10%, #1f54b5 45%, #245edb 88%, #3f8cf3 100%);
  border-top: 1px solid #16408c;
}
.start {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px 0 10px;
  font-style: italic; font-weight: bold; font-size: 15px; color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,.5);
  background: linear-gradient(90deg, #1c4aa8 0%, #2b70d8 55%, #4a90e2 100%);
  border-right: 1px solid #123f8c;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}
.start:hover { background: linear-gradient(90deg, #2558bc, #357ce2 55%, #5aa2f2); }
.start:active { background: #1c4aa8; }
.tsep { width: 1px; background: rgba(255,255,255,.35); margin: 6px 0; }
.quicklaunch { display: flex; align-items: center; gap: 2px; padding: 0 6px; }
.ql {
  font-size: 16px; padding: 3px 6px; border-radius: 3px; cursor: pointer;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.4));
}
.ql:hover { background: rgba(255,255,255,.22); }
.tb-items { flex: 1; display: flex; align-items: center; padding: 0 8px; gap: 6px; min-width: 0; }
.task {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.3); border-radius: 3px;
  color: #fff; font-size: 11px; padding: 4px 10px; max-width: 320px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task.active { background: linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.22)); }
.task img { width: 14px; height: 14px; }
.tray {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #1e8ad6, #1259a8);
  border-left: 1px solid #0f3f7c;
  padding: 0 12px; color: #fff; font-size: 11px;
}
.tray-ico { cursor: default; font-size: 13px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.4)); }

/* ---------- start menu ---------- */
#startmenu {
  position: fixed; left: 4px; bottom: 42px; width: 280px; z-index: 60;
  background: #fff; border: 1px solid #0831d9; border-radius: 7px;
  box-shadow: 4px 5px 16px rgba(0,0,0,.45);
  overflow: hidden;
  display: none;
}
#startmenu.open { display: block; }
.sm-head {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(90deg, #2b6fd4, #0e4bb0);
  color: #fff; font-weight: bold; font-size: 14px;
  padding: 11px 12px;
}
.sm-dog {
  width: 40px; height: 40px; background: #cfe3f7; border: 1px solid #7c96b8;
  border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;
}
.sm-dog img { width: 38px; height: 38px; }
.sm-items a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  padding: 9px 12px; font-size: 11.5px; color: #222; cursor: pointer; user-select: none;
}
.sm-items a small { color: #777; font-size: 9.5px; text-align: right; }
.sm-items a:hover { background: #316ac5; color: #fff; }
.sm-items a:hover small { color: #cfe0ff; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0,0,20,.35);
  display: flex; align-items: center; justify-content: center;
}
.modal.hidden { display: none; }
.modal-win { width: 420px; max-width: 92vw; }
.modal-body { padding: 16px 18px; font-size: 12px; color: #222; line-height: 1.6; }
.about { text-align: center; }
.about-dog { width: 96px; background: #eef4fb; border: 1px solid #9ab; border-radius: 4px; }
.about h3 { margin: 10px 0 6px; color: #003399; }
.about code {
  display: block; margin-top: 8px; padding: 5px 8px;
  background: #f0f0f0; border: 1px solid #ccc; font-size: 10px;
  font-family: 'Lucida Console', Consolas, monospace;
  word-break: break-all; text-align: left;
}
.tag { margin-top: 12px; font-family: 'Lucida Console', Consolas, monospace; color: #0b5c14; font-weight: bold; font-size: 12px; }

/* ---------- boot splash (authentic Windows XP style) ---------- */
#boot {
  position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(180deg, #123c8c 0%, #0e3a8a 45%, #082a66 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: opacity .8s;
  overflow: hidden;
}
#boot::before { /* soft light sweep, like the real splash */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 70% at 50% 8%, rgba(120,170,255,.28), transparent 60%);
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-inner { text-align: center; position: relative; z-index: 1; }
.boot-logo {
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.boot-flag { position: relative; width: 34px; height: 34px; display: inline-flex; flex-wrap: wrap; }
.boot-flag .b { width: 17px; height: 17px; }
.boot-flag .b1 { background: #f25022; } .boot-flag .b2 { background: #7fba00; }
.boot-flag .b3 { background: #00a4ef; } .boot-flag .b4 { background: #ffb900; }
.boot-word { text-align: left; line-height: 1.05; }
.boot-ms { display: block; font-size: 15px; font-weight: normal; opacity: .92; letter-spacing: .3px; }
.boot-win { font-size: 34px; font-weight: bold; letter-spacing: .5px; }
.boot-win sup { font-size: 16px; margin-left: 2px; }
.boot-pro { display: block; font-size: 13px; font-weight: normal; margin-top: 2px; opacity: .85; letter-spacing: .6px; }
/* segmented XP progress bar, bottom-center */
#boot-bar {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%);
  width: 210px; height: 14px; z-index: 1;
  border: 1px solid #d6e2f4; border-radius: 3px;
  background: rgba(0,0,20,.35);
  box-shadow: 0 0 18px rgba(90,150,255,.35);
  overflow: hidden;
}
#boot-bar .cell {
  position: absolute; top: 2px; bottom: 2px; width: 36px;
  border-radius: 2px; opacity: 0;
  animation: cellrun 2.2s linear infinite;
}
#boot-bar .cell:nth-child(1) { background: #f25022; animation-delay: 0s; }
#boot-bar .cell:nth-child(2) { background: #7fba00; animation-delay: .45s; }
#boot-bar .cell:nth-child(3) { background: #00a4ef; animation-delay: .9s; }
#boot-bar .cell:nth-child(4) { background: #ffb900; animation-delay: 1.35s; }
#boot-bar .cell:nth-child(5) { background: #fff;    animation-delay: 1.8s; }
@keyframes cellrun {
  0%   { left: -40px; opacity: 0; }
  8%   { opacity: 1; }
  82%  { opacity: 1; }
  100% { left: 212px; opacity: 0; }
}
/* Rover sitting in the corner of the splash */
.boot-dog {
  position: absolute; right: 7%; bottom: 120px; z-index: 1; text-align: center;
}
#boot-dog {
  width: 92px; height: 92px; margin: 0 auto;
  background: url('assets/sprites/_1Idle/001.png') center / contain no-repeat;
  animation: bootbounce 1.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,.35));
}
@keyframes bootbounce { 50% { transform: translateY(-7px); } }
.boot-text {
  position: absolute; bottom: 44px; left: 0; right: 0; text-align: center;
  font-size: 12px; color: #cfe0ff; font-family: 'Lucida Console', Consolas, monospace;
  z-index: 1;
}
.boot-skip {
  position: absolute; bottom: 16px; right: 24px;
  color: #8fa8d8; font-size: 11px;
}

/* ---------- meme desktop: icons, right-click menu, notepad, balloon ---------- */
.hidden { display: none !important; }

#desk-icons {
  position: absolute; top: 16px; left: 14px; z-index: 2;
  display: grid; grid-template-columns: repeat(2, 88px);
  gap: 14px 14px; align-content: start;
}
.dicon {
  background: none; border: 0; padding: 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 88px; user-select: none; font-family: inherit;
}
.dicon .di-ico {
  font-size: 36px; line-height: 1;
  filter: drop-shadow(1px 2px 2px rgba(0,0,0,.5));
  transition: transform .12s;
}
.dicon .di-label {
  color: #fff; font-size: 11px; font-weight: bold;
  text-shadow: 0 1px 2px #000, 0 0 4px rgba(0,0,0,.65);
  text-align: center; line-height: 1.2;
}
.dicon:hover .di-ico { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 0 7px rgba(255,255,150,.9)); }
.dicon:active .di-ico { transform: translateY(1px) scale(.96); }
.dicon.sel .di-label { background: #316ac5; color: #fff; outline: 1px dotted #fff; }

/* right-click context menu */
#ctxmenu {
  position: fixed; z-index: 80; min-width: 230px;
  background: #fff; border: 1px solid #0a246a;
  box-shadow: 3px 3px 12px rgba(0,0,0,.4);
  font-size: 11px; padding: 2px 0;
}
.cm-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 12px; cursor: default; user-select: none;
}
.cm-item b { font-weight: bold; }
#ctxmenu .cm-item:hover { background: #316ac5; color: #fff; }
.cm-item small { margin-left: auto; color: #888; font-size: 9px; }
#ctxmenu .cm-item:hover small { color: #cfe0ff; }
.cm-sep { height: 1px; background: #d8d0b8; margin: 3px 2px; }

/* Notepad (the lore) — floating XP window */
#notepad {
  position: fixed; z-index: 60;
  left: 50%; top: 46%;
  width: min(580px, 94vw); max-height: 86vh;
  transform: translate(-50%, -50%);
  transition: transform .18s, opacity .18s;
}
#notepad .xp-window { display: flex; flex-direction: column; height: 100%; }
#notepad .titlebar {
  background: linear-gradient(180deg, #1f6fd4 0%, #3a8ef0 6%, #2c7ae8 45%, #1b5fc4 100%);
  border-radius: 8px 8px 0 0;
}
#notepad .np-body {
  flex: 1; overflow: auto; background: #fff; padding: 12px 16px 28px 16px;
  font-family: 'Courier New', monospace; font-size: 12px; color: #111;
  white-space: pre-wrap; line-height: 1.5;
}
#notepad .statusbar {
  flex: none; background: #ece9d8; border-top: 1px solid #d6d0bf;
  padding: 3px 10px; font-size: 10px; color: #555; border-radius: 0 0 8px 8px;
}

/* XP balloon (bottom-right, the classic) */
#balloon {
  position: fixed; right: 14px; bottom: 46px; width: 330px; z-index: 70;
  opacity: 0; transform: translateY(24px);
  transition: opacity .45s, transform .45s;
  pointer-events: none;
}
#balloon.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#balloon .balloon-win {
  position: relative;
  background: #fffde7; border: 1px solid #c9a227; border-radius: 6px;
  box-shadow: 3px 4px 16px rgba(0,0,0,.42);
  padding: 12px 30px 12px 12px;
  font-size: 11.5px; color: #333; line-height: 1.45; cursor: pointer;
}
#balloon .balloon-dog { float: right; width: 46px; margin: 2px 0 0 10px; }
#balloon .balloon-body b { color: #003399; display: block; margin-bottom: 3px; }
#balloon .balloon-body p { margin: 0; }
#balloon .balloon-x {
  position: absolute; top: 5px; right: 6px; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: bold; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #f6a5a0, #e0524d 40%, #b21e1a);
  border: 1px solid #fff; border-radius: 3px;
}

/* tray / quicklaunch meme bits */
.ql.bag { animation: bagwob 2.6s ease-in-out infinite; display: inline-block; }
@keyframes bagwob { 0%,88%,100% { transform: none; } 92% { transform: rotate(-10deg); } 96% { transform: rotate(9deg); } }
.task.pump { position: relative; overflow: visible; }
.task.pump::after {
  content: 'LIVE'; position: absolute; top: -7px; right: 5px;
  background: #2fb524; color: #fff; font-size: 8px; font-weight: bold;
  padding: 0 4px; border-radius: 4px; border: 1px solid #fff;
  animation: pulsec 1.2s ease-in-out infinite;
}
@keyframes pulsec { 50% { opacity: .45; } }
.tray-ico.bark { cursor: pointer; }
.tray-ico.bark:hover { transform: scale(1.2); }

/* ---------- minimize: collapse XP window to a title-bar strip ---------- */
#window.min {
  width: 420px; height: 34px;
  transition: height .25s ease, width .25s ease;
}
#window.min .menubar,
#window.min .addrbar,
#window.min .win-body,
#window.min .statusbar { display: none !important; }
#window.min .titlebar { border-radius: 7px 7px 3px 3px; height: 32px; }
#notepad.min .np-body,
#notepad.min .menubar,
#notepad.min .statusbar { display: none !important; }
#notepad.min .xp-window { height: 34px; }
#notepad.min .xp-window .titlebar { border-radius: 7px 7px 3px 3px; }

/* ---------- list view (Titles / Details) ---------- */
.res-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; margin-bottom: 6px; cursor: pointer;
  background: #fff; border: 1px solid #cfd6e4; border-radius: 3px;
  font-size: 12px;
}
.res-item:hover { background: #eef5ff; border-color: #6ea0e0; }
.res-item .ri-ico {
  width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center;
  background: #f2f6fc; border: 1px solid #d5ddec; border-radius: 50%;
  font-size: 22px; overflow: hidden;
}
.res-item .ri-ico img { width: 100%; height: 100%; object-fit: cover; }
.res-item .ri-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.res-item .ri-main small { color: #777; font-size: 10.5px; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  html, body { overflow: auto; }
  #desktop { position: static; min-height: 100%; padding: 0 0 50px 0; }
  #window { flex: none; min-height: 100vh; border-radius: 0; }
  .win-body { flex-direction: column; }
  .left-panel { width: 100%; border-right: none; border-bottom: 1px solid #5c86b8; }
  .rover-stage { height: 180px; }
}
