/* ===== TEMA VISUAL WINDOWS XP (LUNA BLUE) — SINAL & RUÍDO ===== */
* { box-sizing: border-box; }

:root {
  /* Paleta Oficial do Windows XP Luna Blue */
  --xp-blue-titlebar-start: #0058ee;
  --xp-blue-titlebar-end: #3a93ff;
  --xp-titlebar-inactive-start: #7697da;
  --xp-titlebar-inactive-end: #a4c0e6;
  --xp-taskbar-start: #245edb;
  --xp-taskbar-end: #1941a5;
  --xp-start-green-start: #3c9a3c;
  --xp-start-green-end: #2d7a2d;
  --xp-start-green-hover: #48b748;
  --xp-start-green-active: #226422;
  --xp-tray-start: #0c1c5b;
  --xp-tray-end: #133a8a;
  --xp-highlight: #316ac5;
  --xp-highlight-rgb: 49, 106, 197;
  --xp-window-bg: #ece9d8;
  --xp-panel-bg: #ffffff;
  --xp-border: #0058ee;
  --xp-border-blue: var(--xp-border);
  --xp-menu-right: #d3e5fa;
  --xp-menu-right-bg: var(--xp-menu-right);
  --xp-menu-border: #0c1c5b;
  --xp-button-border: #003c74;
  --xp-close: #e04545;
  --xp-welcome-start: #5a7edc;
  --xp-welcome-end: #3a5fbf;
  --xp-text: #000000;
  --xp-text-light: #ffffff;

  /* Tipografia Padrão do Windows XP */
  --xp-font-ui: Tahoma, "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  --xp-font-title: "Trebuchet MS", Tahoma, "Segoe UI", sans-serif;
  --xp-font-mono: "Lucida Console", "Courier New", monospace;
  /* aliases internos */
  --ui: var(--xp-font-ui);
  --title-font: var(--xp-font-title);
  --term-font: var(--xp-font-mono);

  /* Filtro CRT (intensidade controlada de 0 a 1) */
  --crt: 0.5;
}

html {
  background: #000;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  font-family: var(--xp-font-ui);
  font-size: 11px;
  color: var(--xp-text);
  cursor: default;
  line-height: 1.4;
  /* Papel de Parede Bliss Autêntico */
  background: url('wallpapers/bliss.avif') center center / cover no-repeat fixed #3a6ea5;
}

/* ===== Filtro CRT (Easter Egg nostálgico) ===== */
#crt {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  box-shadow: inset 0 0 calc(160px * var(--crt)) rgba(0, 0, 0, calc(0.5 * var(--crt)));
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, calc(0.6 * var(--crt))) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, calc(0.3 * var(--crt))) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 0, 0, calc(0.07 * var(--crt))) 0 1px, rgba(0, 255, 0, calc(0.05 * var(--crt))) 1px 2px, rgba(0, 0, 255, calc(0.07 * var(--crt))) 2px 3px);
  animation: flick 0.14s steps(2) infinite;
}
#crt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 14%;
  background: linear-gradient(transparent, rgba(255, 255, 255, calc(0.07 * var(--crt))), transparent);
  animation: roll 7s linear infinite;
}
@keyframes flick { 50% { opacity: 0.96; } }
@keyframes roll { from { top: -15%; } to { top: 100%; } }

/* ===== Efeito e Tela de Desligamento do Windows XP ===== */
body.off {
  pointer-events: none;
  filter: grayscale(0.8) brightness(0.7);
  transition: filter 1s ease;
}

.dead body {
  background: #000;
}
.dead body > * {
  display: none !important;
}

#offmsg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: linear-gradient(180deg, var(--xp-welcome-start) 0%, var(--xp-welcome-end) 100%);
  color: var(--xp-text-light);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  animation: offmsg-fade 0.8s ease forwards;
}
@keyframes offmsg-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.offmsg-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.offmsg-title {
  font: bold 22px var(--xp-font-title);
  letter-spacing: 1px;
  text-shadow: 1px 2px 3px rgba(0,0,0,0.4);
}
.offmsg-text {
  font: 22px var(--xp-font-ui);
  color: #eef4ff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
html.bye #offmsg {
  display: flex !important;
}

#led {
  display: none;
}

/* ===== Tela de Boot do Windows XP Professional ===== */
#boot {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  cursor: default;
  transition: opacity 0.4s ease;
}
#boot.fade-out {
  opacity: 0;
  pointer-events: none;
}
.boot-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.boot-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.boot-progress-track {
  width: 154px;
  height: 14px;
  background: #0a0a0a;
  border: 1px solid #284489;
  border-radius: 4px;
  padding: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 4px #000;
}
.boot-progress-blocks {
  position: absolute;
  top: 2px;
  left: 0;
  display: flex;
  gap: 2px;
  animation: xp-boot-progress 2.2s linear infinite;
}
.boot-progress-blocks span {
  display: block;
  width: 10px;
  height: 8px;
  background: linear-gradient(180deg, #74beff 0%, #3a93ff 50%, #1562d4 100%);
  border-radius: 1px;
  box-shadow: 0 0 3px #3a93ff;
}
@keyframes xp-boot-progress {
  0% { transform: translateX(-40px); }
  100% { transform: translateX(154px); }
}

/* ===== Tela de Boas-Vindas do Windows XP (Welcome Screen) ===== */
#welcome {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: linear-gradient(180deg, var(--xp-welcome-start) 0%, #436bc9 50%, #2f56b0 100%);
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: opacity 0.45s ease;
}
#welcome.show {
  display: flex;
  animation: welcome-fade 0.5s ease forwards;
}
#welcome.fade-out {
  opacity: 0;
  pointer-events: none;
}
@keyframes welcome-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.welcome-box {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 8px 12px;
}
.welcome-avatar {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.85);
}
.welcome-avatar img {
  display: block;
  width: 100%;
  height: 100%;
}
.welcome-text {
  display: flex;
  flex-direction: column;
}
.welcome-title {
  font: bold italic 32px var(--xp-font-title);
  color: var(--xp-text-light);
  text-shadow: 1px 2px 4px rgba(0, 20, 60, 0.6);
}
.welcome-user {
  font: 16px var(--xp-font-ui);
  color: #e4efff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

/* ===== Barra de Rolagem Estilo Windows XP Luna ===== */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
::-webkit-scrollbar-track {
  background: #ece9d8;
  border-left: 1px solid #d4d0c8;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ffffff 0%, #c1d2ee 40%, #a4bfe8 100%);
  border: 1px solid #6b8ebf;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #ffffff 0%, #d4e2f8 40%, #b8d0f5 100%);
}
a:focus-visible, button:focus-visible {
  outline: 1px dotted #000080;
  outline-offset: 1px;
}

/* ===== Barra de Tarefas do Windows XP (30px Glossy) ===== */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, var(--xp-taskbar-start) 0%, #3a79f3 9%, var(--xp-taskbar-start) 18%, var(--xp-taskbar-end) 92%, var(--xp-taskbar-end) 100%);
  border-top: 1px solid var(--xp-menu-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  z-index: 9000;
  user-select: none;
}

/* Botão Iniciar Verde Luna XP */
.start {
  height: 30px;
  margin-top: -1px;
  padding: 0 14px 0 8px;
  background: linear-gradient(180deg, #5bb75b 0%, #388238 12%, var(--xp-start-green-start) 50%, var(--xp-start-green-end) 88%, #205c20 100%);
  border: 1px solid #1a521a;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: var(--xp-text-light);
  font: bold italic 14px var(--xp-font-title);
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 1px 0 3px rgba(0, 0, 0, 0.3);
  transition: filter 0.15s ease;
}
.start:hover {
  background: linear-gradient(180deg, #6fd26f 0%, #449a44 12%, var(--xp-start-green-hover) 50%, #358d35 88%, #276e27 100%);
}
.start.on, .start:active {
  background: linear-gradient(180deg, #1c501c 0%, var(--xp-start-green-active) 50%, #3b913b 100%);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.6);
}
.start span {
  display: inline-block;
  transform: translateY(-0.5px);
  font-family: Tahoma, Verdana, Segoe UI, sans-serif;
}

/* Botões de Janelas Ativas na Taskbar */
.tasks-container {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 0;
  height: 100%;
}
.task {
  height: 24px;
  flex: 0 1 180px;
  min-width: 0;
  background: linear-gradient(180deg, #3c81f3 0%, #286ee0 50%, #1c52bd 100%);
  border: 1px solid #143e8d;
  border-radius: 3px 3px 2px 2px;
  color: var(--xp-text-light);
  font: 11px var(--xp-font-ui);
  text-shadow: 1px 1px 1px #0e2b66;
  cursor: pointer;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  line-height: 24px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.task:hover {
  background: linear-gradient(180deg, #5394ff 0%, #3a7df0 50%, #255ecc 100%);
}
.task.on {
  background: linear-gradient(180deg, #16367c 0%, #1a4294 50%, #1f4ea8 100%);
  border-color: #0b1f47;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-weight: bold;
}

#winamp-container {
  position: fixed;
  inset: 0 0 31px 0;
  z-index: 8500;
  pointer-events: none;
}
#winamp-container > * {
  pointer-events: auto;
}
#webamp,
#webamp * {
  pointer-events: auto;
}
#webamp {
  position: fixed;
  inset: 0;
  z-index: 8501 !important;
  pointer-events: none;
}
#webamp-context-menu {
  position: relative;
  z-index: 10000 !important;
}
#webamp-context-menu .context-menu {
  z-index: 10001 !important;
  pointer-events: auto;
}
.drop-target {
  outline: 2px dashed #fff;
  outline-offset: -3px;
}
.vfs-explorer {
  min-height: 100%;
  background: #fff;
  color: #111;
  font: 12px var(--xp-font-ui);
}
.vfs-toolbar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #ece9d8;
  border-bottom: 1px solid #aaa;
}
.vfs-toolbar button, .vfs-path button {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #7f9db9;
  background: linear-gradient(#fff, #d7e5f5);
  color: #111;
  font: 11px var(--xp-font-ui);
  cursor: pointer;
}
.vfs-toolbar button:disabled {
  color: #888;
  cursor: default;
  opacity: 0.7;
}
.vfs-sort-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  white-space: nowrap;
  font-size: 11px;
}
.vfs-sort-label select {
  max-width: 132px;
  font: 11px var(--xp-font-ui);
}
.vfs-path {
  padding: 5px 7px;
  border-bottom: 1px solid #aaa;
  background: #eee;
  white-space: nowrap;
  overflow-x: auto;
}
.vfs-path button {
  min-height: 18px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: #003c74;
  text-decoration: underline;
}
.vfs-list {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 4px;
  padding: 10px;
  min-height: 240px;
  align-content: start;
  outline: 0;
}
.vfs-selection-rect {
  position: absolute;
  display: none;
  border: 1px dotted #316ac5;
  background: rgba(49, 106, 197, 0.2);
  pointer-events: none;
  z-index: 4;
}
.vfs-selection-rect.on {
  display: block;
}
.vfs-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 56px;
  padding: 6px;
  overflow-wrap: anywhere;
  border: 1px solid transparent;
  background: transparent;
  color: #111;
  text-align: left;
  cursor: pointer;
}
.vfs-entry img {
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 3px;
}
.vfs-name {
  max-width: 100%;
  text-align: center;
}
.vfs-entry:hover, .vfs-entry:focus {
  border-color: #316ac5;
  background: #dbe8ff;
}
.vfs-entry.sel {
  border-color: #316ac5;
  background: #316ac5;
  color: #fff;
}
.vfs-entry.sel .vfs-name {
  color: #fff;
}
.vfs-placeholder {
  opacity: 0.58;
}
.vfs-upload {
  padding: 16px;
  font: 11px var(--xp-font-ui);
  text-align: center;
}
.vfs-upload p {
  min-height: 16px;
  margin: 0 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vfs-upload-track {
  height: 14px;
  padding: 1px;
  border: 1px solid #808080;
  background: #fff;
  box-shadow: inset 1px 1px 0 #404040;
}
.vfs-upload-track div {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, #316ac5 0, #316ac5 8px, #5a8dd5 8px, #5a8dd5 10px);
  transition: width 120ms linear;
}
.vfs-upload [data-upload-percent] {
  display: block;
  margin-top: 8px;
  color: #333;
}
.vfs-context-menu {
  position: fixed;
  z-index: 10020;
  min-width: 130px;
  padding: 2px;
  border: 1px solid #555;
  background: #fff;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.35);
}
.vfs-context-menu button {
  display: block;
  width: 100%;
  padding: 4px 10px;
  border: 0;
  background: #fff;
  color: #111;
  text-align: left;
  font: 11px var(--xp-font-ui);
  cursor: pointer;
}
.vfs-context-menu button:hover {
  background: var(--xp-highlight);
  color: #fff;
}

/* Área de Notificação / Tray / Relógio */
.tray {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  background: linear-gradient(180deg, var(--xp-tray-start) 0%, var(--xp-tray-end) 100%);
  border-left: 1px solid var(--xp-menu-border);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.18);
  color: var(--xp-text-light);
  font: 11px var(--xp-font-ui);
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.tray-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  position: relative;
  flex-shrink: 0;
  opacity: 0.95;
}
/* Volume — alto-falante XP em CSS puro (sem arquivo de ícone) */
.tray-volume::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 4px;
  width: 5px;
  height: 8px;
  background: #cfe3ff;
  border-radius: 1px 0 0 1px;
  box-shadow: 4px -2px 0 0 #cfe3ff, 4px 2px 0 0 #cfe3ff;
}
.tray-volume::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: 2px solid #9ec4ff;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  box-sizing: border-box;
}
/* Rede — computador/link XP em CSS puro */
.tray-network::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 2px;
  width: 12px;
  height: 8px;
  background: linear-gradient(180deg, #9ed0ff, #3a7fd4);
  border: 1px solid #dff;
  border-radius: 1px;
  box-sizing: border-box;
}
.tray-network::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 3px;
  background: #8ab8ef;
  box-shadow: 0 2px 0 #6a9ad4;
}

/* ===== Menu Iniciar do Windows XP (2 Colunas Autêntico) ===== */
.startmenu.xp-startmenu {
  position: fixed;
  left: 0;
  bottom: 30px;
  width: 380px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--xp-menu-border);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 4px 14px rgba(0, 10, 50, 0.55);
  z-index: 9001;
  overflow: hidden;
  user-select: none;
}
.startmenu[hidden] {
  display: none;
}

/* Cabeçalho do Menu Iniciar */
.sm-header {
  height: 56px;
  background: linear-gradient(180deg, #1f4ca6 0%, #2d68d8 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0,0,0,0.25);
}
.sm-avatar {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  border: 2px solid #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  background: #104090;
}
.sm-avatar img {
  display: block;
  width: 100%;
  height: 100%;
}
.sm-username {
  font: bold 14px var(--title-font);
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0, 20, 60, 0.7);
}

/* Corpo com 2 Colunas */
.sm-body {
  display: flex;
  background: #ffffff;
  min-height: 290px;
  border-top: 1px solid #91b0d9;
}

/* Coluna Esquerda: Branca */
.sm-col-left {
  flex: 1.15;
  background: #ffffff;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid #d3d3d3;
}
/* Coluna Direita: Azul Claro */
.sm-col-right {
  flex: 0.95;
  background: var(--xp-menu-right-bg);
  padding: 6px;
}

.sm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sm-list li {
  position: relative;
  margin-bottom: 2px;
}
.sm-sep-left {
  border-top: 1px solid #e0e0e0;
  margin: 4px 6px;
}
.sm-sep-right {
  border-top: 1px solid #a8c4e8;
  border-bottom: 1px solid #ffffff;
  margin: 4px 4px;
}

/* Botões do Menu Iniciar */
.sm-btn {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  background: none;
  padding: 4px 6px;
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  color: #000000;
  font: 11px var(--ui);
  text-decoration: none;
  gap: 8px;
}
.sm-btn .sm-ico {
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sm-btn .sm-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sm-btn .sm-label {
  font-weight: bold;
  font-size: 11px;
}
.sm-btn .sm-desc {
  font-size: 9.5px;
  color: #777777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-btn.right-btn .sm-label {
  color: #00136b;
  font-weight: bold;
}
.sm-btn .sm-arr {
  margin-left: auto;
  font-size: 9px;
  color: #666;
}

/* Hover nos Itens do Menu Iniciar: Azul de Seleção XP */
.sm-btn:hover, .sm-btn:focus-visible {
  background: var(--xp-highlight);
  color: #ffffff !important;
}
.sm-btn:hover .sm-label, .sm-btn:hover .sm-desc, .sm-btn:hover .sm-arr {
  color: #ffffff !important;
}

/* Botão "Todos os Programas" */
.sm-all-progs {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid #dcdcdc;
}
.sm-btn-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  background: none;
  font: bold 11px var(--ui);
  color: #000;
  cursor: pointer;
  border-radius: 3px;
}
.sm-btn-all .green-arr {
  color: #2e8b2e;
  font-size: 10px;
}
.sm-btn-all:hover {
  background: var(--xp-highlight);
  color: #ffffff;
}
.sm-btn-all:hover .green-arr {
  color: #ffffff;
}

/* Submenu suspenso do Menu Iniciar */
.has-sub:hover > .sub, .has-sub:focus-within > .sub {
  display: block;
}
.startmenu .sub {
  display: none;
  position: absolute;
  left: calc(100% - 2px);
  top: -2px;
  min-width: 190px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid var(--xp-menu-border);
  border-radius: 3px;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.35);
  z-index: 9005;
}

/* Rodapé do Menu Iniciar com Fazer Logoff e Desligar */
.sm-footer {
  height: 44px;
  background: linear-gradient(180deg, #1f4ca6 0%, #2d68d8 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.sm-foot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  color: #ffffff;
  font: 11px var(--ui);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}
.sm-foot-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Área de Trabalho e Ícones (48x48) ===== */
.desk {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 30px;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}
.desk button {
  position: absolute;
  width: 82px;
  background: none;
  border: 0;
  color: #ffffff;
  font: 11px/1.2 var(--ui);
  text-align: center;
  cursor: pointer;
  padding: 2px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.desk b {
  display: block;
  margin: 0 auto 3px;
}
.desk svg, .desk img {
  display: block;
  margin: 0 auto;
}
.desk button span {
  display: inline-block;
  color: #ffffff;
  padding: 1px 3px;
  text-shadow: 1px 1px 2px #000, 0 0 3px #000;
  border-radius: 2px;
}
.desk button:focus {
  outline: 0;
}
/* Seleção estilo Windows XP: fundo azul translúcido + sombra */
.desk button:focus span, .desk button.sel span {
  background: rgba(var(--xp-highlight-rgb), 0.75);
  box-shadow: 0 0 1px var(--xp-highlight);
  text-shadow: none;
}
.desk button.sel b img, .desk button.sel b svg {
  filter: drop-shadow(0 0 4px rgba(var(--xp-highlight-rgb), 0.9)) brightness(1.15);
}
.desk button.dragging {
  opacity: 0.8;
  z-index: 3;
}
.desk button.vfs-desktop-entry {
  z-index: 2;
}

/* Retângulo de Seleção Rubber-band (XP: azul translúcido com borda de highlight) */
.desk .sel-rect {
  position: absolute;
  border: 1px solid var(--xp-highlight);
  background: rgba(var(--xp-highlight-rgb), 0.25);
  pointer-events: none;
  z-index: 5;
  display: none;
}
.desk .sel-rect.on {
  display: block;
}

/* ===== Janelas WinBox: Windows XP Luna Blue ===== */
.winbox.min {
  display: none;
}
.winbox.xp {
  background: var(--xp-border);
  border: 3px solid var(--xp-border);
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 4px 14px rgba(0, 10, 40, 0.45);
  color: var(--xp-text);
}
.xp .wb-header {
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(180deg, var(--xp-blue-titlebar-start) 0%, var(--xp-blue-titlebar-end) 10%, var(--xp-blue-titlebar-start) 50%, #0046be 100%);
  border-radius: 5px 5px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 0 4px;
}
.winbox:not(.focus) .wb-header {
  background: linear-gradient(180deg, var(--xp-titlebar-inactive-start) 0%, var(--xp-titlebar-inactive-end) 10%, var(--xp-titlebar-inactive-start) 50%, #607eb8 100%);
}
.xp .wb-title {
  font: bold 13px var(--xp-font-title);
  color: var(--xp-text-light);
  text-shadow: 1px 1px 1px #0a246a;
  padding-left: 5px;
  padding-top: 5px;
}
.winbox:not(.focus) .wb-title {
  color: #dbe7fa;
  text-shadow: none;
}
.xp .wb-drag {
  padding-left: 2px;
}
.xp .wb-body {
  left: 0;
  right: 0;
  bottom: 0;
  top: 28px !important;
  background: var(--xp-window-bg);
  font: 11px/1.35 var(--xp-font-ui);
  color: var(--xp-text);
}

/* Botões de Controle da Janela: círculos azuis / fechar vermelho */
.winbox .wb-control * {
  width: 21px;
  height: 21px;
  margin-left: 2px;
  vertical-align: middle;
  border-radius: 15%;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.45);
  cursor: pointer;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 10px 10px;
  transition: filter 0.15s ease;
}
.winbox .wb-control *:hover {
  filter: brightness(1.2);
}
.winbox .wb-min {
  background-color: #2a6ee2;
  background-image: url("icons/wb-min.svg");
  background-size: 15px;
}
.winbox .wb-max {
  background-color: #2a6ee2;
  background-image: url("icons/wb-max.svg");
  background-size: 15px;
}
.winbox .wb-close {
  background-color: var(--xp-close);
  background-image: url("icons/wb-close.svg");
  background-size: 15px;
}
.winbox .wb-close:hover {
  background-color: #ff5555;
}
.winbox .wb-full {
  display: none;
}

/* Caixas de Diálogo / Alertas do XP */
.am {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 14px 8px;
  font: 11px/1.4 var(--ui);
}
.am b {
  display: flex;
  align-items: center;
  justify-content: center;
}
.am p {
  margin: 0 0 6px;
}
.am label {
  display: block;
  margin: 3px 0;
}
.ok {
  text-align: center;
  padding: 8px 10px 12px;
}

/* Botões Padrão do Windows XP (Arredondados com degradê sutil) */
.xpb {
  min-width: 76px;
  height: 24px;
  margin: 0 4px;
  background: linear-gradient(180deg, #ffffff 0%, var(--xp-window-bg) 100%);
  border: 1px solid var(--xp-button-border);
  border-radius: 3px;
  color: var(--xp-text);
  font: 11px var(--xp-font-ui);
  cursor: pointer;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 #fff;
  transition: all 0.15s ease;
}
.xpb:hover {
  background: linear-gradient(180deg, #f0f7ff 0%, #cfe5ff 100%);
  border-color: var(--xp-highlight);
  box-shadow: 0 0 2px var(--xp-highlight);
}
.xpb:active {
  background: linear-gradient(180deg, #b8d6f5 0%, #dbeaff 100%);
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Diálogo Customizado de Desligar do Windows XP */
.xp-shut-dialog {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #003399;
}
.xp-shut-banner {
  background: linear-gradient(180deg, #002277 0%, #003399 100%);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #5a7edc;
}
.xp-shut-title {
  font: bold 16px var(--title-font);
}
.xp-shut-title span {
  color: #ff7f32;
  font-style: italic;
}
.xp-shut-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 24px 10px;
  background: linear-gradient(180deg, #5a7edc 0%, #3a5fbf 100%);
  flex: 1;
}
.xp-shut-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font: 11px var(--ui);
  cursor: pointer;
}
.xp-round-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.xp-round-btn:hover {
  transform: scale(1.08);
  filter: brightness(1.2);
}
.xp-round-btn.standby {
  background-color: #e6a800;
  background-image: radial-gradient(circle at 35% 30%, #fff799, #e6a800 60%, #996e00);
}
.xp-round-btn.off {
  background-color: #d62222;
  background-image: radial-gradient(circle at 35% 30%, #ff8888, #d62222 60%, #800a0a);
}
.xp-round-btn.restart {
  background-color: #2ea82e;
  background-image: radial-gradient(circle at 35% 30%, #a2f2a2, #2ea82e 60%, #116011);
}
.xp-shut-foot {
  background: linear-gradient(180deg, #3a5fbf 0%, #204099 100%);
  padding: 8px 12px;
  text-align: right;
  border-top: 1px solid #5a7edc;
}

/* Caixa CRT */
.cp {
  padding: 12px;
  font: 11px var(--ui);
}
.cp fieldset {
  border: 1px solid #7f9db9;
  border-radius: 3px;
  background: #fff;
  margin: 0 0 12px;
  padding: 8px 10px;
}
.cp input {
  width: 100%;
  accent-color: var(--xp-blue-titlebar-start);
}
.cpv {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-top: 4px;
}

/* Caixa Executar */
.run-in {
  flex: 1;
  min-width: 0;
  font: 11px var(--ui);
  background: #fff;
  border: 1px solid #7f9db9;
  padding: 3px 6px;
  color: #000;
  border-radius: 2px;
}

/* Terminal / Prompt de Comando do Windows XP */
.terminal {
  background: #0c0c0c;
  color: #cccccc;
  font: 12px/1.4 var(--term-font);
  padding: 10px 12px;
  min-height: 100%;
  cursor: pointer;
}
.t-cmd { color: #ffffff; }
.t-warn { color: #ff5555; }
.t-dim { color: #00aa00; }
.t-prompt { color: #ffff55; font-weight: bold; }
.cursor {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: #cccccc;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

/* ===== Conteúdo Editorial do Blog ("Sinal & Ruído") ===== */
.container {
  background: var(--xp-panel-bg);
  min-height: 100%;
  font: 13px/1.5 var(--xp-font-ui);
}

.header {
  background: linear-gradient(180deg, #0044bb 0%, #002277 100%);
  color: #ffffff;
  text-align: center;
  padding: 14px 8px;
  border-bottom: 2px solid #001a55;
}
.header h1 {
  font: bold 28px var(--term-font);
  letter-spacing: 2px;
  margin: 4px 0;
  color: #ffffff;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .header h1 {
    background: linear-gradient(90deg, #7df9ff, #ffffff, #7fff7f, #ffff99, #7df9ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.7));
  }
}
@keyframes shine { to { background-position: 200% center; } }
.subtitle {
  font-size: 13px;
  font-style: italic;
  margin-bottom: 6px;
  color: #e4efff;
}
.sparkline {
  font: 12px var(--term-font);
  color: #0f0;
  letter-spacing: 1px;
}
.hi {
  font: 11px var(--term-font);
  color: #b0c8ea;
}

.marquee-container {
  background: #fff8bb;
  color: #002277;
  font: bold 12px var(--term-font);
  padding: 4px 0;
  border-top: 1px solid #d4c880;
  border-bottom: 1px solid #d4c880;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-container marquee {
  display: block;
}

.navbar {
  background: linear-gradient(180deg, #ece9d8 0%, #d8d4c4 100%);
  padding: 4px 8px;
  border-bottom: 1px solid #a8a494;
  text-align: center;
}
.navbar a {
  display: inline-block;
  background: linear-gradient(180deg, #ffffff 0%, #ece9d8 100%);
  color: #002277;
  text-decoration: none;
  font-weight: bold;
  font-size: 11.5px;
  padding: 3px 12px;
  margin: 2px 3px;
  cursor: pointer;
  border: 1px solid #9aa4b4;
  border-radius: 3px;
}
.navbar a:hover {
  background: linear-gradient(180deg, #f0f7ff 0%, #cfe5ff 100%);
  border-color: #316ac5;
  color: #000;
}

.main-content {
  display: table;
  width: 100%;
  border-collapse: collapse;
}
.sidebar {
  display: table-cell;
  width: 190px;
  background: #f4f3ec;
  padding: 10px 8px;
  vertical-align: top;
  border-right: 1px solid #dcd8cc;
  font-size: 11px;
}
.posts-area {
  display: table-cell;
  padding: 14px 18px;
  vertical-align: top;
  background-color: #ffffff;
}

/* Posts */
.post {
  border: 1px solid #b4c6e0;
  border-radius: 4px;
  background: #ffffff;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 1px 2px 6px rgba(0, 20, 60, 0.08);
}
.post.featured {
  border: 2px solid #316ac5;
  background: #fbfdff;
  box-shadow: 2px 4px 10px rgba(49, 106, 197, 0.15);
}
.featured-tag {
  display: inline-block;
  background: #316ac5;
  color: #ffffff;
  font: bold 10px var(--term-font);
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 4px;
  letter-spacing: 1px;
}
.post-date {
  font: 11px var(--term-font);
  color: #555;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.post h2 {
  font: bold 17px var(--title-font);
  color: #003399;
  margin: 5px 0 8px;
}
.post h2 a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.post h2 a:hover, .read-more:hover {
  color: #d62222;
}
.post p {
  font-size: 12.5px;
  margin: 8px 0;
  text-align: justify;
  color: #222;
}
.post code {
  font: 11.5px var(--term-font);
  background: #f0f4fa;
  border: 1px solid #c0d0e6;
  border-radius: 2px;
  padding: 1px 4px;
  color: #800000;
}
.read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  color: #003399;
  text-decoration: underline;
  cursor: pointer;
  font-weight: bold;
}
.cat-chip {
  display: inline-block;
  font: bold 10px var(--term-font);
  color: #ffffff;
  padding: 1px 7px;
  border-radius: 2px;
  letter-spacing: 1px;
}

/* Widgets dos Artigos */
.df-table {
  border-collapse: collapse;
  width: 100%;
  font: 11px var(--term-font);
  margin: 8px 0 2px;
}
.df-table th {
  background: #245edb;
  color: #fff;
  padding: 5px 8px;
  text-align: left;
  border: 1px solid #fff;
}
.df-table td {
  border: 1px solid #d0d8e8;
  padding: 4px 8px;
  background: #fff;
}
.df-table tr:nth-child(even) td {
  background: #f0f6ff;
}
.df-table td:first-child {
  background: #111;
  color: #0f0;
  font-weight: bold;
  text-align: right;
}
.df-caption {
  font: italic 10px var(--term-font);
  color: #555;
  margin: 2px 0 8px;
}
.chart {
  border: 1px solid #a8c0e2;
  border-radius: 4px;
  background: #f9fbfd;
  padding: 10px;
  margin: 8px 0;
}
.acc-bar {
  display: flex;
  align-items: center;
  font: 11px var(--term-font);
  margin: 5px 0;
}
.acc-bar .label {
  width: 145px;
  flex-shrink: 0;
}
.acc-bar .pct {
  width: 38px;
  text-align: right;
}
.acc-track {
  flex: 1;
  background: #fff;
  border: 1px solid #9aa4b4;
  height: 14px;
  padding: 1px;
  border-radius: 2px;
}
.acc-fill {
  height: 100%;
  border-radius: 1px;
}
.good { background: #245edb; }
.bad { background: #b81c1c; }
.alert {
  font: 10px var(--term-font);
  color: #800000;
  margin-top: 4px;
}

/* Barra de Progresso estilo Windows XP */
.progress-xp {
  background: var(--xp-panel-bg);
  border: 1px solid #7f9db9;
  border-radius: 3px;
  height: 18px;
  padding: 2px;
}
.progress-fill {
  height: 100%;
  width: 80%;
  background: repeating-linear-gradient(90deg, #245edb 0, #245edb 8px, #3a93ff 8px, #3a93ff 10px);
  border-radius: 2px;
}
.progress-label {
  font: 11px var(--term-font);
  margin-top: 4px;
}
.panel-box {
  border: 1px solid #b8cce6;
  border-radius: 4px;
  background: #f0f6ff;
  padding: 8px;
  margin: 10px 0;
}

/* Paginação */
.pg {
  background: linear-gradient(180deg, #ffffff 0%, #ece9d8 100%);
  color: #000;
  font: bold 12px var(--ui);
  padding: 3px 12px;
  margin: 0 3px;
  cursor: pointer;
  border: 1px solid #7f9db9;
  border-radius: 3px;
}
.pg.on {
  background: #245edb;
  color: #fff;
  border-color: #0c1c5b;
}
.pg:disabled {
  color: #888;
  cursor: default;
  opacity: 0.6;
}
.pager {
  text-align: center;
  margin: 14px 0 8px;
}

/* Sidebar */
.sidebar h3 {
  font: bold 12px var(--title-font);
  color: #002277;
  background: linear-gradient(180deg, #d3e5fa 0%, #b8d4f8 100%);
  padding: 4px 6px;
  margin: 12px 0 6px;
  text-align: center;
  letter-spacing: 0.5px;
  border: 1px solid #a8c4e8;
  border-radius: 3px;
}
.sidebar h3:first-child {
  margin-top: 0;
}
.sidebar ul {
  list-style: square;
  padding-left: 18px;
  margin: 4px 0;
  font-size: 11.5px;
}
.sidebar li {
  margin-bottom: 3px;
  color: #003399;
}
.sidebar a {
  color: #003399;
  text-decoration: underline;
  cursor: pointer;
}
.sidebar a:hover {
  color: #d62222;
}
.counter, .sys-monitor {
  background: #0c0c0c;
  color: #00ff66;
  font: 11px var(--term-font);
  padding: 5px;
  border: 1px solid #555;
  border-radius: 3px;
  margin-top: 6px;
  text-align: center;
}
.sys-monitor {
  font-size: 10px;
  padding: 6px;
  text-align: left;
}
.mini-track {
  background: #222;
  height: 8px;
  margin: 4px 0;
  border: 1px solid #444;
  border-radius: 2px;
}
.mini-fill {
  height: 100%;
  background: #00ff66;
  width: 10%;
  border-radius: 1px;
}
.construction {
  display: inline-block;
  background: #fff8bb;
  border: 1px dashed #997700;
  border-radius: 3px;
  font: bold 11px var(--term-font);
  color: #664400;
  padding: 3px 8px;
  margin: 5px;
  animation: blink 0.9s step-end infinite;
}
.best {
  text-align: center;
  margin-top: 8px;
  font-size: 10px;
  color: #666;
}
hr {
  border: 0;
  border-top: 1px dashed #b8cce6;
  margin: 10px 0;
}
.back-top {
  text-align: center;
  margin: 12px 0 6px;
  font-size: 11.5px;
}
.back-top a {
  color: #003399;
  font-weight: bold;
}
.new-badge {
  color: red;
  font-weight: bold;
  font-size: 10px;
  vertical-align: super;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Rodapé */
.footer {
  background: #ece9d8;
  border-top: 1px solid #c0bcb0;
  padding: 10px;
  text-align: center;
  font: 11px var(--term-font);
  color: #444;
}
.footer p {
  margin: 4px 0;
}
.badge {
  display: inline-block;
  border: 1px solid #b8c4d4;
  border-radius: 3px;
  padding: 2px 6px;
  margin: 2px;
  background: #ffffff;
  font-size: 10px;
}
.b88 {
  display: inline-block;
  width: 88px;
  height: 31px;
  line-height: 31px;
  font: bold 9px var(--term-font);
  color: #fff;
  margin: 3px 2px;
  border: 1px solid #000;
  border-radius: 2px;
  vertical-align: middle;
}
.b88:nth-child(1) { background: linear-gradient(180deg, #306998, #1a3c5a); }
.b88:nth-child(2) { background: linear-gradient(180deg, #00758f, #003d4d); }
.b88:nth-child(3) { background: linear-gradient(180deg, #800080, #4b0082); }
.b88:nth-child(4) { background: linear-gradient(180deg, #808000, #4b4b00); }

/* Barra de Status do Internet Explorer / Windows XP */
.statusbar {
  position: sticky;
  bottom: 0;
  background: #ece9d8;
  border-top: 1px solid #d4d0c8;
  padding: 2px 6px;
  display: flex;
  gap: 4px;
  font: 11px var(--ui);
  color: #000;
}
.statusbar div {
  border: 1px solid #7f9db9;
  border-radius: 2px;
  background: #ffffff;
  padding: 1px 6px;
}
.statusbar .grow {
  flex: 1;
}

/* Suporte a ícones inline genéricos */
.ico {
  display: inline-block;
  vertical-align: middle;
}
.start img {
  display: inline-block;
  vertical-align: middle;
}

@media (max-width: 820px) {
  .main-content, .sidebar, .posts-area {
    display: block;
    width: 100%;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #dcd8cc;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header h1, .construction, .new-badge, .cursor, #crt, #crt::after, .boot-progress-blocks {
    animation: none;
  }
  body.off {
    animation: none;
    opacity: 0;
  }
  #boot, #welcome {
    display: none !important;
  }
}
