/* =================================================
   WINDOWS — base styles + per-app variants + cat-app
   ================================================= */
.windows {
  position: absolute; inset: 0;
  z-index: 10;
  pointer-events: none;
}
.win {
  position: absolute;
  background: #050a05;
  border: 2px solid var(--c, var(--accent));
  box-shadow: 6px 6px 0 rgba(0,0,0,0.55);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--c, var(--accent));
  pointer-events: auto;
  display: none;
  flex-direction: column;
  min-width: 240px;
  min-height: 220px;
  resize: both;
  overflow: hidden;
  transition: opacity 0.18s, transform 0.18s;
}
.win.open { display: flex; }
.win.maximized {
  left: 0 !important; top: 0 !important;
  width: 100vw !important; height: calc(100vh - var(--taskbar-h)) !important;
  box-shadow: none; border-width: 0 0 2px 0;
}
.win.focused {
  z-index: 50;
  outline: 3px solid var(--ink);
  outline-offset: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,0.75);
}
.win:focus-visible {
  outline: 3px solid var(--c, var(--accent));
  outline-offset: 2px;
}
.win.minimized {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
}
.win-title {
  background: var(--c, var(--accent));
  color: var(--ink);
  padding: 4px 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}
.win-title .name { display: flex; align-items: center; gap: 6px; }
.win-title .name .dot { width: 9px; height: 9px; background: var(--ink); }
.win-title .ctrls { display: flex; gap: 3px; }
.win-title .ctrls span {
  width: 18px; height: 18px;
  background: var(--ink); color: var(--c, var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.win-title .ctrls span svg { width: 60%; height: 60%; display: block; }
.win-title .ctrls span:hover { background: var(--paper); color: var(--ink); }
.win-body {
  padding: 10px 12px 12px;
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: auto;
}
.win-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px;
  border-top: 2px solid var(--c);
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
}
.win-foot .open-all {
  background: var(--c);
  color: var(--ink);
  border: 0;
  padding: 4px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.win-foot .open-all:hover { background: var(--paper); }
.win-foot .meta {
  font-size: 9px; opacity: 0.7; letter-spacing: 1px; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}

/* ===== TECH terminal ===== */
.win.w-pet { width: 520px; height: 560px; --c: var(--c-tech); background: #0e0116; }
.w-pet .win-body { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.w-pet .term { font-size: 12.5px; line-height: 1.6; flex: 1; overflow-y: auto; padding: 10px 14px 6px; }

/* Pet panel — the hero of the Pixel Pet app, pinned above the command line */
.pet-panel {
  display: none; flex-shrink: 0; align-items: center; justify-content: center; gap: 22px;
  padding: 14px 16px; min-height: 124px;
  border-bottom: 1px solid var(--c-tech);
  background: rgba(255,46,126,0.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--c-tech);
}
/* Sprite viewport — clipping window for sprite sheet animation */
.pet-viewport {
  flex-shrink: 0; overflow: hidden; position: relative;
  /* size set dynamically by JS */
}
.pet-egg-wrap,
.pet-sprite-wrap {
  position: absolute; inset: 0; overflow: hidden;
  display: none; /* JS shows the correct one */
}
.pet-egg-wrap img,
.pet-sprite-wrap img {
  image-rendering: pixelated;
  position: absolute;
  top: 0; left: 0;
}
/* Subtle wobble on egg */
.pet-egg-wrap {
  animation: pet-egg-sway 1.2s ease-in-out infinite;
}
@keyframes pet-egg-sway {
  0%,100% { transform: rotate(-4deg) translateY(0); }
  50%      { transform: rotate( 4deg) translateY(-1px); }
}
.pet-info { flex: 0 1 auto; width: 210px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.pet-toprow { display: flex; gap: 8px; align-items: baseline; }
.pet-name-lbl  { font-weight: 700; font-size: 14px; color: var(--paper); }
.pet-rarity-lbl { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.pet-stats { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pet-stat { display: flex; align-items: center; gap: 8px; }
.pet-stat .ps-ico { width: 14px; text-align: center; font-size: 11px; color: var(--paper); }
.pet-stat .ps-track {
  flex: 1; height: 9px; position: relative;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.18);
}
.pet-stat .ps-fill { display: block; height: 100%; transition: width .25s ease; }
.pet-stat-h .ps-fill { background: #FF2E7E; }
.pet-stat-e .ps-fill { background: #FFB800; }
.pet-stat-p .ps-fill { background: #16E0E0; }
.pet-stat-c .ps-fill { background: #C6F542; }
.w-pet .term .prompt::before { content: "▸ "; opacity: 0.7; }
.w-pet .term .out { padding-left: 12px; font-size: 10.5px; opacity: 0.95; white-space: pre-wrap; }
.w-pet .term .out a { color: var(--c-tech); border-bottom: 1px dotted var(--c-tech); cursor: pointer; }
.w-pet .term .out a:hover { background: var(--c-tech); color: var(--ink); }
.w-pet .term .err { color: var(--white); }
.w-pet .term b { color: var(--white); font-weight: 700; }

/* Fixed input bar pinned to bottom — like a real terminal */
.w-pet .term-input-row {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px 9px;
  border-top: 1px solid rgba(255,46,126,0.3);
  background: rgba(255,46,126,0.05);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; color: var(--c-tech);
}
.w-pet .term-input-row .ps { opacity: 0.6; white-space: nowrap; }
.w-pet .term-input-row .blink::after { content: "▌"; opacity: 0.35; }
.win.w-pet.focused .term-input-row .blink::after { animation: blink 1s steps(2) infinite; opacity: 1; }
.w-pet #term-input { position: absolute; left: -9999px; opacity: 0; }

/* ===== AVERY ARCADE — game-site links only (the GAME SITES portal) ===== */
.win.w-arcade { width: 960px; height: 640px; --c: var(--c-arcade); background: #2e1c00; }
.w-arcade .win-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0; }
.w-arcade #arcade-sites { border-top: 0; }

/* ===== GAME BOX — the built-in games, big & chrome-free ===== */
.win.w-gamebox { width: 900px; height: 640px; --c: var(--c-arcade); background: #2e1c00; }
.w-gamebox .win-body {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  gap: 14px; padding: 16px; overflow: auto;
}
.gb-rom { font-family: 'VT323', monospace; font-size: 14px; color: #c9ff8a; letter-spacing: 0.5px; text-transform: none; opacity: 0.85; margin-left: 8px; }

/* game switcher */
.w-gamebox .gb-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; flex-shrink: 0; }
.w-gamebox .game-tab {
  background: rgba(255,184,0,0.08); border: 2px solid var(--c-arcade);
  color: var(--c-arcade); font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; padding: 9px 18px; cursor: pointer;
}
.w-gamebox .game-tab.active { background: var(--c-arcade); color: var(--ink); }
.w-gamebox .game-tab:hover:not(.active) { background: rgba(255,184,0,0.2); }

/* stage + how-to */
.w-gamebox .gb-stagewrap { flex: 1; min-height: 0; display: flex; gap: 18px; align-items: center; justify-content: center; }
.w-gamebox .gb-screen {
  width: 640px; height: 360px; flex-shrink: 0;
  background: #1a4d1f; border: 3px solid var(--c-arcade);
  position: relative; overflow: hidden;
}
.w-gamebox #game-canvas,
.w-gamebox #flappy-canvas,
.w-gamebox #breakout-canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.w-gamebox .gb-screen::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.16) 3px 4px);
  pointer-events: none;
}
.w-gamebox .gb-hud {
  position: absolute; top: 8px; left: 12px; right: 12px;
  display: flex; justify-content: space-between;
  font-family: 'Press Start 2P', monospace; font-size: 11px;
  color: #c9ff8a; text-shadow: 0 0 4px var(--c-arcade);
  pointer-events: none; z-index: 5;
}
.w-gamebox.scramble-on .gb-hud { display: none; }   /* scramble has its own score */
.w-gamebox .gb-howto {
  width: 230px; flex-shrink: 0; box-sizing: border-box; align-self: stretch;
  border: 2px solid var(--c-arcade); background: rgba(0,0,0,0.32);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.gb-howto-head { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 15px; color: var(--c-arcade); letter-spacing: 1px; }
#game-hint { font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1.6; color: #c9ff8a; letter-spacing: 0.3px; }
.gb-start {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px; letter-spacing: 1px;
  background: var(--c-arcade); color: var(--ink); border: 2px solid var(--ink);
  padding: 11px; cursor: pointer; text-transform: uppercase;
}
.gb-start:hover { background: var(--hover); }
.gb-howto-note { font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.5; color: rgba(255,184,0,0.6); margin-top: auto; }

/* ── WORD SCRAMBLE (high-contrast white card, bigger tiles) ── */
.w-gamebox #word-game {
  position: absolute; inset: 0; z-index: 6;
  background: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 18px; overflow: auto;
}
.w-gamebox #word-game .wg-round {
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 18px;
  color: var(--ink); letter-spacing: 2px; text-align: center;
}
.w-gamebox #word-game .wg-boxes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.w-gamebox #word-game .wg-letter {
  width: 42px; height: 42px; background: var(--ink); color: #ffc21f;
  border: 2px solid var(--ink);
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 22px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .1s, opacity .1s;
}
.w-gamebox #word-game .wg-letter:hover:not(:disabled) { background: #c47f00; color: var(--white); }
.w-gamebox #word-game .wg-letter.used { opacity: .22; cursor: default; }
.w-gamebox #word-game .wg-answer { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 46px; }
.w-gamebox #word-game .wg-slot {
  width: 42px; height: 42px; border: 2px dashed rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 22px;
  color: var(--ink); cursor: default; background: transparent;
  transition: background .1s, border-color .1s;
}
.w-gamebox #word-game .wg-slot.filled { border: 2px solid #c47f00; cursor: pointer; background: rgba(255,184,0,.16); }
.w-gamebox #word-game .wg-slot.filled:hover { background: rgba(255,184,0,.3); }
.w-gamebox #word-game .wg-slot.wg-correct { border-color: #2a8a2a; background: rgba(0,170,0,.18); color: #064006; }
.w-gamebox #word-game .wg-slot.wg-wrong   { border-color: #cc2a2a; background: rgba(200,0,0,.12); color: #7a0a0a; }
.w-gamebox #word-game .wg-feedback {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  letter-spacing: 1px; text-align: center; color: var(--ink); min-height: 18px;
}
.w-gamebox #word-game .wg-feedback.wg-correct { color: #1a7a1a; }
.w-gamebox #word-game .wg-feedback.wg-wrong   { color: #c22; }
.w-gamebox #word-game .wg-score {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 1px; color: #5a4500;
}
.w-gamebox #word-game .wg-play-again {
  background: var(--c-arcade); color: var(--ink);
  border: 2px solid var(--ink); font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  padding: 8px 16px; cursor: pointer;
}
.w-gamebox #word-game .wg-play-again:hover { background: var(--hover); }

/* (BLOCK_BUILDER.exe preview window retired 2026-06-09 — Block Breakers lives on
   as the Minecraft-launcher cat-app; the voxel-grid preview window is gone.) */

/* ===== CATEGORY APP (full link list) ===== */
.cat-app {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--taskbar-h);
  background: var(--ink);
  border: 3px solid var(--c, var(--accent));
  box-shadow: 10px 10px 0 rgba(0,0,0,0.55);
  z-index: 70;
  display: none;
  flex-direction: column;
  color: var(--paper);
}
.cat-app.open { display: flex; }
.cat-app.focused { z-index: 75; }
.cat-app.minimized { display: none; }
.cat-app-title {
  background: var(--c);
  color: var(--ink);
  padding: 3px 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 15px; letter-spacing: 0.02em;
  cursor: grab; user-select: none;
  min-height: 24px;
}
.cat-app-title .ctrls { display: flex; align-items: center; gap: 3px; }
.cat-app-title .ctrls span {
  width: 22px; height: 22px;
  background: var(--ink); color: var(--c);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-left: 0;
}
.cat-app-title .ctrls span svg { width: 60%; height: 60%; display: block; }
.cat-app-title .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  font-weight: 700;
}
.cat-app-toolbar {
  display: flex; gap: 8px; padding: 10px 14px;
  background: rgba(0,0,0,0.5);
  border-bottom: 2px solid var(--c);
  align-items: center;
}
.cat-app-toolbar input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--c); color: var(--paper);
  padding: 6px 10px;
  font: inherit; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 1px; outline: 0;
}
.cat-app-toolbar input::placeholder { color: rgba(255,255,255,0.4); }
.cat-app-toolbar .chip {
  background: transparent; border: 1.5px solid var(--c); color: var(--c);
  padding: 5px 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.cat-app-toolbar .chip.sel { background: var(--c); color: var(--ink); }
.cat-app-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; scrollbar-width: thin; }

/* Per-category scrollbar tinting — overrides the global lime accent */
.cat-app[data-cat="tech"],   .cat-app[data-cat="tech"]   * { scrollbar-color: var(--c-tech)   var(--ink); }
.cat-app[data-cat="tech"]   ::-webkit-scrollbar-thumb { background: var(--c-tech); }
.cat-app[data-cat="arcade"], .cat-app[data-cat="arcade"] * { scrollbar-color: var(--c-arcade) var(--ink); }
.cat-app[data-cat="arcade"] ::-webkit-scrollbar-thumb { background: var(--c-arcade); }
.cat-app[data-cat="web"],    .cat-app[data-cat="web"]    * { scrollbar-color: var(--c-web)    var(--ink); }
.cat-app[data-cat="web"]    ::-webkit-scrollbar-thumb { background: var(--c-web); }
.cat-app[data-cat="block"],  .cat-app[data-cat="block"]  * { scrollbar-color: var(--c-block)  #1E1E1F; }
.cat-app[data-cat="block"]  ::-webkit-scrollbar-thumb { background: var(--c-block); }
.cat-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.cat-site {
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--c);
  padding: 0; position: relative; cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column;
  transition: transform .12s;
}
.cat-site:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--c); }
.cat-site .thumb {
  background: var(--c); height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 32px; color: var(--ink);
  border-bottom: 2px solid var(--c);
}
.cat-site .info { padding: 8px 10px; }
.cat-site .info .nm {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; line-height: 1.2;
}
.cat-site .info .meta { font-size: 10px; opacity: 0.6; margin-top: 3px; letter-spacing: 1px; }
.cat-site .fav {
  position: absolute; top: 4px; right: 4px;
  background: var(--ink); color: var(--c);
  border: 1.5px solid var(--ink);
  width: 22px; height: 22px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.cat-site .fav:hover, .cat-site .fav.faved { background: var(--hover); color: var(--ink); }
.cat-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 40px 20px;
  font-size: 13px; opacity: 0.5; letter-spacing: 1px;
}

/* ===== THEME: TECH TERMINAL — Code.org Blockly ===== */
[data-cat="tech"] .cat-app-title {
  background: #0e0a12; border-bottom: 2px solid var(--c-tech); padding: 6px 14px;
}
[data-cat="tech"] .cat-app-title #cat-app-name {
  color: var(--c-tech);
}
[data-cat="tech"] .cat-app-title .ctrls span {
  background: var(--c-tech); color: var(--ink);
}
[data-cat="web"] .cat-app-title .ctrls span {
  background: var(--c-web); color: var(--ink);
}

/* ===== THEME: AVERY ARCADE — game portal ===== */
[data-cat="arcade"] .cat-app-body {
  background: #0c0816;
  padding: 0;
}
[data-cat="arcade"] .cat-app-body::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,0.08) 2px 3px);
  pointer-events: none;
}
.theme-arcade {
  display: flex !important; flex-direction: column; gap: 0;
  padding: 0 !important;
}
.arc-top { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 2px solid var(--c); min-height: 280px; }
.arc-hero {
  display: flex; height: 100%; cursor: pointer;
  background: linear-gradient(135deg, #1a0a30 0%, #0c0816 100%);
  overflow: hidden; position: relative;
}
.arc-right { background: rgba(0,0,0,0.6); border-left: 2px solid var(--c); display: flex; flex-direction: column; padding: 0; overflow-y: auto; }
.arc-panel-head { font-family: "Geologica", sans-serif; font-weight: 900; font-size: 13px; color: var(--paper); padding: 10px 12px 6px; letter-spacing: 0.02em; }
.arc-panel-empty { padding: 8px 12px; font-size: 11px; opacity: 0.4; color: var(--paper); }
.arc-recent { border-bottom: 1px solid rgba(255,224,0,0.15); }
.arc-recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 10px; }
.arc-recent-card { cursor: pointer; text-align: center; }
.arc-recent-card:hover { opacity: 0.8; }
.arc-recent-img { height: 50px; background: #1a1a2e; background-size: cover; background-position: center; border: 1.5px solid rgba(255,255,255,0.1); }
.arc-recent-name { font-size: 9px; font-weight: 700; color: var(--paper); padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.3px; }
.arc-popular { flex: 1; }
.arc-pop-list { padding: 0 12px 8px; }
.arc-pop-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dotted rgba(255,224,0,0.1); cursor: pointer; color: var(--paper); }
.arc-pop-row:hover { color: var(--c); }
.arc-pop-rank { font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 16px; color: var(--c); width: 22px; text-align: center; }
.arc-pop-name { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12px; }
.arc-cat-jump { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px; border-top: 1px solid rgba(255,224,0,0.15); }
.arc-cat-btn { background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,224,0,0.25); color: var(--paper); font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 5px 8px; cursor: pointer; }
.arc-cat-btn:hover { background: rgba(255,224,0,0.15); border-color: var(--c); color: var(--c); }
.arc-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.7); }
.arc-hero-info {
  position: absolute; bottom: 16px; left: 20px; z-index: 2;
}
.arc-hero-badge {
  display: inline-block;
  background: var(--c); color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  padding: 3px 8px; margin-bottom: 6px;
}
.arc-hero-title {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 28px; color: var(--paper);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8);
}
.arc-hero-btn {
  display: inline-block; margin-top: 8px;
  background: var(--c); color: var(--ink); border: 0;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 13px; padding: 6px 20px; letter-spacing: 1px;
  cursor: pointer;
}
.arc-hero-btn:hover { background: var(--paper); }
.arc-hero-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.arc-dot {
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.3); cursor: pointer;
}
.arc-dot.active { background: var(--c); }
.arc-dot:hover { background: var(--paper); }
.arc-hero-prev, .arc-hero-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); border: 0; color: var(--paper);
  font-size: 16px; padding: 8px 10px; cursor: pointer; z-index: 3;
}
.arc-hero-prev { left: 8px; }
.arc-hero-next { right: 8px; }
.arc-hero-prev:hover, .arc-hero-next:hover { background: var(--c); color: var(--ink); }
.arc-section { padding: 12px 16px 4px; }
.arc-section-head {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 15px; color: var(--paper);
  margin-bottom: 10px; letter-spacing: 0.02em;
}
.arc-row {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin; scrollbar-color: var(--c) transparent;
}
.arc-row::-webkit-scrollbar { height: 6px; }
.arc-row::-webkit-scrollbar-thumb { background: var(--c); }
.arc-card {
  flex-shrink: 0; width: 140px;
  cursor: pointer; position: relative;
}
.arc-card:hover .arc-thumb { transform: scale(1.04); }
.arc-card:hover .arc-play { opacity: 1; }
.arc-thumb {
  width: 140px; height: 95px;
  background: #1a1a2e; background-size: cover; background-position: center;
  border: 2px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: transform .15s;
}
.arc-sym { font-size: 28px; color: var(--c); }
.arc-play {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 14px; color: var(--paper); letter-spacing: 2px;
  opacity: 0; transition: opacity .15s;
}
.arc-name {
  font-family: 'Inter', sans-serif; font-weight: 600;
  font-size: 11px; color: var(--paper);
  padding: 5px 2px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.theme-arcade .fav {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; padding: 0;
  background: rgba(0,0,0,0.75); color: var(--paper);
  border: 1.5px solid rgba(255,255,255,0.35);
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
  z-index: 3;
}
.theme-arcade .fav.faved { color: var(--c-arcade); border-color: var(--c-arcade); background: rgba(0,0,0,0.85); }
.theme-arcade .fav:hover { color: var(--hover); border-color: var(--hover); background: rgba(0,0,0,0.9); }
.arc-back-top {
  position: sticky; bottom: 10px; float: right;
  margin: 10px 16px;
  background: var(--c); color: var(--ink); border: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 6px 14px; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.arc-back-top:hover { background: var(--paper); }

/* ===== THEME: WEB WONDERS — Browser ===== */
[data-cat="web"] .cat-app-title {
  background: #1a1a24; border-bottom: 0; padding: 0 0 0 0;
  display: flex; align-items: stretch;
}
[data-cat="web"] .cat-app-title #cat-app-name {
  background: #121218; color: var(--paper);
  font-size: 13px; font-weight: 700;
  padding: 7px 18px 7px 12px;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-top-right-radius: 8px;
  display: flex; align-items: center; gap: 6px;
}
[data-cat="web"] .cat-app-title #cat-app-name::before { content: '🔭'; }
[data-cat="web"] .cat-app-title .meta { display: none; }
[data-cat="web"] .cat-app-title .ctrls {
  margin-left: auto; display: flex; align-items: center; padding-right: 6px;
}
[data-cat="web"] .cat-app-title .ctrls span {
  background: transparent; color: rgba(255,255,255,0.5);
  border: 0; font-size: 13px;
}
[data-cat="web"] .cat-app-title .ctrls span:hover {
  color: var(--paper); background: rgba(255,255,255,0.1);
}
[data-cat="web"] .cat-app-toolbar { display: none; }
[data-cat="web"] .cat-app-body { background: #121218; padding: 0; }
.theme-web { display: flex !important; flex-direction: column; gap: 0; padding: 0 !important; }

/* Tab bar */
/* Address bar */
.wb-addr {
  display: flex; align-items: center; gap: 4px;
  background: #121218; padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.wb-nav {
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: rgba(255,255,255,0.5);
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.wb-nav:hover:not(:disabled) { color: var(--paper); background: rgba(255,255,255,0.08); }
.wb-nav:disabled { opacity: 0.25; cursor: default; }
.wb-url {
  flex: 1; background: #1e1e2a; border: 0; border-radius: 18px;
  padding: 7px 14px; color: rgba(255,255,255,0.6);
  font-family: 'Inter', sans-serif; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.wb-url:hover { background: #262636; }
.wb-lock { font-size: 11px; opacity: 0.5; }
.wb-ext-row {
  display: flex; align-items: center; gap: 2px; margin-left: 4px;
}
.wb-ext {
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: rgba(255,255,255,0.5);
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.wb-ext:hover { background: rgba(255,255,255,0.08); color: var(--paper); }
.wb-omni {
  background: transparent; border: 0; outline: 0;
  color: rgba(255,255,255,0.6); font-family: 'Inter', sans-serif;
  font-size: 13px; width: 100%;
}
.wb-omni:focus { color: var(--paper); }
.wb-waffle {
  font-size: 18px !important; letter-spacing: -1px;
}
.wb-ext-popup {
  position: absolute; z-index: 10;
  background: #1e1e2a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 10px 14px;
  color: var(--paper); font-family: 'Inter', sans-serif;
  font-size: 13px; max-width: 260px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.wb-waffle-menu {
  position: absolute; z-index: 10;
  background: #1e1e2a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  width: 200px;
}
.wm-head {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px;
  padding: 4px 8px 8px; border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}
.wm-app {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  cursor: pointer; color: var(--paper);
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
}
.wm-app:hover { background: rgba(255,255,255,0.08); }
.wm-dot {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
.wb-bookmarks {
  display: flex; align-items: center; gap: 2px;
  background: #121218; padding: 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0; overflow-x: auto;
}
.wb-bm {
  padding: 4px 10px; border-radius: 4px;
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: rgba(255,255,255,0.65); white-space: nowrap;
  cursor: pointer; text-decoration: none;
}
.wb-bm:hover { background: rgba(255,255,255,0.08); color: var(--paper); }

/* NTP content */
.wb-ntp {
  flex: 1; overflow-y: auto; padding: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(138,108,255,0.08) 0%, transparent 50%),
    #121218;
}
.wb-search-wrap {
  text-align: center; padding: 20px 20px 16px;
}
.wb-logo {
  font-family: 'Geologica', sans-serif; font-weight: 900;
  font-size: 28px; color: var(--paper);
  letter-spacing: 0.02em; margin-bottom: 14px;
}
.wb-logo img { max-height: 48px; display: block; margin: 0 auto; }
.wb-search {
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center;
  background: #1e1e2a; border: 2px solid #3a3a4a;
  border-radius: 10px;
}
.wb-search:focus-within { border-color: var(--c-web); }
.wb-search-icon { padding: 0 14px; font-size: 16px; color: rgba(255,255,255,0.4); }
.wb-search-input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--paper); font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 500; padding: 12px 14px 12px 0;
}
.wb-search-input::placeholder { color: rgba(255,255,255,0.3); }

/* Daily cards */
.wb-daily {
  display: flex; gap: 12px; justify-content: center;
  padding: 0 20px 24px; max-width: 600px; margin: 0 auto;
}
.wb-daily-card {
  flex: 1; background: rgba(138,108,255,0.08);
  border: 1.5px solid rgba(138,108,255,0.2);
  padding: 12px 14px;
}
.wb-daily-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--c-web); margin-bottom: 4px;
}
.wb-daily-text {
  font-family: 'Inter', sans-serif;
  font-size: 13px; color: var(--paper); line-height: 1.4;
}

/* Section headers */
.wb-section { padding: 0 28px 12px; max-width: 960px; margin: 0 auto; width: 100%; }
.wb-section-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: rgba(255,255,255,0.3);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Shortcut grid — Opera speed-dial style */
.wb-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px 10px;
}
.wb-shortcut-grid .wb-shortcut { max-width: 140px; }
.wb-shortcut {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; cursor: pointer;
  position: relative;
}
.wb-shortcut:hover .wb-sc-icon {
  border-color: var(--c-web);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138,108,255,0.25);
}
.wb-sc-icon {
  width: 100%; aspect-ratio: 16/10;
  background: rgba(138,108,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 900; color: var(--paper);
  margin-bottom: 8px;
  background-size: cover; background-position: center;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.wb-sc-name {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--paper); opacity: 0.7;
  overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 100%;
}
.wb-shortcut:hover .wb-sc-name { opacity: 1; }
.wb-sc-fav {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(0,0,0,0.5); border: 0;
  color: rgba(255,255,255,0.3); font-size: 14px;
  cursor: pointer; padding: 3px 4px;
  border-radius: 6px; line-height: 1;
}
.wb-sc-fav:hover { color: var(--c-web); background: rgba(0,0,0,0.7); }
.wb-sc-fav.faved { color: var(--c-web); }

/* Block Breakers fonts */
@font-face {
  font-family: 'Raster Forge';
  src: url('../fonts/RasterForge.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Retro Byte';
  src: url('../fonts/RetroByte.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Ithaca';
  src: url('../fonts/Ithaca.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}

/* ===== THEME: BLOCK BREAKERS — Minecraft Launcher ===== */
[data-cat="block"] .cat-app-body {
  background: url('../img/mc/dirt-texture.webp') repeat;
  background-size: 64px;
  image-rendering: pixelated;
  padding: 12px !important;
  overflow: hidden;
}
[data-cat="block"] .cat-app-toolbar { display: none; }
[data-cat="block"] .cat-app-title .ctrls span { background: var(--c-block); color: var(--ink); }
.theme-block {
  display: flex !important; flex-direction: column; gap: 0;
  padding: 0 !important;
  font-family: 'Retro Byte', monospace;
  color: #D0D1D4;
  background: #313233;
  box-shadow: inset 2px 2px 0 #5A5B5C, inset -2px -2px 0 #1E1E1F;
  height: 100%; overflow: hidden;
  position: relative;
  scrollbar-color: #2ECC71 #1E1E1F;
}
.theme-block::after {
  content: ''; position: absolute; inset: 0;
  border: 3px solid #2ECC71;
  pointer-events: none; z-index: 50;
}
.theme-block .fav { display: none; }

/* Hero banner row */
.mc-hero {
  display: grid; grid-template-columns: 1fr 1fr;
  flex-shrink: 0; border-bottom: 3px solid #1E1E1F;
  position: relative; z-index: 2;
}
.mc-hero-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 12px 18px; min-height: 100px;
  background: #48494A; cursor: pointer;
  transition: filter 0.1s;
  border: 1px solid #2ECC71;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.08), inset -2px -2px 0 rgba(0,0,0,0.3);
}
.mc-hero-card:first-child { border-right: 1px solid #2ECC71; }
.mc-hero-card:hover { filter: brightness(1.1); }
.mc-hero-card:hover .mc-btn-green {
  background: #4a9c32;
  box-shadow: inset -2px -2px 0 #1D4D13, inset 2px 2px 0 rgba(79,145,60,0.75);
}
.mc-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  image-rendering: pixelated; opacity: 1; z-index: 0;
}
.mc-hero-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(30,30,31,0.9) 0%, rgba(30,30,31,0.3) 50%, transparent 100%);
  z-index: 1;
}
.mc-hero-content {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mc-hero-icon {
  width: clamp(44px, 3.6vw, 60px); height: clamp(44px, 3.6vw, 60px);
  aspect-ratio: 1 / 1;
  background: #313233; border: 2px solid #1E1E1F;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mc-hero-icon svg { width: 60% !important; height: 60% !important; }
.mc-hero-text { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.mc-hero-title {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(20px, 1.9vw, 32px); color: #fff; letter-spacing: -0.5px;
  text-shadow: 2px 2px 0 #000, 0 0 10px rgba(0,0,0,0.5);
  line-height: 1; margin-bottom: 2px;
}
.mc-hero-content .mc-btn-green {
  font-size: clamp(15px, 1.3vw, 22px) !important;
  padding: 12px 26px 16px !important;
}
.mc-hero-title .accent { color: #2ECC71; }
.mc-hero-desc {
  font-size: clamp(15px, 1.2vw, 22px); color: #D0D1D4;
  line-height: 1.05; text-shadow: 1px 1px 0 #000;
}

/* MC buttons (green / stone) */
.mc-btn {
  font-family: 'Raster Forge', 'Press Start 2P', monospace; cursor: pointer;
  border: none; outline: none;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.4);
  transition: background-color 0.05s;
}
.mc-btn-green {
  background: #3C8527; color: #fff;
  border: 3px solid #1E1E1F;
  box-shadow: inset -3px -3px 0 #1D4D13, inset 3px 3px 0 rgba(79,145,60,0.75);
  padding: 8px 18px 12px; letter-spacing: 1px;
}
.mc-btn-green:hover {
  background: #4a9c32;
  box-shadow: inset -2px -2px 0 #1D4D13, inset 2px 2px 0 rgba(79,145,60,0.75);
}
.mc-btn-green:active {
  position: relative; top: 2px;
  box-shadow: inset -1px -1px 0 #1D4D13, inset 1px 1px 0 rgba(79,145,60,0.75);
}
.mc-btn-stone {
  background: #48494A; color: #D0D1D4;
  border: 3px solid #1E1E1F;
  box-shadow: inset -3px -3px 0 #3a3a3b, inset 3px 3px 0 #5A5B5C;
  padding: 8px 18px 12px; letter-spacing: 1px;
}
.mc-btn-stone:hover { background: #555658; }
.mc-btn-stone:active { position: relative; top: 2px; }

/* Tabs */
.mc-tabs {
  display: flex; gap: 0; flex-shrink: 0;
  background: #313233; border-bottom: 3px solid #1E1E1F;
}
.mc-tab {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(12px, 1.15vw, 20px); color: #8A8B8C;
  padding: clamp(7px, 0.7vw, 13px) clamp(18px, 1.5vw, 28px); cursor: pointer;
  background: transparent; border: none;
  border-right: 2px solid #1E1E1F;
  letter-spacing: 1px; outline: none; position: relative;
  transition: color 0.1s, background 0.1s;
}
.mc-tab:hover { color: #D0D1D4; background: rgba(255,255,255,0.03); }
.mc-tab.active {
  color: #2ECC71; background: #48494A;
  text-shadow: 1px 1px 0 #000, 0 0 8px rgba(46,204,113,0.25);
  box-shadow: inset 0 2px 0 #5A5B5C;
}
.mc-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: #2ECC71;
  box-shadow: 0 0 8px rgba(46,204,113,0.5);
}

/* Master-detail grid */
.mc-detail {
  flex: 1; display: grid; grid-template-columns: 1fr 380px;
  min-height: 0; overflow: hidden;
}

/* MC scrollbar */
.mc-scroll { scrollbar-color: #2ECC71 #1E1E1F; scrollbar-width: thin; }
.mc-scroll::-webkit-scrollbar { width: 10px; }
.mc-scroll::-webkit-scrollbar-track { background: #1E1E1F; border-left: 2px solid #111; }
.mc-scroll::-webkit-scrollbar-thumb {
  background: #2ECC71; border: 2px solid #1E1E1F;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.15);
}
.mc-scroll::-webkit-scrollbar-thumb:hover { background: #4ae08a; }

/* Left: item list */
.mc-list {
  overflow-y: auto; background: #313233;
  border-right: 3px solid #1E1E1F;
  box-shadow: inset -2px 0 0 #5A5B5C;
}
.mc-list-empty {
  padding: 40px 20px; text-align: center;
  font-size: clamp(9px, 0.75vw, 13px); color: #5A5B5C;
}
.mc-item {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 18px;
  border-bottom: 2px solid #1E1E1F;
  cursor: pointer; background: #48494A;
  transition: background 0.05s; position: relative;
}
.mc-item:hover { background: #5A5B5C; }
.mc-item.selected {
  background: #48494A;
  border-left: 4px solid #2ECC71;
  box-shadow: inset 0 0 12px rgba(46,204,113,0.08);
}
.mc-item.selected .mc-item-name {
  color: #2ECC71;
  text-shadow: 0 0 6px rgba(46,204,113,0.3);
}
.mc-item-thumb {
  width: 64px; height: 64px; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #242425;
  border: 2px solid #1E1E1F;
  image-rendering: pixelated;
}
.mc-item-info { flex: 1; min-width: 0; }
.mc-item-name {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(15px, 1.45vw, 25px); color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 1px 1px 0 #000;
}
.mc-item-sub {
  font-size: clamp(15px, 1.3vw, 20px); color: #8A8B8C; margin-top: 6px;
}
.mc-item-mods {
  display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.mc-mod {
  font-size: clamp(11px, 0.9vw, 14px); color: #2ECC71;
  background: rgba(46,204,113,0.1);
  padding: 3px 8px;
  border: 1px solid rgba(46,204,113,0.2);
  letter-spacing: 0.5px;
}
.mc-item-dl {
  display: flex; align-items: center; justify-content: center;
  background: #3C8527; color: #fff;
  border: 2px solid #1E1E1F;
  box-shadow: inset -2px -2px 0 #1D4D13, inset 2px 2px 0 rgba(79,145,60,0.75);
  cursor: pointer; padding: 10px 12px 12px;
  font-family: 'Raster Forge', 'Press Start 2P', monospace; font-size: 0;
  flex-shrink: 0;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
  transition: background 0.05s;
}
.mc-item-dl svg { width: 22px; height: 22px; stroke-width: 2.5; }
.mc-item-dl:hover {
  background: #4a9c32;
  box-shadow: inset -1px -1px 0 #1D4D13, inset 1px 1px 0 rgba(79,145,60,0.75);
}
.mc-item-dl:active { position: relative; top: 1px; }

/* Right: preview panel (static) */
.mc-preview {
  display: flex; flex-direction: column;
  background: #313233; overflow: hidden;
}
.mc-preview-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: #5A5B5C; text-align: center; padding: 20px;
}
.mc-prev-img {
  aspect-ratio: 2 / 1; flex-shrink: 0;
  background-size: cover; background-position: center;
  background-color: #242425;
  margin: 0;
  border-bottom: 3px solid #1E1E1F;
}
.mc-prev-meta { padding: 10px 12px 6px; flex: 1; min-height: 0; }
.mc-prev-title {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(22px, 2.0vw, 36px); color: #fff;
  text-shadow: 1px 1px 0 #000; margin-bottom: 2px; line-height: 1;
}
.mc-prev-info-row { display: flex; gap: 24px; margin-bottom: 6px; }
.mc-prev-label {
  font-size: clamp(11px, 0.9vw, 14px); color: #8A8B8C;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px;
}
.mc-prev-value { font-size: clamp(13px, 1.1vw, 18px); color: #D0D1D4; }
.mc-prev-exp { color: #f39c12; }
.mc-prev-mods-label {
  font-size: clamp(11px, 0.9vw, 14px); color: #8A8B8C;
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 6px; margin-bottom: 4px;
}
.mc-prev-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-prev-mods .mc-mod { font-size: clamp(11px, 0.9vw, 14px); padding: 3px 8px; }
.mc-prev-desc {
  font-size: clamp(13px, 1.1vw, 18px); color: #8A8B8C; line-height: 1.15;
  margin-top: 6px; padding-top: 4px;
  border-top: 2px solid #1E1E1F;
}
.mc-prev-actions {
  padding: 10px 10px 4px;
  display: flex; gap: 8px; flex-shrink: 0;
}
.mc-prev-actions .mc-btn {
  flex: 1; text-align: center; line-height: 1; white-space: nowrap;
  font-size: clamp(14px, 1.25vw, 20px) !important;
  padding: 10px 12px 14px !important;
}
.mc-prev-actions .mc-btn svg {
  width: clamp(14px, 1.2vw, 20px) !important;
  height: clamp(14px, 1.2vw, 20px) !important;
}

/* Add-ons grid */
.mc-addon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px; padding: 14px;
}
.mc-addon-card {
  background: #48494A; border: 2px solid #1E1E1F;
  box-shadow: inset -2px -2px 0 #3a3a3b, inset 2px 2px 0 #5A5B5C;
  padding: 12px; cursor: pointer; transition: background 0.05s;
}
.mc-addon-card:hover { background: #5A5B5C; }
.mc-addon-icon { font-size: 24px; margin-bottom: 8px; }
.mc-addon-name {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(11px, 0.95vw, 16px); color: #fff;
  text-shadow: 1px 1px 0 #000; margin-bottom: 4px;
}
.mc-addon-desc { font-size: clamp(8px, 0.7vw, 12px); color: #8A8B8C; line-height: 1.5; }

/* Links list */
.mc-links-list {
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.mc-link-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; background: #48494A;
  border: 2px solid #1E1E1F;
  box-shadow: inset -2px -2px 0 #3a3a3b, inset 2px 2px 0 #5A5B5C;
  cursor: pointer; text-decoration: none;
  transition: background 0.05s;
}
.mc-link-item:hover { background: #5A5B5C; }
.mc-link-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #313233; border: 2px solid #1E1E1F;
  box-shadow: inset 0px 3px 0px #1a1a1b; flex-shrink: 0;
}
.mc-link-name {
  font-family: 'Raster Forge', 'Press Start 2P', monospace;
  font-size: clamp(11px, 0.95vw, 16px); color: #fff; text-shadow: 1px 1px 0 #000;
}
.mc-link-desc { font-size: clamp(8px, 0.7vw, 12px); color: #8A8B8C; margin-top: 3px; }
.mc-link-arrow { margin-left: auto; color: #8A8B8C; }

/* Tab content visibility */
.mc-tab-content { display: none; flex: 1; min-height: 0; overflow: hidden; }
.mc-tab-content.active { display: flex; }
.mc-tab-worlds.active { display: grid; grid-template-columns: 1fr 380px; }
.mc-tab-addons.active, .mc-tab-links.active { display: block; overflow-y: auto; flex: 1; }

/* Footer strip */
.mc-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 6px 28px;
  background: #242425;
  border-top: 3px solid #1E1E1F;
  box-shadow: inset 0 2px 0 #3a3a3b;
  flex-shrink: 0; font-size: clamp(14px, 1.3vw, 22px); color: #8A8B8C;
}
.mc-footer span { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.mc-footer svg {
  width: clamp(18px, 1.5vw, 26px) !important;
  height: clamp(18px, 1.5vw, 26px) !important;
  vertical-align: middle !important;
}
.mc-footer b { color: #2ECC71; }
.mc-footer-sep { color: #2ECC71; }

/* ===== LINK LAUNCHER window ===== */
.win.w-launcher { --c: var(--accent); background: #080b08; color: var(--paper); }
.win.w-launcher .win-body { padding: 0; overflow: hidden; }

.ll-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 100%;
  min-height: 0;
}

/* Sidebar */
.ll-sidebar {
  background: rgba(0,0,0,0.4);
  border-right: 2px solid rgba(198,245,66,0.22);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  padding: 14px 0;
}
.ll-section { padding: 0 12px 18px; }
.ll-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 2px;
  color: var(--accent); opacity: 0.85;
  margin-bottom: 9px; text-transform: uppercase; font-weight: 700;
}
.ll-cats { display: flex; flex-direction: column; gap: 4px; }
.ll-cat {
  background: transparent;
  border: 2px solid transparent;
  color: var(--paper);
  text-align: left; padding: 9px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.4px;
  text-transform: uppercase; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.ll-cat:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.22); }
.ll-cat.active {
  background: rgba(198,245,66,0.14);
  background: color-mix(in srgb, var(--cat, var(--accent)) 18%, transparent);
  border-color: var(--cat, var(--accent)); color: var(--cat, var(--accent));
}
.ll-cat:focus-visible { outline: 3px solid var(--cat, var(--accent)); outline-offset: 1px; }

.ll-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ll-tag-lbl {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--paper); opacity: 0.8;
  cursor: pointer; padding: 6px 9px;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.03);
  user-select: none; text-transform: uppercase;
}
.ll-tag-lbl:hover { opacity: 1; border-color: rgba(255,255,255,0.42); }
.ll-tag-lbl.on { opacity: 1; background: var(--accent); color: var(--ink); border-color: var(--accent); }
.ll-tag-lbl input { width: 14px; height: 14px; margin: 0; cursor: pointer; accent-color: var(--ink); }
.ll-tag-lbl:focus-within { outline: 3px solid var(--accent); outline-offset: 1px; }

/* Main area */
.ll-main {
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
}
.ll-toolbar {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 14px;
  border-bottom: 2px solid rgba(198,245,66,0.18);
  flex-shrink: 0;
}
.ll-search {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,0.07);
  border: 2px solid rgba(255,255,255,0.22);
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px; font-weight: 700; letter-spacing: 0.4px;
  padding: 10px 12px;
}
.ll-search:focus { outline: none; border-color: var(--accent); background: rgba(198,245,66,0.07); }
.ll-search::placeholder { color: rgba(255,255,255,0.4); }
.ll-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent); opacity: 0.85; white-space: nowrap;
}
.ll-sort {
  background: transparent; border: 2px solid rgba(255,255,255,0.28);
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  padding: 9px 12px; cursor: pointer; white-space: nowrap;
  transition: background 0.1s, border-color 0.1s;
}
.ll-sort:hover { background: rgba(255,255,255,0.09); border-color: var(--accent); color: var(--accent); }
.ll-sort:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

/* Card grid */
.ll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  grid-auto-rows: 214px;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
  align-content: start;
  flex: 1; min-height: 0;
}

/* Flip card */
.ll-card {
  position: relative;
  background: none; border: none; padding: 0;
  perspective: 1200px;
  cursor: pointer; font: inherit; color: inherit; text-align: left;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.45);
  transition: box-shadow 0.12s;
}
.ll-card:hover { box-shadow: 6px 6px 0 rgba(0,0,0,0.55); }
.ll-card:focus-visible { outline: none; }
.ll-card:focus-visible .ll-face-front { outline: 3px solid var(--cat, var(--accent)); outline-offset: 2px; }
.ll-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.4, 0.15, 0.2, 1);
}
.ll-card.flipped .ll-card-inner { transform: rotateY(180deg); }

.ll-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  background: #11160f;
  border: 2px solid rgba(255,255,255,0.14);
  overflow: hidden;
}

/* Front */
.ll-card:hover .ll-face-front { border-color: var(--cat, var(--accent)); }
.ll-thumb {
  position: relative; flex: 1; min-height: 0;
  background: #0a0d08;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ll-thumb-shot { width: 100%; height: 100%; object-fit: cover; display: block; }
.ll-thumb.is-logo { background: color-mix(in srgb, var(--cat, var(--accent)) 16%, #0a0d08); }
.ll-thumb-logo { width: 64%; height: 64%; object-fit: contain; }
.ll-thumb.is-icon { background: color-mix(in srgb, var(--cat, var(--accent)) 14%, #0a0d08); }
.ll-thumb-ico { width: 54px; height: 54px; display: block; color: var(--cat, var(--accent)); }
.ll-thumb-ico svg { width: 100%; height: 100%; fill: var(--cat, var(--accent)); color: var(--cat, var(--accent)); }
.ll-thumb-letter {
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 44px;
  color: var(--cat, var(--accent));
}
.ll-flip-btn {
  position: absolute; top: 7px; right: 7px;
  width: 34px; height: 34px; padding: 0;
  background: rgba(0,0,0,0.62); border: 2px solid rgba(255,255,255,0.45);
  color: #fff; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.ll-flip-btn svg { width: 22px; height: 22px; fill: currentColor; }
.ll-flip-btn:hover { background: var(--cat, var(--accent)); color: var(--ink); border-color: var(--ink); }
.ll-flip-btn:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.ll-front-info {
  flex-shrink: 0; padding: 9px 10px 11px;
  border-top: 3px solid var(--cat, var(--accent));
  background: #11160f;
}
.ll-card-name {
  font-family: 'Geologica', sans-serif;
  font-weight: 700; font-size: 16px; line-height: 1.2;
  color: var(--paper); letter-spacing: 0.2px;
  margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ll-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ll-card-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px;
  padding: 3px 6px;
  background: var(--cat, var(--accent)); color: var(--ink);
  text-transform: uppercase; white-space: nowrap;
}
.ll-card-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ll-tag-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.4px;
  padding: 3px 6px;
  border: 1.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.82);
  text-transform: uppercase; white-space: nowrap;
}

/* Back */
.ll-face-back {
  transform: rotateY(180deg);
  border-color: var(--cat, var(--accent));
  padding: 12px; gap: 8px;
}
.ll-flip-back {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; padding: 0;
  background: transparent; border: 2px solid rgba(255,255,255,0.3);
  color: var(--paper); cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.ll-flip-back svg { width: 18px; height: 18px; }
.ll-flip-back:hover { border-color: var(--cat, var(--accent)); color: var(--cat, var(--accent)); }
.ll-flip-back:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.ll-back-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.6px;
  padding: 3px 6px; align-self: flex-start;
  background: var(--cat, var(--accent)); color: var(--ink);
  text-transform: uppercase;
}
.ll-back-name {
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 17px;
  line-height: 1.15; color: var(--paper); padding-right: 30px;
}
.ll-back-desc {
  font-family: 'Inter', sans-serif; font-weight: 500;
  font-size: 13.5px; line-height: 1.4; color: rgba(255,255,255,0.92);
  flex: 1; min-height: 0; overflow: auto;
}
.ll-back-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ll-visit {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px;
  background: var(--cat, var(--accent)); color: var(--ink);
  border: 2px solid var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  cursor: pointer; text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.5);
  transition: transform 0.08s, box-shadow 0.08s;
}
.ll-visit svg { width: 16px; height: 16px; }
.ll-visit:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(0,0,0,0.6); }
.ll-visit:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.5); }
.ll-visit:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.ll-empty {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px;
}
.ll-empty-big {
  font-family: 'Geologica', sans-serif; font-weight: 900; font-size: 20px;
  color: var(--paper); opacity: 0.6; letter-spacing: 1px; margin-bottom: 8px;
}
.ll-empty-sub {
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--paper); opacity: 0.4;
}

@media (prefers-reduced-motion: reduce) {
  .ll-card-inner { transition: none; }
  .ll-visit:hover { transform: none; }
}

/* ── Link Launcher v2: fav badge + back action buttons ─────────────────────── */
.ll-fav-badge {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--ink); font-size: 13px; line-height: 1;
}
.ll-back-actions { display: flex; gap: 5px; margin-top: 6px; }
.ll-act {
  flex: 1; padding: 5px 2px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 9.5px;
  border: 2px solid var(--white); background: transparent; color: var(--white);
}
.ll-act-fav.on { background: var(--primary); color: var(--ink); }
.ll-act-pin.on { background: var(--hover); color: var(--white); }
.ll-act:hover { background: var(--paper); color: var(--ink); }

/* ── Link Launcher: 🏆 CLASS TOP 5 sidebar section ─────────────────────────── */
.ll-top5 { margin-top: 14px; }
.ll-top5 .ll-side-label { font-family: Geologica, sans-serif; font-weight: 900; font-size: 11px; letter-spacing: 1px; color: #FFB800; margin-bottom: 6px; }
.ll-top5-row {
  display: flex; align-items: center; gap: 7px; width: 100%;
  background: transparent; border: 0; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 12px;
  color: var(--paper); padding: 4px 2px; text-align: left;
}
.ll-top5-row:hover { color: var(--hover); }
.ll-top5-rank { width: 20px; text-align: center; }

/* ── WORD RUSH (Game Box) — timer bar + Wordle-style tile feedback ─────────── */
.wg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.wg-timer {
  font-family: 'VT323', monospace; font-size: 30px; line-height: 1;
  color: var(--ink); min-width: 64px;
}
.wg-timer.wg-urgent { color: var(--hover); animation: wg-pulse 1s steps(2) infinite; }
@keyframes wg-pulse { 50% { opacity: 0.35; } }
.wg-tools { display: flex; gap: 6px; }
.wg-pass, .wg-hint {
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 10px;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  padding: 4px 8px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.wg-pass:hover, .wg-hint:hover { background: var(--accent); }
.wg-pass:disabled { opacity: 0.35; cursor: default; box-shadow: none; }
.wg-pass:active, .wg-hint:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
/* Wordle feedback on answer slots */
.wg-slot.wg-g { background: #7BC950 !important; border-color: var(--ink) !important; color: var(--ink) !important; }
.wg-slot.wg-y { background: #FFB800 !important; border-color: var(--ink) !important; color: var(--ink) !important; }
.wg-slot.wg-x { background: #c8c8c0 !important; color: #666 !important; }

/* ── 🤝 VS MODE (Game Box pass-and-play) ───────────────────────────────────── */
.vs-btn {
  margin-left: auto;
  font-family: Geologica, sans-serif; font-weight: 900; font-size: 12px;
  border: 2px solid var(--ink); background: var(--white); color: var(--ink);
  padding: 6px 12px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
}
.vs-btn.on { background: var(--hover); color: var(--white); }
.vs-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.vs-overlay {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 5, 16, 0.7);
}
.gb-stagewrap { position: relative; }
.vs-card {
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--hover);
  padding: 22px 30px; text-align: center; max-width: 340px;
}
.vs-title { font-family: Geologica, sans-serif; font-weight: 900; font-size: 20px; letter-spacing: 0.5px; }
.vs-sub { font-family: Inter, sans-serif; font-size: 13px; margin-top: 8px; }
.vs-score { font-family: 'VT323', monospace; font-size: 34px; margin-bottom: 6px; }
.vs-row { display: flex; gap: 10px; justify-content: center; }
.vs-go, .vs-exit {
  margin-top: 16px; padding: 7px 18px; cursor: pointer;
  font-family: Geologica, sans-serif; font-weight: 900; font-size: 13px;
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.vs-go { background: var(--accent); color: var(--ink); }
.vs-exit { background: var(--white); color: var(--ink); }
.vs-go:active, .vs-exit:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

/* ── Pixel Pet: floating emoji bursts (petting + care reactions) ───────────── */
.pet-burst {
  position: absolute; bottom: 8%; font-size: 16px; pointer-events: none;
  animation: pet-burst-rise 1.3s ease-out forwards; z-index: 3;
}
@keyframes pet-burst-rise {
  0%   { transform: translateY(0) scale(0.7); opacity: 0; }
  18%  { opacity: 1; }
  100% { transform: translateY(-46px) scale(1.15); opacity: 0; }
}
