/* =========================================================
   K-io / PUNKBARA CLUB — desktop retrô
   ========================================================= */
:root {
  --teal: #008080;
  --face: #c0c0c0;
  --shadow: #808080;
  --dark: #000;
  --light: #fff;
  --hi: #dfdfdf;
  --title-a: #000080;
  --title-b: #1084d0;
  --title-off-a: #808080;
  --title-off-b: #b5b5b5;
  --red: #e01b24;
  --font: Tahoma, "MS Sans Serif", Verdana, Geneva, sans-serif;
  --pixel: "Press Start 2P", monospace;
  --cam: "VT323", "Courier New", monospace;
  --task-h: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font: 12px/1.35 var(--font);
  color: #000;
  background: #000;
  -webkit-font-smoothing: none;
  user-select: none;
  -webkit-user-select: none;
}
button { font: inherit; color: inherit; }
a { color: #0000ee; }
.hidden { display: none !important; }

/* ---------- bevels ---------- */
.bevel-out {
  background: var(--face);
  border: 1px solid; border-color: var(--hi) var(--dark) var(--dark) var(--hi);
  box-shadow: inset 1px 1px var(--light), inset -1px -1px var(--shadow);
}
.bevel-in {
  background: #fff;
  border: 1px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow);
  box-shadow: inset 1px 1px var(--dark), inset -1px -1px var(--hi);
}
.btn95 {
  background: var(--face);
  border: 1px solid; border-color: var(--light) var(--dark) var(--dark) var(--light);
  box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hi);
  padding: 4px 12px; min-height: 23px; cursor: pointer;
}
.btn95:active, .btn95.pressed {
  border-color: var(--dark) var(--light) var(--light) var(--dark);
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi);
  padding: 5px 11px 3px 13px;
}
.btn95:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }

/* =========================================================
   BOOT / BIOS
   ========================================================= */
.screen { position: fixed; inset: 0; z-index: 9000; }
#boot { background: #000; color: #c8c8c8; padding: 28px; font: 22px/1.25 var(--cam); }
#bios { margin: 0; white-space: pre-wrap; }
#bios .ok { color: #55ff55; } #bios .red { color: #ff5555; } #bios .y { color: #ffff55; }
.skip {
  position: absolute; right: 18px; bottom: 16px; background: none; border: 1px solid #555;
  color: #888; font: 18px var(--cam); padding: 2px 10px; cursor: pointer; z-index: 3;
}
.skip:hover { color: #fff; border-color: #fff; }

/* ---------- tela de carregamento estilo "loading de videogame" ---------- */
#splash {
  background: radial-gradient(circle at 50% 45%, #2a1030 0%, #0b0610 70%);
  color: #fff; font-family: var(--pixel); text-align: center; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.splash-grid {
  position: absolute; inset: 50% -50% -50%; transform: perspective(300px) rotateX(60deg);
  background-image: linear-gradient(#e01b2455 2px, transparent 2px), linear-gradient(90deg, #e01b2455 2px, transparent 2px);
  background-size: 50px 50px; animation: gridmove 1.2s linear infinite; pointer-events: none;
}
@keyframes gridmove { to { background-position: 0 50px; } }
.splash-title { position: relative; font-size: clamp(14px, 3.4vw, 30px); letter-spacing: 2px; text-shadow: 3px 3px 0 var(--red), 6px 6px 0 #000; }
.splash-title span { color: var(--red); }
.splash-stage { position: relative !important; width: 260px; height: 215px; inset: auto !important; }
.splash-hint { position: relative; font-size: clamp(9px, 1.8vw, 12px); color: #ffd400; animation: blink 1s steps(2) infinite; }
.splash-hint kbd { font-family: inherit; border: 2px solid #ffd400; padding: 2px 6px; }
.splash-hint.done { animation: none; color: #55ff55; }
.loadbar { position: relative; width: min(420px, 80vw); height: 22px; border: 3px solid #fff; padding: 3px; }
#loadfill { height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--red) 0 14px, transparent 14px 18px); transition: width .2s linear; }
.splash-status { position: relative; font-size: 10px; color: #aaa; min-height: 1em; }
.splash-status.ready { color: #fff; animation: blink .8s steps(2) infinite; cursor: pointer; }
@keyframes blink { 50% { opacity: 0; } }

/* =========================================================
   DESKTOP
   ========================================================= */
#desktop { position: fixed; inset: 0; background: var(--teal); }
#wallpaper {
  position: absolute; inset: 0 0 var(--task-h); display: grid; place-items: center; pointer-events: none;
}
/* marca d'água: só o traço, monocromático e bem translúcido */
#wallpaper img { width: auto; height: min(58vh, 420px); max-width: 70vw; object-fit: contain; opacity: .12; filter: brightness(0); }
body.punk #desktop { background: #1a1a1a radial-gradient(#333 1px, transparent 1px) 0 0/14px 14px; }
body.punk #wallpaper img { opacity: .07; filter: brightness(0) invert(1); }

/* ícones */
#icons {
  position: absolute; top: 8px; left: 8px; bottom: calc(var(--task-h) + 8px);
  display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 6px;
}
.icon {
  width: 84px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 1px dotted transparent; cursor: pointer; color: #fff; text-align: center;
}
.icon svg { width: 36px; height: 36px; image-rendering: pixelated; }
.icon span { padding: 1px 3px; text-shadow: 1px 1px 0 #000; line-height: 1.2; word-break: break-word; }
.icon.selected span { background: #000080; text-shadow: none; }
.icon.selected svg { filter: drop-shadow(0 0 0 #000080) brightness(.7) sepia(1) hue-rotate(190deg) saturate(4); }
.icon:focus-visible { border-color: #fff; outline: none; }
.icon.dark { color: #000; }
.icon.dark span { text-shadow: none; }
.icon.dark.selected span { color: #fff; }

/* barra de tarefas */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--task-h); z-index: 8000;
  display: flex; align-items: center; gap: 4px; padding: 2px 3px; border-width: 1px 0 0;
}
#start-btn { display: flex; align-items: center; gap: 4px; padding: 2px 6px; height: 26px; font-weight: bold; flex: none; }
#start-btn:active, #start-btn.pressed { padding: 3px 5px 1px 7px; }
.start-logo img { height: 20px; width: 20px; display: block; }
#task-buttons { flex: 1; display: flex; gap: 3px; overflow: hidden; min-width: 0; }
.task-btn {
  display: flex; align-items: center; gap: 4px; max-width: 170px; min-width: 40px; flex: 0 1 170px; height: 26px;
  padding: 2px 6px; text-align: left; overflow: hidden;
}
.task-btn svg { width: 16px; height: 16px; flex: none; }
.task-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-btn.pressed { font-weight: bold; background: repeating-conic-gradient(#fff 0 25%, var(--face) 0 50%) 0 0/2px 2px; }
#tray { display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px 0 4px; background: var(--face); flex: none; }
#tray button { background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 2px; font-size: 11px; }
#tray svg { width: 16px; height: 16px; }
#clock { min-width: 38px; text-align: right; cursor: default; }

/* menu iniciar */
#start-menu {
  position: absolute; left: 2px; bottom: calc(var(--task-h) - 2px); z-index: 8001; display: flex; min-width: 230px;
  padding: 2px;
}
.sm-side {
  width: 26px; background: linear-gradient(0deg, #000080, #1084d0); color: #c0c0c0; position: relative;
}
body.punk .sm-side { background: linear-gradient(0deg, #000, var(--red)); }
.sm-side span {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%) rotate(180deg); writing-mode: vertical-rl;
  font: 18px/1 "Arial Black", Arial, sans-serif; white-space: nowrap;
}
.sm-side b { color: #fff; }
.sm-items { list-style: none; margin: 0; padding: 0; flex: 1; }
.sm-items li > button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; background: none; border: 0;
  cursor: pointer; text-align: left; font-size: 12px;
}
.sm-items li > button svg { width: 28px; height: 28px; flex: none; }
.sm-items li > button:hover, .sm-items li > button:focus-visible { background: #000080; color: #fff; outline: none; }
.sm-items li.sep { height: 0; border-top: 1px solid var(--shadow); border-bottom: 1px solid #fff; margin: 3px 2px; }
.sm-items u { text-decoration: underline; }

/* =========================================================
   JANELAS
   ========================================================= */
#windows { position: absolute; inset: 0 0 var(--task-h); pointer-events: none; }
.window {
  position: absolute; pointer-events: auto; display: flex; flex-direction: column; padding: 3px; min-width: 220px; min-height: 120px;
  resize: both; overflow: hidden; animation: winopen .14s ease-out;
}
@keyframes winopen { from { transform: scale(.85); opacity: 0; } }
.window.minimized { display: none; }
.window.maxed { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; resize: none; }
.titlebar {
  flex: none; height: 20px; display: flex; align-items: center; gap: 4px; padding: 0 2px 0 3px; color: #fff; font-weight: bold;
  background: linear-gradient(90deg, var(--title-off-a), var(--title-off-b)); cursor: default; touch-action: none;
}
.window.active .titlebar { background: linear-gradient(90deg, var(--title-a), var(--title-b)); }
body.punk .window.active .titlebar { background: linear-gradient(90deg, #000, var(--red)); }
.t-icon svg { width: 16px; height: 16px; display: block; }
.t-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-btns { display: flex; gap: 0; }
.t-btns button {
  width: 18px; height: 16px; padding: 0; margin-left: 0; background: var(--face); cursor: pointer; position: relative;
  border: 1px solid; border-color: var(--light) var(--dark) var(--dark) var(--light); box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hi);
}
.t-btns .tb-close { margin-left: 2px; }
.t-btns button:active { border-color: var(--dark) var(--light) var(--light) var(--dark); box-shadow: inset 1px 1px var(--shadow); }
.t-btns i { position: absolute; inset: 0; display: block; }
.tb-min i::after { content: ""; position: absolute; left: 4px; bottom: 3px; width: 6px; height: 2px; background: #000; }
.tb-max i::after { content: ""; position: absolute; left: 3px; top: 2px; width: 9px; height: 7px; border: 1px solid #000; border-top-width: 2px; }
.tb-close i::before, .tb-close i::after { content: ""; position: absolute; left: 3px; top: 6px; width: 10px; height: 2px; background: #000; transform: rotate(45deg); }
.tb-close i::after { transform: rotate(-45deg); }

.menubar { flex: none; display: flex; gap: 2px; padding: 2px 0; }
.menubar button { background: none; border: 1px solid transparent; padding: 1px 6px; cursor: pointer; }
.menubar button:hover { border-color: var(--light) var(--shadow) var(--shadow) var(--light); }
.menubar button::first-letter { text-decoration: underline; }
.win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.statusbar { flex: none; display: flex; gap: 2px; margin-top: 2px; }
.statusbar > div { flex: 1; padding: 2px 4px; border: 1px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); }

/* bloco de notas */
.notepad-text {
  flex: 1; resize: none; margin: 0; padding: 6px 8px; font: 14px/1.4 "Fixedsys", "Lucida Console", "Courier New", monospace;
  border: 0; outline: none; user-select: text; -webkit-user-select: text; color: #000; white-space: pre; overflow: auto;
}
.notepad-wrap { flex: 1; display: flex; min-height: 0; padding: 0; }

/* explorador */
.explorer-area { flex: 1; overflow: auto; padding: 8px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.explorer-area .icon { color: #000; }
.explorer-area .icon span { text-shadow: none; }
.explorer-area .icon.selected span { color: #fff; }
.address { flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 2px; }
.address > div { flex: 1; padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* caixa de mensagem */
.msgbox { padding: 14px 12px 10px; display: flex; flex-direction: column; gap: 14px; }
.msgbox .mb-row { display: flex; gap: 14px; align-items: flex-start; }
.msgbox .mb-row svg { width: 34px; height: 34px; flex: none; }
.msgbox .mb-text { padding-top: 4px; line-height: 1.5; }
.msgbox .mb-btns { display: flex; justify-content: center; gap: 8px; }
.msgbox .mb-btns .btn95 { min-width: 76px; }

/* conquistas */
.ach-list { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.ach-list li { display: flex; gap: 10px; align-items: center; padding: 6px; border-bottom: 1px dotted #999; }
.ach-list li svg { width: 26px; height: 26px; flex: none; }
.ach-list li.locked { color: #666; }
.ach-list li.locked svg { filter: grayscale(1) opacity(.45); }
.ach-list b { display: block; }
.ach-head { padding: 8px; display: flex; align-items: center; gap: 10px; }
.ach-bar { flex: 1; height: 16px; padding: 2px; }
.ach-bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #000080 0 8px, transparent 8px 10px); }

/* =========================================================
   PUNKAMP (músicas)
   ========================================================= */
.music-wrap { flex: 1; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 10px; background: var(--face); }
.punkamp { background: #232332; border: 2px solid; border-color: #4a4a62 #0b0b12 #0b0b12 #4a4a62; padding: 6px; color: #00e000; }
.pa-title { font: 8px var(--pixel); color: #ccc; letter-spacing: 2px; display: flex; justify-content: space-between; margin-bottom: 5px; }
.pa-title span { color: var(--red); }
.pa-display { background: #000; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 10px; padding: 6px 8px; }
.pa-time { font: 28px/1 var(--cam); grid-row: span 2; color: #00e000; text-shadow: 0 0 4px #00e000; }
.pa-marquee { overflow: hidden; white-space: nowrap; font: 16px/1 var(--cam); color: #00e000; }
.pa-marquee span { display: inline-block; padding-left: 100%; animation: marquee 12s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.pa-bars { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.pa-bars i { flex: 1; background: linear-gradient(0deg, #00e000, #e0e000 70%, #e00000); height: 15%; transition: height .1s; }
.pa-controls { display: flex; gap: 3px; margin-top: 6px; }
.pa-controls button { flex: 1; background: #3a3a50; border: 1px solid; border-color: #6a6a85 #111 #111 #6a6a85; color: #ddd; padding: 3px 0; cursor: pointer; font-size: 11px; }
.pa-controls button:active { border-color: #111 #6a6a85 #6a6a85 #111; }
.platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.platform { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #000; padding: 6px 8px; }
.platform .badge { width: 26px; height: 26px; display: grid; place-items: center; color: #fff; font-weight: bold; flex: none; font-size: 13px; border: 1px solid #000; }
fieldset { border: 1px solid var(--shadow); box-shadow: 1px 1px #fff, inset 1px 1px #fff; padding: 6px 10px 8px; margin: 0; }
legend { padding: 0 4px; }
.disco { margin: 0; padding-left: 18px; line-height: 1.7; }

/* =========================================================
   BASTIDORES — efeito câmera VHS
   ========================================================= */
.viewer { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--face); }
.viewer-tools { flex: none; display: flex; gap: 4px; padding: 3px; align-items: center; }
.viewer-tools span { flex: 1; text-align: center; }
.vhs { position: relative; flex: 1; min-height: 0; background: #000; overflow: hidden; margin: 0 3px 3px; }
.vhs > img, .vhs > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: contrast(1.15) saturate(1.35) sepia(.15) blur(.4px); }
.vhs .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(160deg, #2f4a3a, #6b4a2a 60%, #1e1e2a); color: #eee; font: 18px var(--cam); text-align: center; padding: 20px;
  filter: contrast(1.1) saturate(1.3) blur(.4px);
}
.vhs .ph .px-img { filter: drop-shadow(3px 3px 0 #0006); }
.vhs::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 3px);
}
.vhs::after {
  content: ""; position: absolute; inset: -50%; pointer-events: none; z-index: 2; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise .4s steps(4) infinite;
}
@keyframes noise { 0% { transform: translate(0,0); } 25% { transform: translate(-6%,4%); } 50% { transform: translate(5%,-3%); } 75% { transform: translate(-3%,-6%); } }
.vhs .osd { position: absolute; z-index: 3; font: 26px/1 var(--cam); color: #fff; text-shadow: 2px 2px 0 #000; }
.vhs .osd.tl { top: 10px; left: 14px; }
.vhs .osd.tr { top: 10px; right: 14px; }
.vhs .osd.bl { bottom: 10px; left: 14px; }
.vhs .osd.br { bottom: 10px; right: 14px; text-align: right; }
.vhs .rec::before { content: "● "; color: #ff3030; animation: blink 1s steps(2) infinite; }
.vhs .track { position: absolute; left: 0; right: 0; height: 14px; z-index: 2; background: rgba(255,255,255,.12); filter: blur(2px); animation: track 5s linear infinite; pointer-events: none; }
@keyframes track { from { top: -20px; } to { top: 110%; } }
.thumb-badge { font-size: 9px; }

/* =========================================================
   NOVIDADES — "navegador" antigo
   ========================================================= */
.browser { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.br-tools { flex: none; display: flex; gap: 2px; padding: 2px; }
.br-tools .btn95 { padding: 2px 8px; font-size: 11px; }
.br-page {
  flex: 1; overflow: auto; margin: 0 2px 2px; padding: 14px; user-select: text; -webkit-user-select: text;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ctext x='4' y='26' font-size='20' fill='%23ffffff10'%3E%E2%98%85%3C/text%3E%3C/svg%3E");
  color: #fff; font-family: "Times New Roman", serif; font-size: 15px;
}
.br-page .ticker { background: var(--red); color: #ff0; overflow: hidden; white-space: nowrap; font: bold 13px "Courier New", monospace; padding: 3px 0; margin: -14px -14px 14px; }
.br-page .ticker span { display: inline-block; padding-left: 100%; animation: marquee 16s linear infinite; }
.wordart {
  margin: 4px 0 12px; text-align: center; font: italic 900 clamp(28px, 6vw, 46px)/1 "Arial Black", Impact, sans-serif;
  background: linear-gradient(180deg, #fff200, #ff7b00 50%, #e01b24); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px #000; filter: drop-shadow(3px 3px 0 #5b00a8); transform: skewX(-8deg);
}
.countdown { border: 3px ridge #c0c0c0; background: #000080; text-align: center; padding: 10px; margin-bottom: 14px; }
.countdown .cd { font: 34px/1.1 var(--cam); color: #0f0; letter-spacing: 2px; }
.countdown b { color: #ff0; }
.construction { height: 18px; margin: 10px 0; background: repeating-linear-gradient(45deg, #ffd400 0 14px, #000 14px 28px); }
.news { list-style: none; padding: 0; margin: 0; }
.news li { border: 2px outset #888; background: #111; padding: 8px 10px; margin-bottom: 8px; }
.news .date { color: #0ff; font: 13px "Courier New", monospace; }
.news .new { background: var(--red); color: #fff; font: bold 10px Arial, sans-serif; padding: 1px 4px; margin-left: 6px; animation: blink 1s steps(2) infinite; }
.news a { color: #ff0; }
.hitcounter { text-align: center; margin-top: 14px; font-size: 13px; color: #aaa; }
.hitcounter span { font: 20px var(--cam); background: #000; color: #f00; border: 2px inset #555; padding: 0 6px; letter-spacing: 3px; }
.bestview { text-align: center; font-size: 11px; color: #777; margin-top: 6px; }

/* =========================================================
   MASCOTE
   ========================================================= */
/* sprites em pixel art (gerados de assets/pixel/gif por tools/build_sprites.py) */
.px { background-repeat: no-repeat; image-rendering: pixelated; image-rendering: crisp-edges; }
.px-img { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.flip { transform: scaleX(-1); }

.capy-stage { position: fixed; z-index: 7000; width: 230px; height: 200px; pointer-events: none; }
.capy-stage.corner { right: 12px; bottom: calc(var(--task-h) + 2px); }
.capy-sprite { position: absolute; bottom: 0; pointer-events: auto; cursor: pointer; touch-action: manipulation; }
.capy-stage.corner .capy-sprite { right: 0; }
.splash-stage .capy-sprite { left: 50%; transform: translateX(-50%); }

/* número da flexão, desenhado dentro do balão da pixel art */
.px-count {
  position: absolute; transform: translate(-50%, -50%); font-family: var(--pixel); line-height: 1; color: #000; pointer-events: none;
  animation: countpop .25s steps(3);
}
@keyframes countpop { from { transform: translate(-50%, -50%) scale(1.8); } }

.capy-bubble {
  position: absolute; bottom: 175px; right: 20px; background: #fff; border: 2px solid #000; border-radius: 10px;
  padding: 6px 10px; font: 11px/1.35 var(--font); color: #000; width: max-content; max-width: 210px; text-align: center; box-shadow: 3px 3px 0 rgba(0,0,0,.35);
  animation: pop .2s ease-out; pointer-events: none;
}
.capy-bubble::after { content: ""; position: absolute; bottom: -10px; right: 30px; border: 8px solid transparent; border-top-color: #000; border-bottom: 0; }
.splash-stage .capy-bubble { right: 50%; transform: translateX(50%); bottom: 220px; }
@keyframes pop { from { opacity: 0; scale: .5; } }
.smoke { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: rgba(220,220,220,.7); filter: blur(3px); pointer-events: none; animation: smoke 3s ease-out forwards; }
@keyframes smoke { to { transform: translate(var(--dx, 20px), -120px) scale(3); opacity: 0; } }

/* passagens pela tela */
.cross { position: fixed; z-index: 7500; left: 0; pointer-events: none; will-change: transform; }
.cross .hit { pointer-events: auto; cursor: pointer; }
.cross.skate { bottom: var(--task-h); animation: cross-r 8s linear forwards; }
.cross.skate.rev { animation-name: cross-l; }
.cross.skate.kick .jumper { animation: jump .76s ease-out; }
@keyframes jump { 45% { transform: translateY(-90px); } }
@keyframes cross-r { from { transform: translateX(-220px); } to { transform: translateX(calc(100vw + 40px)); } }
@keyframes cross-l { from { transform: translateX(calc(100vw + 40px)); } to { transform: translateX(-220px); } }

.cross.glider { top: 9%; animation: cross-l 16s linear forwards; }
.cross.glider.rev { animation-name: cross-r; }
.glider .g-inner { display: flex; flex-direction: column; align-items: center; animation: bob 1.8s ease-in-out infinite alternate; }
.glider .rider { margin-top: -8px; }
.glider.loop .g-inner { animation: loop 1.1s ease-in-out; }
@keyframes bob { from { transform: translateY(-8px) rotate(-3deg); } to { transform: translateY(10px) rotate(3deg); } }
@keyframes loop { 50% { transform: translateY(-60px) rotate(-360deg) scale(1.1); } 100% { transform: rotate(-360deg); } }

/* mosh pit (código secreto) */
.shake { animation: shake .12s linear infinite; }
@keyframes shake { 25% { transform: translate(3px, -2px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(2px, 3px); } }
.mosh { position: fixed; bottom: var(--task-h); z-index: 7600; pointer-events: none; animation: moshjump var(--d, .5s) ease-in-out infinite alternate; }
@keyframes moshjump { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(var(--h, -120px)) rotate(8deg); } }
.bigtext {
  position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 7700; pointer-events: none; text-align: center;
  font: clamp(20px, 6vw, 64px)/1.1 var(--pixel); color: #fff; text-shadow: 4px 4px 0 var(--red), 8px 8px 0 #000; animation: bigpop .4s ease-out;
}
@keyframes bigpop { from { transform: translate(-50%, -50%) scale(3); opacity: 0; } }

/* 16:20 */
#desktop.chill-mode { animation: hue 10s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }

/* glitch (modo punk) */
.glitch { animation: glitch .5s steps(3) 2; }
@keyframes glitch {
  0% { filter: none; transform: none; }
  33% { filter: invert(1) hue-rotate(90deg); transform: translateX(-8px) skewX(4deg); }
  66% { filter: saturate(5) contrast(2); transform: translateX(8px); }
  100% { filter: none; transform: none; }
}

/* =========================================================
   TOASTS / PROTETOR / DESLIGAR
   ========================================================= */
#toasts { position: absolute; right: 8px; bottom: calc(var(--task-h) + 190px); z-index: 8500; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
.toast {
  background: #ffffe1; border: 1px solid #000; padding: 8px 10px; max-width: 260px; display: flex; gap: 8px; align-items: flex-start;
  box-shadow: 2px 2px 0 rgba(0,0,0,.4); animation: toastin .25s ease-out; pointer-events: auto;
}
.toast svg { width: 24px; height: 24px; flex: none; }
.toast b { display: block; margin-bottom: 2px; }
.toast.out { animation: toastout .3s ease-in forwards; }
@keyframes toastin { from { transform: translateX(30px); opacity: 0; } }
@keyframes toastout { to { transform: translateX(30px); opacity: 0; } }

#screensaver { position: fixed; inset: 0; background: #000; z-index: 9500; cursor: none; overflow: hidden; }
#ss-capy { position: absolute; }
#ss-capy small { display: block; text-align: center; font: 10px var(--pixel); color: #fff; margin-top: 4px; }

#shutdown { position: fixed; inset: 0; z-index: 9600; background: #000; color: #ff8a00; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-family: var(--pixel); gap: 16px; cursor: pointer; padding: 20px; }
#shutdown p { font-size: clamp(11px, 2.2vw, 18px); line-height: 1.6; margin: 0; }
#shutdown small { font-family: var(--font); color: #555; }
.sd-capy { position: relative; }
.zzz { position: absolute; left: 100%; top: 0; font: 14px var(--pixel); color: #fff; white-space: nowrap; }
.zzz b, .zzz i { font-weight: normal; font-style: normal; display: inline-block; animation: zz 2s steps(4) infinite; }
.zzz b { font-size: 18px; animation-delay: .4s; } .zzz i { font-size: 24px; animation-delay: .8s; }
@keyframes zz { 0% { opacity: 0; transform: translateY(8px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }

/* =========================================================
   CELULAR
   ========================================================= */
@media (max-width: 700px) {
  #icons { flex-direction: row; right: 8px; bottom: auto; }
  .icon { width: 76px; }
  .window { resize: none; }
  #toasts { bottom: calc(var(--task-h) + 150px); }
  .task-btn span { display: none; }
  .task-btn { flex: 0 0 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .splash-grid, .vhs::after, .vhs .track, #desktop.chill-mode { animation: none; }
}
