/* ================================================
   WINXP.CSS — Página estilo Windows XP
   ================================================ */
   


@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --xp-blue:      #0a246a;
  --xp-blue-lt:   #3169c6;
  --xp-blue-title:#1c56b8;
  --xp-grey:      #ece9d8;
  --xp-border-lt: #ffffff;
  --xp-border-dk: #a0a0a0;
  --xp-border-dk2:#404040;
  --xp-green:     #3a6e28;
  --xp-btn:       #ece9d8;
  --text:         #000000;
  --font-ui:      'Tahoma', 'MS Sans Serif', sans-serif;
  --font-px:      'Press Start 2P', monospace;
}

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

html, body {
  width: 100%; min-height: 100vh;
  overflow: hidden;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text);
  user-select: none;
}

/* ── DESKTOP BLISS ── */
#desktop {
  width: 100vw;
  height: 100vh;
  /*
    FUNDO: A imagem do Windows XP (Bliss) que você enviou.
  */
  background-image: url('https://wallpapercave.com/wp/85Cy3KP.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

/* ════════════════════════════════
   JANELAS ARRASTÁVEIS
════════════════════════════════ */
.win-window {
  position: absolute;
  background: var(--xp-grey);
  border-top: 1px solid var(--xp-border-lt);
  border-left: 1px solid var(--xp-border-lt);
  border-right: 1px solid var(--xp-border-dk2);
  border-bottom: 1px solid var(--xp-border-dk2);
  box-shadow: 3px 3px 8px rgba(0,0,0,0.4);
  min-width: 200px;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.win-window.active { z-index: 100; }
.win-window.minimized { display: none !important; }

/* ── TITLEBAR ── */
.win-titlebar {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 5px;
  cursor: move;
  border-radius: 0;
  flex-shrink: 0;
}

.xp-blue {
  background: linear-gradient(180deg,
    #1666c7 0%, #1457b5 8%, #0d47a1 40%,
    #0a3d91 50%, #1457b5 75%, #1666c7 100%);
}

.win-icon { width: 16px; height: 16px; image-rendering: pixelated; }
.win-title-text { flex: 1; color: #fff; font-size: 11px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── BOTÕES DA JANELA ── */
.win-controls { display: flex; gap: 2px; }

.wbtn {
  width: 21px; height: 21px;
  background: linear-gradient(180deg, #d4e4f7 0%, #b0c8e8 100%);
  border: 1px solid #7a9fd4;
  border-radius: 3px;
  font-size: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #000;
  font-weight: bold;
  transition: all 0.1s;
}

.wbtn:hover { background: linear-gradient(180deg, #e4f0ff 0%, #c4d8f0 100%); }
.wbtn:active { background: linear-gradient(180deg, #b0c8e8 0%, #d4e4f7 100%); }

.wbtn.xp-close {
  background: linear-gradient(180deg, #e46060 0%, #c02020 100%);
  border-color: #a01010;
  color: #fff;
}
.wbtn.xp-close:hover { background: linear-gradient(180deg, #f07070 0%, #d03030 100%); }

/* ── MENUBAR ── */
.win-menubar {
  background: var(--xp-grey);
  height: 18px;
  display: flex;
  align-items: center;
  padding: 0 2px;
  border-bottom: 1px solid var(--xp-border-dk);
  flex-shrink: 0;
}

.mitem { padding: 1px 6px; cursor: pointer; border-radius: 2px; font-size: 11px; }
.mitem:hover { background: var(--xp-blue-lt); color: #fff; }

/* ── WIN BODY ── */
.win-body { padding: 6px; overflow: auto; }

/* ════════════════════════════════
   PAINT
════════════════════════════════ */
.paint-layout { display: flex; flex: 1; overflow: hidden; }

.paint-toolbar {
  width: 56px;
  background: var(--xp-grey);
  border-right: 1px solid var(--xp-border-dk);
  display: flex;
  flex-direction: column;
  padding: 2px;
  gap: 4px;
  flex-shrink: 0;
}

.paint-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
}

.ptool {
  width: 24px; height: 24px;
  background: var(--xp-grey);
  border: 1px solid transparent;
  font-size: 11px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0;
}
.ptool:hover  { border: 1px solid #aaa; background: #d4d0c8; }
.ptool.active { border: 1px solid #888; background: #b8c8d8; box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2); }

.paint-colors { padding: 4px 2px; }

.color-preview { position: relative; width: 32px; height: 24px; margin-bottom: 4px; }
.color-bg { position: absolute; width: 20px; height: 16px; right: 0; bottom: 0; border: 1px solid #888; }
.color-fg { position: absolute; width: 20px; height: 16px; left: 0; top: 0; border: 1px solid #888; z-index: 1; }

.color-palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; }
.color-swatch { width: 12px; height: 12px; border: 1px solid #888; cursor: pointer; }
.color-swatch:hover { border-color: #000; transform: scale(1.2); }

.paint-canvas-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.paint-canvas-scroll {
  flex: 1;
  background: #808080;
  overflow: auto;
  padding: 4px;
}

.paint-canvas {
  background: #ffffff;
  min-width: 300px;
  min-height: 220px;
  cursor: crosshair;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  padding: 8px;
}

.paint-placeholder {
  color: #aaa;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  margin: auto;
}

.paint-drawing {
  max-width: 100%;
  image-rendering: pixelated;
  border: 1px solid #ddd;
}

.paint-statusbar {
  height: 18px;
  background: var(--xp-grey);
  border-top: 1px solid var(--xp-border-dk);
  display: flex;
  align-items: center;
  padding: 0 6px;
  gap: 8px;
  font-size: 10px;
  color: #555;
  flex-shrink: 0;
}
.paint-sep { color: #aaa; }

/* ════════════════════════════════
   SONIC ASCII
════════════════════════════════ */
.sonic-body { padding: 0; background: #fff; overflow: auto; max-height: 280px; }

.sonic-ascii {
  font-family: 'Courier New', monospace;
  font-size: 7px;
  line-height: 1.2;
  color: #000;
  white-space: pre;
  padding: 8px;
  background: #fff;
}

/* ════════════════════════════════
   CLIPPY
════════════════════════════════ */
.clippy-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: var(--xp-grey);
}

.clippy-bubble {
  background: #fffde7;
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.5;
  position: relative;
  width: 100%;
}

.clippy-bubble-arrow {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #bbb;
}

.clippy-bubble-arrow::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #fffde7;
}

.clippy-img-wrap { width: 80px; height: 80px; margin-top: 6px; }
.clippy-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.clippy-fallback { font-size: 48px; text-align: center; }

.clippy-btns { display: flex; gap: 6px; }
.clippy-btn {
  padding: 3px 14px;
  background: var(--xp-btn);
  border: 1px solid #888;
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.clippy-btn:hover { background: #d4e4f7; }
.clippy-btn:active { background: #b0c8e8; }

/* ════════════════════════════════
   MINESWEEPER
════════════════════════════════ */
.minesweeper-body { padding: 6px; background: var(--xp-grey); }

.ms-header {
  background: var(--xp-grey);
  border: 2px inset #888;
  padding: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.ms-display {
  background: #000;
  color: #f00;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: bold;
  padding: 2px 4px;
  min-width: 40px;
  text-align: right;
  border: 1px inset #888;
}

.ms-face {
  font-size: 20px;
  width: 32px; height: 28px;
  background: var(--xp-btn);
  border-top: 2px solid var(--xp-border-lt);
  border-left: 2px solid var(--xp-border-lt);
  border-right: 2px solid var(--xp-border-dk2);
  border-bottom: 2px solid var(--xp-border-dk2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ms-face:active { border-top-color: var(--xp-border-dk2); border-left-color: var(--xp-border-dk2); border-right-color: var(--xp-border-lt); border-bottom-color: var(--xp-border-lt); }

.ms-grid {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 0;
  border: 2px inset #888;
  background: var(--xp-grey);
  width: fit-content;
}

.ms-cell {
  width: 16px; height: 16px;
  background: var(--xp-btn);
  border-top: 2px solid var(--xp-border-lt);
  border-left: 2px solid var(--xp-border-lt);
  border-right: 2px solid var(--xp-border-dk2);
  border-bottom: 2px solid var(--xp-border-dk2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  font-weight: bold;
}

.ms-cell:hover { background: #d0ccbc; }

.ms-cell.revealed {
  background: #000;
  border: 1px solid #888;
  cursor: pointer;
}

.ms-cell.mine-hit { background: #f00; }

/* Cores dos números */
.ms-cell[data-n="1"] { color: #0000ff; }
.ms-cell[data-n="2"] { color: #008000; }
.ms-cell[data-n="3"] { color: #ff0000; }
.ms-cell[data-n="4"] { color: #000080; }
.ms-cell[data-n="5"] { color: #800000; }
.ms-cell[data-n="6"] { color: #008080; }
.ms-cell[data-n="7"] { color: #000000; }
.ms-cell[data-n="8"] { color: #808080; }

/* ════════════════════════════════
   WINAMP
════════════════════════════════ */
.winamp-bar {
  background: linear-gradient(180deg, #1a1a1a 0%, #333 100%);
  cursor: move;
}

.winamp-logo {
  flex: 1;
  color: #aaa;
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.winamp-body { background: #2a2a2a; padding: 6px; display: flex; flex-direction: column; gap: 4px; }

.winamp-display { display: flex; gap: 6px; background: #000; padding: 6px; }

.winamp-vis { display: flex; gap: 4px; }
.winamp-vis-left { display: flex; flex-direction: column; font-size: 8px; color: #336699; font-weight: bold; justify-content: space-around; }
.winamp-vis-screen { width: 80px; height: 50px; background: #000; border: 1px solid #1a1a3a; position: relative; overflow: hidden; }

.winamp-time { font-family: 'Courier New', monospace; font-size: 22px; color: #5577ff; font-weight: bold; text-align: center; padding-top: 8px; }

.winamp-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }

.winamp-track {
  color: #aaaaff;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: marquee-track 12s linear infinite;
}
@keyframes marquee-track { 0%{transform:translateX(0)} 50%{transform:translateX(-30%)} 100%{transform:translateX(0)} }

.winamp-meta { display: flex; gap: 6px; font-size: 8px; color: #666; }

.winamp-bars { display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.winamp-bar-wrap { flex: 1; height: 8px; background: #111; border: 1px solid #333; }
.winamp-bar-fill { height: 100%; background: #4455bb; }
.winamp-eq { font-size: 9px; color: #888; cursor: pointer; padding: 1px 4px; background: #111; border: 1px solid #333; }
.winamp-eq:hover { color: #aaa; }

.winamp-progress-wrap { padding: 0 2px; }
.winamp-progress { height: 10px; background: #111; border: 1px solid #333; position: relative; cursor: pointer; }
.winamp-progress-fill { height: 100%; background: linear-gradient(90deg, #3344aa, #5566cc); }
.winamp-progress-thumb { position: absolute; top: 0; width: 4px; height: 100%; background: #8899ee; transform: translateX(-50%); }

.winamp-controls { display: flex; gap: 3px; align-items: center; }
.wamp-btn {
  background: #333;
  border-top: 1px solid #555;
  border-left: 1px solid #555;
  border-right: 1px solid #111;
  border-bottom: 1px solid #111;
  color: #aaa;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  font-family: var(--font-ui);
}
.wamp-btn:hover { background: #444; color: #fff; }
.wamp-btn:active { border-top-color: #111; border-left-color: #111; border-right-color: #555; border-bottom-color: #555; }
.wamp-btn.play { color: #66ff66; }
.wamp-btn.eject { margin-left: auto; }
.wamp-btn.text-btn { font-size: 9px; padding: 3px 6px; }

/* ════════════════════════════════
   POPUP DE AVISO
════════════════════════════════ */
.popup-body { padding: 14px; background: var(--xp-grey); }
.popup-content { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.popup-icon { font-size: 32px; flex-shrink: 0; }
.popup-text { font-size: 12px; line-height: 1.6; color: var(--text); padding-top: 6px; }
.popup-btns { display: flex; justify-content: center; }
.popup-ok {
  padding: 4px 30px;
  background: var(--xp-btn);
  border-top: 2px solid var(--xp-border-lt);
  border-left: 2px solid var(--xp-border-lt);
  border-right: 2px solid var(--xp-border-dk2);
  border-bottom: 2px solid var(--xp-border-dk2);
  font-family: var(--font-ui);
  font-size: 11px;
  cursor: pointer;
}
.popup-ok:hover { background: #d4e4f7; }
.popup-ok:active { border-top-color: var(--xp-border-dk2); border-left-color: var(--xp-border-dk2); }

/* ════════════════════════════════
   TASKBAR
════════════════════════════════ */
#taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(180deg, #245edc 0%, #1345c0 4%, #2369e0 6%, #1c5bce 50%, #1a56c4 94%, #1a4fc0 100%);
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 4px;
  z-index: 9999;
}

#start-btn {
  height: 24px;
  padding: 0 10px 0 6px;
  background: linear-gradient(180deg, #5cb85c 0%, #3a9c3a 40%, #2e8b2e 100%);
  border: 1px solid #1a5c1a;
  border-radius: 0 10px 10px 0;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.4);
  box-shadow: 0 0 8px rgba(0,200,0,0.3);
}
#start-btn:hover { background: linear-gradient(180deg, #6ec86e 0%, #4aac4a 40%, #3e9b3e 100%); }

.task-sep { width: 1px; height: 20px; background: rgba(255,255,255,0.2); margin: 0 2px; }

#taskbar-items { display: flex; gap: 2px; flex: 1; overflow: hidden; }

.taskbar-item {
  height: 22px;
  padding: 0 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.taskbar-item:hover { background: rgba(255,255,255,0.25); }
.taskbar-item.active { background: rgba(0,0,0,0.25); border-color: rgba(0,0,0,0.3); }

#taskbar-clock {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2px 8px;
  color: #fff;
  font-size: 11px;
  height: 22px;
  display: flex; align-items: center;
  flex-shrink: 0;
}

/* ════════════════════════════════
   PAINT — IMAGEM REAL
════════════════════════════════ */
.paint-window-real .win-titlebar { width: 100%; }

.paint-real-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}

.paint-bg-img {
  width: 100%;
  display: block;
  image-rendering: auto;
}

/* Canvas clicável posicionado sobre a área branca da imagem do Paint */
.paint-canvas-real {
  position: absolute;
  /* Ajuste estes valores conforme a proporção da sua imagem do Paint */
  top: 12%;
  left: 19%;
  width: 76%;
  height: 73%;
  background: #fff;
  overflow-y: auto;
  cursor: crosshair;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 6px;
}

.paint-canvas-real .paint-placeholder {
  color: #bbb;
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
  margin: auto;
}

.paint-canvas-real .paint-drawing {
  max-width: 90%;
  image-rendering: pixelated;
  border: 1px solid #ddd;
}

/* ════════════════════════════════
   WINAMP — IMAGEM REAL
════════════════════════════════ */
.winamp-window-real .winamp-bar {
  background: linear-gradient(180deg, #1a1a1a 0%, #333 100%);
}

.winamp-real-wrap {
  position: relative;
  width: 100%;
  line-height: 0;
}

.winamp-bg-img {
  width: 100%;
  display: block;
}

/* Tempo sobreposto na tela preta */
.winamp-real-time {
  position: absolute;
  top: 9%;
  left: 9%;
  font-family: 'Courier New', monospace;
  font-size: clamp(10px, 3vw, 22px);
  color: #5577ff;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(85,119,255,0.6);
}

/* Nome da música sobreposto */
.winamp-real-track {
  position: absolute;
  top: 22%;
  left: 38%;
  width: 58%;
  font-size: clamp(7px, 1.8vw, 11px);
  color: #d0d0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Tahoma', sans-serif;
}

/* Botão play invisível sobre o ▶ da imagem */
.winamp-real-play {
  position: absolute;
  bottom: 17%;
  left: 16.5%;
  width: 9%;
  height: 11%;
  background: transparent;
  border: none;
  cursor: pointer;
}
.winamp-real-play:hover { background: rgba(255,255,255,0.1); }

/* Barra de progresso sobreposta */
.winamp-real-progress {
  position: absolute;
  bottom: 28%;
  left: 6%;
  width: 88%;
  height: 6%;
  background: transparent;
  cursor: pointer;
}

.winamp-real-progress-fill {
  height: 100%;
  width: 35%;
  background: rgba(85,119,255,0.5);
  pointer-events: none;
}
