/* EL SISTEMA: base, escritorio, ventanas, iconos y el shell del 98 */

/* ═══════════════════════════════════════════════════════════════════════════
   Base (antes main.css)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --cursor-default: url('../assets/cursors/default.png') 10 10;
  --cursor-pointer: url('../assets/cursors/click.png') 10 9;
  --cursor-help: url('../assets/cursors/waiting.png') 16 16;
  --cursor-text: url('../assets/cursors/default.png') 1 1;
  --cursor-not-allowed: url('../assets/cursors/block.png') 16 16;
  --cursor-ns-resize: url('../assets/cursors/resize-updown.png') 16 16;
  --cursor-ew-resize: url('../assets/cursors/resize-leftright.png') 16 16;
  --cursor-nesw-resize: url('../assets/cursors/resize-rightdown.png') 16 16;
  --cursor-nwse-resize: url('../assets/cursors/resize-leftup.png') 16 16;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'MS Sans Serif', 'Microsoft Sans Serif', 'Segoe UI', Tahoma, sans-serif;
  font-size: 12px;
  color: #000;
  user-select: none;
  -webkit-user-select: none;
  cursor: var(--cursor-default), default;
}

body.loading #game,
body.loading #game * {
  cursor: var(--cursor-help), help !important;
}

#game {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: var(--cursor-pointer), pointer;
  border: none;
  outline: none;
  background: none;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Escritorio (antes desktop.css)
   ═══════════════════════════════════════════════════════════════════════════ */



.boot-bar-container {
  width: 280px;
  height: 18px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.boot-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #5a0000, #BA0000);
  transition: width 0.15s linear;
  box-shadow: 0 0 8px rgba(186, 0, 0, 0.4);
}

.title-menu {
  position: absolute;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  z-index: 100000;
  opacity: 0;
  animation: boot-in 1.2s ease forwards;
  gap: clamp(6px, 1.2vh, 14px);
  padding: clamp(10px, 1.8vh, 20px);
  overflow: hidden;
}

.title-menu-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.1vh, 12px);
}

.title-menu-footer {
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding-bottom: clamp(8px, 1.4vh, 14px);
}

.title-menu,
.title-menu * {
  cursor: auto !important;
}

.title-menu button {
  cursor: pointer !important;
}

.title-menu input[type='range'] {
  cursor: pointer !important;
}

.menu-logo {
  width: min(60vw, 560px);
  max-width: 88vw;
  max-height: 30vh;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 34px rgba(186, 0, 0, 0.5));
  margin-bottom: clamp(2px, 0.5vh, 8px);
}

.title-menu-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 1.4vh, 16px);
  width: min(90vw, 560px);
}

.title-menu-subactions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vh, 16px);
  width: min(90vw, 560px);
}

.title-menu-subactions > :only-child {
  grid-column: 1 / -1;
}

.title-credit {
  color: #ffffff;
  font-family: 'Courier New', monospace;
  font-size: clamp(10px, 1.2vh, 12px);
  letter-spacing: clamp(1px, 0.2vw, 2px);
  text-transform: uppercase;
  margin: 0;
}

.title-copyright {
  color: #777;
  font-family: 'Courier New', monospace;
  font-size: clamp(9px, 1.05vh, 10px);
  letter-spacing: 1px;
  text-align: center;
  margin: 0;
}

.title-btn {
  margin-top: 20px;
  padding: 12px 48px;
  font-family: 'Courier New', monospace;
  font-size: clamp(18px, 2.6vh, 28px);
  font-weight: bold;
  color: #ff3333;
  background: rgba(10, 0, 0, 0.6);
  border: 1px solid #BA0000;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: clamp(12px, 1.8vh, 18px) clamp(18px, 2.6vw, 30px);
  width: 100%;
  max-width: 560px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(186, 0, 0, 0.15);
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.4);
}

.title-btn:hover {
  background: rgba(186, 0, 0, 0.12);
  box-shadow: 0 0 20px rgba(186, 0, 0, 0.3);
}

.title-btn:active {
  background: rgba(255, 0, 0, 0.3);
  transform: scale(0.98);
}

.title-btn--secondary {
  border-color: #444;
  color: #999;
  background: transparent;
  font-size: clamp(15px, 1.9vh, 20px);
  padding: clamp(10px, 1.4vh, 14px) clamp(12px, 1.6vw, 20px);
  letter-spacing: clamp(1px, 0.18vw, 3px);
  text-shadow: none;
  font-weight: normal;
}

.title-btn--secondary:hover {
  background: #1a1a1a;
  color: #ddd;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.1);
}

.settings-panel {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 20;
  animation: settings-in 0.3s ease forwards;
  padding: 18px;
}

.settings-panel.active {
  display: flex;
}

.settings-title {
  color: #ff3333;
  font-family: 'Courier New', monospace;
  font-size: clamp(20px, 3vh, 28px);
  letter-spacing: clamp(3px, 0.6vw, 6px);
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.5);
  margin: 0;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(86vw, 420px);
  max-width: 420px;
  padding: 8px 10px;
  border: 1px solid #2d2d2d;
  background: rgba(12, 12, 12, 0.75);
}

.settings-label {
  color: #888;
  font-family: 'Courier New', monospace;
  font-size: clamp(11px, 1.3vh, 13px);
  letter-spacing: clamp(1px, 0.2vw, 2px);
  text-transform: uppercase;
  min-width: 122px;
}

.settings-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: #222;
  border-radius: 2px;
  outline: none;
  border: 1px solid #333;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: #b30000;
  border: 2px solid #ff3333;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(179, 0, 0, 0.6);
}

.settings-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #b30000;
  border: 2px solid #ff3333;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(179, 0, 0, 0.6);
}

.settings-btn {
  background: transparent;
  border: 2px solid #b30000;
  color: #ff3333;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-btn:hover {
  background: #b30000;
  color: #fff;
  box-shadow: 0 0 12px rgba(179, 0, 0, 0.6);
}

.settings-back {
  background: transparent;
  border: 1px solid #444;
  color: #888;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-back:hover {
  border-color: #888;
  color: #fff;
}

@media (max-width: 720px) {
  .title-menu-subactions {
    grid-template-columns: 1fr;
  }

  .menu-logo {
    width: min(92vw, 440px);
    max-height: 24vh;
  }

  .title-btn {
    font-size: 20px;
    letter-spacing: 3px;
  }

  .title-btn--secondary {
    font-size: 16px;
  }

  .title-menu {
    gap: 8px;
    padding: 10px;
  }
}

@keyframes settings-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.desktop-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #0a0a0a;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.title-chapter-menu {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.title-chapter-menu h2 {
  color: #888;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.chapter-btn {
  width: 300px;
  padding: 10px 20px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: transparent;
  border: 1px solid #333;
  color: #999;
  cursor: var(--cursor-pointer), pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.2s;
}
.chapter-btn:hover {
  border-color: #0a0;
  color: #0f0;
  background: rgba(0,255,0,0.03);
}
.chapter-btn.chapter-btn--locked {
  opacity: 0.3;
  cursor: var(--cursor-not-allowed), not-allowed;
}
.chapter-btn.chapter-btn--back {
  margin-top: 12px;
  border-color: #333;
  color: #555;
  font-size: 11px;
}

.context-menu {
  position: fixed;
  background: #ece9d8;
  border: 1px solid #000;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  min-width: min(160px, calc(100vw - 8px));
  width: max-content;
  max-width: min(260px, calc(100vw - 8px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 2px;
}

.context-menu-item {
  padding: 4px 20px;
  font-size: 11px;
  cursor: var(--cursor-pointer), pointer;
  color: #000;
}

.context-menu-item:hover {
  background: #000080;
  color: #fff;
}

.context-menu-item-danger {
  color: #cc0000;
}

.context-menu-item-danger:hover {
  background: #cc0000;
  color: #fff;
}

.chapter-fade-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  /* La cortina es opaca desde el primer fotograma: se anima el texto, no el
     fondo, para que el escritorio no se cuele durante la narración. */
  opacity: 1;
  pointer-events: none;
  transition: none;
}

.chapter-fade-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Sleep mode overlay */
.sleep-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00ff00;
  font-family: 'Courier New', Courier, monospace;
  font-size: 24px;
  opacity: 0;
  transition: opacity 1s ease;
}

.sleep-overlay.active {
  opacity: 1;
}

/* ── Intro Sequence ── */
.intro-overlay {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 28vh;
  cursor: var(--cursor-pointer), pointer;
}

.intro-text {
  color: #c0c0c0;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.8;
  text-align: center;
  white-space: pre;
  padding: 40px;
  text-shadow: 0 0 8px rgba(192, 192, 192, 0.15);
}

.intro-hint {
  position: absolute;
  bottom: 60px;
  color: #666;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.intro-hint--visible { opacity: 0.85; }
/* Mientras se escribe: se puede acelerar con un clic */
.intro-skip {
  position: absolute;
  bottom: 28px;
  color: #444;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  animation: intro-skip-in 1.2s ease 2s both;
}
@keyframes intro-skip-in { from { opacity: 0; } to { opacity: 0.8; } }

.intro-fade {
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* ── Day Transition Title ── */
.chapter-transition-title {
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 26px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 3px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
  user-select: none;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.chapter-transition-title.visible {
  opacity: 1;
  transform: scale(1);
}

.chapter-transition-btn {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #3a3a3a;
  border: 2px solid #888;
  color: #e0e0e0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 20px;
  padding: 14px 48px;
  cursor: var(--cursor-pointer), pointer;
  opacity: 0;
  transition: opacity 0.6s ease, background 0.2s, border-color 0.2s;
  letter-spacing: 2px;
  text-transform: uppercase;
  user-select: none;
  outline: none;
}
.chapter-transition-btn.visible {
  opacity: 1;
}
.chapter-transition-btn:hover {
  background: #555;
  border-color: #aaa;
}
.chapter-transition-btn:active {
  background: #222;
}

/* ── Final Overlay Sequence ── */
.final-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: none;
  pointer-events: none;
}

.final-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.final-sequence-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80%;
  height: 80%;
}

.final-seq-text {
  color: #ffffff;
  font-family: 'Courier New', Courier, monospace;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
  user-select: none;
}

.final-seq-text.visible {
  opacity: 1;
  transform: scale(1);
}

.final-seq-title {
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 4px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.final-seq-subtitle {
  font-size: 20px;
  line-height: 1.6;
}

.final-seq-credit {
  font-size: 22px;
  letter-spacing: 2px;
}

.final-seq-logo {
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.final-seq-logo.visible {
  opacity: 1;
  transform: scale(1);
}

.final-seq-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.final-seq-next.visible {
  opacity: 1;
  transform: scale(1);
}

.final-seq-next-header {
  color: #888888;
  font-size: 18px;
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ── Decrypt Challenge ── */
.decrypt-challenge-container {
  padding: 16px;
  background: #000000;
  color: #00ff00;
  font-family: 'Courier New', Courier, monospace;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #00ff00;
  user-select: text;
}
.decrypt-header {
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid #00ff00;
  padding-bottom: 4px;
}
.decrypt-timer {
  font-size: 12px;
  color: #88ff88;
  margin-top: 4px;
}
.decrypt-code-container {
  background: #0a0a0a;
  border: 1px dashed #00ff00;
  padding: 12px;
  text-align: center;
  margin: 12px 0;
}
.decrypt-code-value {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #ff3333;
  text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
  animation: decrypt-pulse 1s infinite alternate;
}
@keyframes decrypt-pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}
.decrypt-prompt {
  font-size: 12px;
  margin-bottom: 6px;
}
.decrypt-input {
  background: #000;
  border: 1px solid #00ff00;
  color: #00ff00;
  font-family: inherit;
  font-size: 14px;
  padding: 6px;
  outline: none;
  margin-bottom: 10px;
}
.decrypt-btn {
  background: #002200;
  border: 1px solid #00ff00;
  color: #00ff00;
  padding: 8px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
  cursor: var(--cursor-pointer), pointer;
}
.decrypt-btn:hover {
  background: #00ff00;
  color: #000;
}
.decrypt-fail {
  color: #ff0000;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin-top: 40px;
}
.decrypt-success {
  color: #00ff00;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  margin-top: 40px;
}

/* ── System Properties Window ── */

.shutdown-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  opacity: 0;
  animation: shutdown-fade 2s forwards;
}

.suspend-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  cursor: var(--cursor-default), default;
}

@keyframes shutdown-fade {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 200000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  animation: splash-in 1s ease forwards;
}

.splash-screen,
.splash-screen * {
  cursor: auto !important;
}

.splash-screen.fade-out {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.splash-logo {
  width: min(560px, 84vw);
  max-width: 75vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-logo-img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 30px rgba(186, 0, 0, 0.5));
}

.splash-text {
  color: #ff3333;
  font-family: 'Courier New', monospace;
  font-size: clamp(20px, 2.3vw, 30px);
  letter-spacing: clamp(2px, 0.35vw, 7px);
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 0, 0, 0.5);
}

@keyframes splash-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

body.corruption-1 #game {
  filter: hue-rotate(3deg) saturate(0.95);
  transition: filter 3s ease;
}

body.corruption-2 #game {
  filter: hue-rotate(355deg) saturate(0.8) brightness(0.95);
}

body.corruption-3 #game {
  filter: hue-rotate(10deg) saturate(0.5) brightness(0.85) contrast(1.1);
}

.taskbar-corrupted {
  animation: taskbar-glitch 0.3s steps(3) infinite;
}

@keyframes taskbar-glitch {
  0%   { transform: translate(0); filter: none; }
  25%  { transform: translate(-2px, 1px); filter: hue-rotate(90deg); }
  50%  { transform: translate(1px, -1px); filter: hue-rotate(270deg); }
  75%  { transform: translate(-1px, 2px); filter: hue-rotate(180deg); }
}

/* Fade del menú principal al cerrarse */
.title-menu.boot-fade {
  opacity: 0;
  animation: none;
}

/* Icono seleccionado estilo Win98 */
.desktop-icon--selected .icon-box {
  filter: brightness(1.15) drop-shadow(0 0 2px rgba(255,255,255,0.6));
}

/* Fondo con movimiento sutil (el escritorio "respira") */
.desktop-bg {
  animation: desktop-breathe 90s ease-in-out infinite alternate;
}

@keyframes desktop-breathe {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* ── Keyframes que faltaban: entrada del menú principal ── */
@keyframes boot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Arranque retro del "PC" (BIOS + carga de Windows) ── */
.sysboot-overlay {
  position: absolute;
  inset: 0;
  z-index: 900000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  transition: opacity 0.6s ease;
}

.sysboot-overlay.fade-out {
  opacity: 0;
}

.sysboot-bios {
  position: absolute;
  top: 24px;
  left: 24px;
  margin: 0;
  color: #c8c8c8;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.5px;
  white-space: pre;
  text-shadow: 0 0 6px rgba(200, 200, 200, 0.35);
  max-width: 94vw;
}

.sysboot-bios .dim {
  color: #666;
}

.sysboot-bios .ok {
  color: #7CFC00;
}

.sysboot-win {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
}

.sysboot-win-logo {
  width: min(60vw, 520px);
  max-height: 24vh;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 30px rgba(186, 0, 0, 0.45));
}

.sysboot-win-title {
  color: #b8b8b8;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  animation: sysboot-blink 1.1s steps(1) infinite;
}

@keyframes sysboot-blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.15; }
}

.sysboot-hint {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #444;
  font-size: 11px;
  letter-spacing: 2px;
}

/* Iconos del escritorio que "aparecen" uno a uno tras el arranque */
.desktop-icon--boot {
  animation: icon-boot-in 0.16s ease-out backwards;
}

@keyframes icon-boot-in {
  from { opacity: 0; transform: scale(0.55); }
  to { opacity: 1; transform: scale(1); }
}

/* Flash de encendido del monitor (CRT) al terminar el arranque */
.crt-power {
  position: absolute;
  inset: 0;
  z-index: 900001;
  pointer-events: none;
  background: #fff;
  animation: crt-power-on 0.45s steps(1) forwards;
}

@keyframes crt-power-on {
  0%   { opacity: 0.7; }
  20%  { opacity: 0.12; }
  35%  { opacity: 0.5; }
  55%  { opacity: 0.05; }
  75%  { opacity: 0.35; }
  100% { opacity: 0; }
}

/* Pantalla azul fantasma (día 3) */
.ghost-bsod {
  position: absolute;
  inset: 0;
  z-index: 95000;
  background: #0827c5;
  color: #fff;
  font-family: 'Courier New', monospace;
  padding: 40px;
  font-size: 13px;
  line-height: 1.5;
  animation: bsod-in 0.25s ease;
}

@keyframes bsod-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Pantalla de inicio: ayuda + pista ── */

.title-btn:focus-visible {
  outline: 1px solid #ff3333;
  outline-offset: 2px;
}

.title-help { max-width: 680px; margin: 0 auto; }
.title-help .title-help-body {
  max-height: 52vh;
  overflow-y: auto;
  width: 100%;
  max-width: 640px;
  text-align: left;
  font-family: 'Courier New', monospace;
  font-size: clamp(12px, 1.7vh, 15px);
  color: #cfcfcf;
  line-height: 1.55;
}
.title-help-lead {
  color: #eee;
  border-left: 3px solid #BA0000;
  padding: 4px 0 4px 12px;
  margin: 0 0 14px;
}
.title-help-block { margin-bottom: 12px; }
.title-help-sub {
  color: #ff5a5a;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85em;
  margin-bottom: 6px;
}
.title-help-item { margin: 3px 0 3px 2px; color: #bfbfbf; }
.title-help .settings-back {
  margin-top: 8px;
  background: rgba(186, 0, 0, 0.15);
  color: #ddd;
  font-family: 'Courier New', monospace;
}

/* Un archivo que aparece solo (o que cambia cuando no miras) llama la atención:
   entra con un destello verde y un golpe de escala, y luego se queda quieto. */
.desktop-icon--nuevo {
  animation: icono-nuevo 1.6s ease-out 1;
}

@keyframes icono-nuevo {
  0% { transform: scale(0.86); filter: brightness(2.4) drop-shadow(0 0 10px rgba(0, 255, 90, 0.8)); }
  25% { transform: scale(1.04); filter: brightness(1.5) drop-shadow(0 0 8px rgba(0, 255, 90, 0.5)); }
  60% { transform: scale(1); filter: brightness(1.1) drop-shadow(0 0 6px rgba(0, 255, 90, 0.25)); }
  100% { transform: scale(1); filter: none; }
}

.desktop-icon--nuevo .desktop-icon-label {
  animation: icono-nuevo-texto 3s ease-out 1;
}

@keyframes icono-nuevo-texto {
  0%, 30% { color: #b6ffb6; text-shadow: 0 0 8px rgba(0, 255, 90, 0.7); }
  100% { color: inherit; text-shadow: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Ventanas (antes windows.css)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Al abrirse, la ventana entra en su sitio con un golpe corto: no es una
   animación moderna, es el tubo del monitor calentándose. */
.window {
  animation: ventana-abre 0.11s ease-out;
}

@keyframes ventana-abre {
  0% { opacity: 0.4; transform: scale(0.985); }
  100% { opacity: 1; transform: scale(1); }
}

.window {
  /* Las ventanas flotan sobre el escritorio: sin esto se apilaban una debajo
     de otra, sin hacer caso de su sitio, de su tamaño ni de quién va delante */
  position: absolute;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: 1px 1px 0 #808080, inset 1px 1px 0 #dfdfdf;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  min-height: 100px;
  max-width: calc(100vw - 6px);
  max-height: calc(100vh - 34px);
}

.window-focused {
  z-index: 100;
}

.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 18px;
  background: linear-gradient(90deg, #808080, #b5b5b5);
  padding: 2px 2px 1px 3px;
  cursor: var(--cursor-default), default;
  flex-shrink: 0;
  margin: 2px 2px 0 2px;
  border: 1px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
}

.window-focused .window-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
}

.window:not(.window-focused) .window-titlebar {
  background: linear-gradient(90deg, #7b7b7b, #9c9c9c);
}

.window-titlebar-text {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding-left: 2px;
}

.window-title {
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window:not(.window-focused) .window-title {
  color: #e0e0e0;
}

/* ── Resize handles ── */
.window-resize {
  position: absolute;
  z-index: 10;
}
.window-resize-s { bottom: -3px; left: 8px; right: 8px; height: 6px;   cursor: var(--cursor-ns-resize), ns-resize; }
.window-resize-e { top: 8px; bottom: 8px; right: -3px; width: 6px;   cursor: var(--cursor-ew-resize), ew-resize; }
.window-resize-w { top: 8px; bottom: 8px; left: -3px; width: 6px;   cursor: var(--cursor-ew-resize), ew-resize; }
.window-resize-se { bottom: -3px; right: -3px; width: 12px; height: 12px;   cursor: var(--cursor-nwse-resize), nwse-resize; }
.window-resize-sw { bottom: -3px; left: -3px; width: 12px; height: 12px;   cursor: var(--cursor-nesw-resize), nesw-resize; }

body.window-resizing {
  cursor: inherit;
}
body.window-resizing * {
  user-select: none;
}

.window-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  align-items: center;
}

.window-btn {
  width: 16px;
  height: 14px;
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  cursor: var(--cursor-pointer), pointer;
  color: #000;
  padding: 0 1px 1px 0;
  line-height: 1;
  font-family: 'Marlett', 'MS Sans Serif', Arial, sans-serif;
  outline: none;
  box-sizing: border-box;
}

.window-btn:hover {
  background: #c8c8c8;
}

.window-btn:active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
  padding: 1px 0 0 1px;
}

.window-btn-min {
  font-size: 8px;
  padding-bottom: 2px;
}

.window-btn-max {
  font-size: 7px;
  padding-bottom: 1px;
}

.window-btn-close {
  font-size: 8px;
  margin-left: 2px;
  font-weight: bold;
}

.window-btn-close:hover {
  background: #e00000;
  color: #fff;
  border-color: #ff8888 #880000 #880000 #ff8888;
}

.window-btn-close:active {
  background: #b00000 !important;
  border-color: #880000 #ff8888 #ff8888 #880000 !important;
}

.window-content {
  flex: 1;
  overflow: auto;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #000;
  margin: 2px 3px 3px 3px;
  position: relative;
}

.window-content::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.window-content::-webkit-scrollbar-track {
  background: #0a0a0a;
  border: 1px solid #222;
}

.window-content::-webkit-scrollbar-thumb {
  background: #333;
  border: 1px solid #444;
}

.window-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.explorer-content {
  padding: 4px;
}

.explorer-loading,
.explorer-empty {
  color: #666;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  text-align: center;
  padding: 30px 10px;
}

.explorer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  cursor: var(--cursor-pointer), pointer;
  border: 1px solid transparent;
}

.explorer-item:hover {
  background: #1a1a2a;
  border-color: #334;
}

.explorer-item-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.explorer-item-name {
  font-size: 12px;
  color: #c0c0c0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-viewer {
  margin: 8px;
  font-family: monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
  color: #c0c0c0;
  line-height: 1.4;
}

.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  box-shadow: inset 0 1px 0 #dfdfdf;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  z-index: 5000;
  gap: 3px;
}

.taskbar-start {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: bold;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  cursor: var(--cursor-pointer), pointer;
  color: #000;
}

.taskbar-start:hover {
  background: #c8c8c8;
  color: #000;
}

.taskbar-start:active,
.taskbar-start--active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
  color: #000;
}

.taskbar-start-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.taskbar-divider {
  width: 2px;
  height: 20px;
  border-left: 1px solid #808080;
  border-right: 1px solid #ffffff;
  margin: 0 2px;
  flex-shrink: 0;
}

.taskbar-windows {
  flex: 1;
  display: flex;
  gap: 3px;
  overflow: hidden;
  min-width: 0;
}

.taskbar-btn {
  height: 22px;
  padding: 0 8px;
  min-width: 0;
  font-size: 11px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  cursor: var(--cursor-pointer), pointer;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  flex-shrink: 1;
  text-align: left;
}

.taskbar-btn:hover {
  background: #c8c8c8;
  color: #000;
}

.taskbar-btn:active,
.taskbar-btn.active {
  border-color: #000000 #ffffff #ffffff #000000;
  box-shadow: inset -1px -1px 0 #dfdfdf, inset 1px 1px 0 #808080;
  color: #000;
}

.taskbar-btn-minimized {
  font-style: italic;
  color: #404040;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  background: #c0c0c0;
  flex-shrink: 0;
}

.taskbar-clock {
  font-size: 11px;
  color: #000;
}

.start-menu {
  position: absolute;
  bottom: 30px;
  left: 4px;
  width: 220px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: inset 1px 1px 0 #dfdfdf, 2px 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 6000;
  display: flex;
  flex-direction: row;
  font-size: 11px;
  animation: start-menu-in 0.1s ease-out;
  padding-left: 26px;
}

@keyframes start-menu-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.start-menu-header {
  position: absolute;
  left: 2px;
  top: 2px;
  bottom: 2px;
  width: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 2px;
  background: linear-gradient(180deg, #1084d0, #000080);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.start-menu-header-icon {
  display: none;
}

.start-menu-header-title {
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.start-menu-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2px;
  gap: 0;
}

.start-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 10px;
  background: transparent;
  border: none;
  cursor: var(--cursor-pointer), pointer;
  color: #000;
  font-size: 11px;
  text-align: left;
}

.start-menu-item:hover {
  background: #000080;
  color: #fff;
}

.start-menu-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  object-fit: contain;
}

.start-menu-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.start-menu-sep {
  height: 2px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  margin: 3px 4px;
}

.dialog-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8000;
}

.dialog-window {
  background: #ece9d8;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  width: min(450px, 92vw);
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.dialog-titlebar {
  background: linear-gradient(90deg, #1a0000, #4a0000);
  color: #ff4444;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
}

.dialog-body {
  display: flex;
  gap: 12px;
  padding: 16px;
  align-items: flex-start;
  overflow: auto;
  min-height: 0;
}

.dialog-message { min-width: 0; overflow-wrap: anywhere; }

.dialog-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
}

.dialog-icon-error {
  background: #cc0000;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.dialog-icon-warning {
  background: #ffcc00;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.dialog-icon-info {
  width: 32px;
  height: 32px;
  border: 2px solid #880000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cc0000;
  font-weight: bold;
  font-size: 18px;
}

.dialog-icon-info::after {
  content: 'i';
}

.dialog-icon-question {
  width: 32px;
  height: 32px;
  border: 2px solid #880000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cc0000;
  font-weight: bold;
  font-size: 18px;
}

.dialog-icon-question::after {
  content: '?';
}

.dialog-message {
  font-size: 12px;
  color: #000;
  line-height: 1.5;
  white-space: pre-wrap;
}

.dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px 12px;
}

.dialog-btn {
  min-width: 75px;
  min-height: 24px;
  font-size: 12px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 3px 12px;
  cursor: var(--cursor-pointer), pointer;
  white-space: nowrap;
}

.dialog-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.dialog-btn-default {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

/* ── ENTITY CHAT ── */

.notification-container {
  position: absolute;
  bottom: 36px;
  right: 8px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.notification-toast {
  width: min(280px, 74vw);
  max-width: 74vw;
  background: #ffffe1;
  border: 1px solid #000;
  color: #000;
  font-size: 11px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  cursor: var(--cursor-pointer), pointer;
  position: relative;
  overflow: hidden;
}

.notification-toast.visible {
  opacity: 1;
  transform: translateX(0);
}

.notification-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ff0000;
  animation: notif-bar-pulse 1s ease-in-out infinite;
}

@keyframes notif-bar-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.notification-toast:hover {
  box-shadow: 2px 2px 10px rgba(200,0,0,0.3);
  border-color: #880000;
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #8a0000, #cc2222);
  color: #fff;
  padding: 3px 4px;
  font-weight: bold;
  font-size: 11px;
}

.notification-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-close {
  width: 16px;
  height: 14px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  cursor: var(--cursor-pointer), pointer;
  color: #000;
  flex-shrink: 0;
  margin-left: 6px;
}

.notification-close:hover {
  background: #e00000;
  color: #fff;
  border-color: #ff8888 #880000 #880000 #ff8888;
}

.notification-body {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #000;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Iconos (antes icons.css)
   ═══════════════════════════════════════════════════════════════════════════ */

.desktop-icons {
  position: absolute;
  inset: 0;
  padding: 14px;
  z-index: 1;
  pointer-events: auto;
}

.desktop-icon {
  position: absolute;
  width: 74px;
  padding: 5px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: var(--cursor-pointer), pointer;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: background 0.08s;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
}

.desktop-icon.selected {
  background: rgba(0, 0, 128, 0.2);
  border-color: rgba(255, 255, 255, 0.12);
}

.desktop-icon-dragging {
  opacity: 0.85;
  transform: scale(1.03);
  z-index: 30;
}

/* ── Icon base box ── */
.icon-box {
  width: 40px;
  height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  flex-shrink: 0;
}

/* ── ICONO DE ASSET (Mi PC, Correo, Fotos...) ── */
.icon-img {
  background: none;
  border: none;
  box-shadow: none;
}

.icon-asset-img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

/* ── FOLDER ── */
.icon-folder {
  background: url('../assets/Carpeta.svg') center/contain no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-folder::before,
.icon-folder::after {
  display: none;
}

/* ── TEXT FILE ── */
.icon-file-txt {
  background: url('../assets/Texto.svg') center/contain no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-file-txt::after {
  display: none;
}

.icon-file-txt .icon-file-lines {
  display: none;
}

.icon-file-lines {
  width: 22px;
  height: 2px;
  background: #666;
  border-radius: 1px;
  box-shadow: 0 6px 0 #666, 0 12px 0 #666, 0 18px 0 #666;
  position: relative;
  z-index: 1;
}

/* ── CONFIG/INI ── */
.icon-ini {
  background: url('../assets/Texto.svg') center/contain no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-ini::after { display: none; }
.icon-ini-gear { display: none; }

/* ── HELP (ayuda.txt) ── */
.icon-help {
  background: url('../assets/Texto.svg') center/contain no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-help::after { display: none; }
.icon-help-mark { display: none; }

/* ── INFO (README) ── */
.icon-info {
  background: url('../assets/Texto.svg') center/contain no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-info::after { display: none; }
.icon-info-mark { display: none; }

/* ── EXECUTABLE (NO LO BORRES .exe) ── */
.icon-exe {
  background: none;
  border: none;
  border-radius: 0;
}

.icon-exe-gear {
  color: rgba(255,255,255,0.85);
  font-size: 20px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.icon-nlb-exe {
  width: 40px;
  height: 40px;
  background: url('../assets/nlb-exe-original.svg') center/contain no-repeat;
}

.icon-nlb-exe-virus {
  background: url('../assets/nlb-exe-virus.svg') center/contain no-repeat;
}

/* ── MESSENGER ── */
.icon-messenger {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-messenger-img {
  width: 40px;
  height: 40px;
  background: url('../assets/Messenger.svg') center/contain no-repeat;
}

.desktop-icon-messenger {
  position: relative;
}

.desktop-icon-messenger .notification-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #ff0000;
  border: 1px solid #cc0000;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255,0,0,0.5);
  display: none;
  z-index: 5;
}

.desktop-icon-messenger .notification-dot.visible {
  display: block;
  animation: notif-pulse 1s ease-in-out infinite;
}

@keyframes notif-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(255,0,0,0.5); }
  50% { box-shadow: 0 0 8px rgba(255,0,0,0.8); }
}

/* ── BROWSER ── */
.icon-browser {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-browser-img {
  width: 40px;
  height: 40px;
  background: url('../assets/internet-explorer.svg') center/contain no-repeat;
}

/* ── IMAGE FILE ── */
.icon-file-img {
  background: url('../assets/Texto.svg') center/contain no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-file-img::after {
  display: none;
}

.icon-img-preview {
  display: none;
}

.icon-img-preview::after {
  display: none;
}

/* ── WARNING (NO LO BORRES) ── */
.icon-warning {
  background: linear-gradient(135deg, #cc2222 0%, #881111 100%);
  border: 1px solid #550000;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(200,0,0,0.3), inset 0 1px 0 rgba(255,100,100,0.2);
  animation: icon-warning-pulse 2s ease-in-out infinite;
}

@keyframes icon-warning-pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(200,0,0,0.3), inset 0 1px 0 rgba(255,100,100,0.2); }
  50% { box-shadow: 0 0 16px rgba(200,0,0,0.5), inset 0 1px 0 rgba(255,100,100,0.3); }
}

.icon-warning-mark {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 4px rgba(255,0,0,0.5);
}

/* ── CMD ── */
.icon-cmd {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.icon-cmd::after {
  display: none;
}

.icon-cmd-img {
  width: 40px;
  height: 40px;
}

/* ── Label ── */
.desktop-icon-label {
  color: #fff;
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.85);
  word-break: break-word;
  line-height: 1.2;
  max-width: 70px;
  overflow: hidden;
}

.desktop-icon-label.warning {
  color: #ff6b6b;
}

/* ── Trash ── */
.trash-icon {
  position: absolute;
  right: 16px;
  bottom: 44px;
  width: 52px;
  height: 52px;
  z-index: 5;
  cursor: var(--cursor-pointer), pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
  border: 1px solid transparent;
  border-radius: 3px;
  background: rgba(0,0,0,0.15);
}

.trash-icon:hover {
  opacity: 0.85;
  border-color: rgba(255,255,255,0.08);
  transform: scale(1.04);
}

.trash-icon.active {
  opacity: 1;
  border-color: rgba(255,0,0,0.2);
  background: rgba(255,0,0,0.06);
}

.trash-icon-img {
  width: 32px;
  height: 34px;
  background: url('../assets/Papelera.svg') center/contain no-repeat;
}

.trash-icon-label {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
}

/* ── Drag ghost ── */
.icon-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.7;
  transform: scale(1.1);
  transition: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   El shell del 98: barra de tareas, menú Inicio, bandeja, guía (antes shell98.css)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL98.CSS — Windows 98 de verdad.
   Se carga la última: aquí se deshace todo lo que quedaba de interfaz moderna
   (esquinas redondeadas, sombras difusas, animaciones, iconos de ahora) y se
   vuelve al aspecto exacto del escritorio de 1998:
     · cara de ventana #c0c0c0 y biseles de 2px (#ffffff / #dfdfdf / #808080 / #0a0a0a)
     · barra de título con degradado azul y botones de 16x14 con pictogramas
     · barra de tareas de 28px, menú Inicio con submenús en cascada y bandeja
     · cuadros de diálogo, menús contextuales y cajas de texto hundidas
   Nada de transiciones: en 1998 las cosas aparecían de golpe.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --w98-face: #c0c0c0;
  --w98-light: #ffffff;
  --w98-light2: #dfdfdf;
  --w98-shadow: #808080;
  --w98-dark: #0a0a0a;
  --w98-navy: #000080;
  --w98-navy2: #1084d0;
  --w98-ui-font: 'MS Sans Serif', 'Microsoft Sans Serif', Tahoma, Geneva, Verdana, sans-serif;
}

/* ── Nada de esquinas redondeadas, sombras difusas ni animaciones ── */
.window,
.window *,
.taskbar,
.taskbar *,
.start-menu,
.start-menu *,
.context-menu,
.context-menu *,
.dialog-window,
.dialog-window *,
.notification-toast,
.explorer-content,
.explorer-content * {
  border-radius: 0 !important;
  transition: none !important;
  animation: none !important;
  text-shadow: none !important;
  backdrop-filter: none !important;
}

/* ═══════════════════ Ventanas ═══════════════════ */

.window {
  background: var(--w98-face);
  border: 0;
  padding: 3px;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light2),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light);
}

.window-titlebar {
  height: 18px;
  margin: 0;
  padding: 0 2px 2px 3px;
  border: 0;
  box-shadow: none;
  background: linear-gradient(90deg, var(--w98-navy), var(--w98-navy2));
  cursor: var(--cursor-default), default;
  align-items: center;
}

.window:not(.window-focused) .window-titlebar {
  background: linear-gradient(90deg, #7f7f7f, #b5b5b5);
}

.window-titlebar-text {
  gap: 3px;
  padding-left: 0;
  align-items: center;
}

.window-title {
  font-family: var(--w98-ui-font);
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0;
  padding-bottom: 1px;
}

.window:not(.window-focused) .window-title {
  color: #dfdfdf;
}

.window-controls {
  gap: 0;
  align-items: flex-start;
  padding-top: 0;
}

/* Botones — □ ✕ con pictogramas dibujados, como los de Marlett */
.window-btn {
  width: 16px;
  height: 14px;
  min-width: 16px;
  margin-left: 2px;
  padding: 0;
  background-color: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
  font-family: var(--w98-ui-font);
  font-size: 0;
  color: transparent;
  position: relative;
}

.window-btn:active {
  box-shadow:
    inset 1px 1px var(--w98-dark),
    inset -1px -1px var(--w98-light),
    inset 2px 2px var(--w98-shadow),
    inset -2px -2px var(--w98-light2);
}

.window-btn:hover { background-color: #c8c8c8; }

.window-btn-min::after {
  content: '';
  position: absolute;
  left: 5px;
  bottom: 4px;
  width: 6px;
  height: 2px;
  background: #000;
}

.window-btn-max::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 3px;
  width: 9px;
  height: 8px;
  border: 1px solid #000;
  border-top-width: 2px;
}

.window-btn-max.is-maximized::after {
  left: 3px;
  top: 2px;
  width: 7px;
  height: 6px;
  border-top-width: 2px;
  box-shadow: 2px 2px 0 -1px #c0c0c0, 3px 3px 0 0 #000;
}

.window-btn-close { margin-left: 2px; }

.window-btn-close::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 3px;
  width: 8px;
  height: 8px;
  background-image:
    linear-gradient(45deg, transparent 42%, #000 42%, #000 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #000 42%, #000 58%, transparent 58%);
}

.window-btn-close:hover {
  background-color: #e00000;
  color: transparent;
  border-color: transparent;
}

.window-btn-close:hover::after {
  background-image:
    linear-gradient(45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%);
}

.window-btn-close:active { background-color: #b00000 !important; }

.window-content {
  margin: 3px 0 0 0;
  padding: 0;
  background: var(--w98-face);
  overflow: auto;
  min-width: 0;   /* que el contenido no empuje la ventana hacia fuera */
  min-height: 0;
}

.window-content::-webkit-scrollbar { width: 16px; height: 16px; }
.window-content::-webkit-scrollbar-track { background: #dfdfdf; }
.window-content::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #000000 #000000 #ffffff;
  box-shadow: inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
}

/* Menú de sistema (icono de la ventana) */
.window-system-menu {
  position: absolute;
  z-index: 10050;
  min-width: min(130px, calc(100vw - 12px));
  width: max-content;
  max-width: min(200px, calc(100vw - 12px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 3px;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2),
    2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

.window-system-menu .sys-item {
  padding: 4px 18px 4px 20px;
  position: relative;
  cursor: var(--cursor-default), default;
}

.window-system-menu .sys-item:hover {
  background: var(--w98-navy);
  color: #fff;
}

.window-system-menu .sys-item.is-dim { color: var(--w98-shadow); }
.window-system-menu .sys-item.is-dim:hover { background: var(--w98-navy); color: #c0c0c0; }
.window-system-menu .sys-sep {
  height: 0;
  margin: 3px 2px;
  border-top: 1px solid var(--w98-shadow);
  border-bottom: 1px solid var(--w98-light);
}

/* ═══════════════════ Escritorio ═══════════════════ */

.desktop-icons {
  padding: 6px 4px;
}

.desktop-icon {
  width: 76px;
  padding: 3px 2px 5px;
  gap: 3px;
}

.desktop-icon-label {
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #fff;
  background: transparent;
  border: 1px dotted transparent;
  padding: 1px 2px;
  line-height: 1.1;
  text-shadow: 1px 1px 0 #000;
}

.desktop-icon.selected .desktop-icon-label,
.desktop-icon--selected .desktop-icon-label {
  background: var(--w98-navy);
  border-color: #fff;
  border-style: dotted;
  text-shadow: none;
}

.desktop-icon.warning .desktop-icon-label { color: #ffd7d7; }
.desktop-icon.warning .desktop-icon-label.warning {
  background: #7a0000;
  color: #fff;
}

.trash-icon-label {
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  background: transparent;
}

/* ═══════════════════ Menús contextuales ═══════════════════ */

.context-menu {
  padding: 3px;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2),
    2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--w98-ui-font);
  font-size: 11px;
  min-width: 150px;
  z-index: 9500;
}

.context-menu-item {
  padding: 4px 20px 4px 22px;
  color: #000;
  position: relative;
  white-space: nowrap;
}

.context-menu-item:hover {
  background: var(--w98-navy);
  color: #fff;
}

.context-menu-separator {
  height: 0;
  margin: 3px 2px;
  border-top: 1px solid var(--w98-shadow);
  border-bottom: 1px solid var(--w98-light);
}

/* ═══════════════════ Barra de tareas ═══════════════════ */

.taskbar {
  height: 28px;
  padding: 2px 2px 2px 2px;
  gap: 3px;
  background: var(--w98-face);
  border: 0;
  border-top: 1px solid var(--w98-light);
  box-shadow: inset 0 1px 0 var(--w98-light2);
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

.taskbar-start {
  height: 22px;
  padding: 0 6px 0 3px;
  gap: 3px;
  font-family: var(--w98-ui-font);
  font-size: 11px;
  font-weight: bold;
  color: #000;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
}

.taskbar-start:active,
.taskbar-start--active {
  box-shadow:
    inset 1px 1px var(--w98-dark),
    inset -1px -1px var(--w98-light),
    inset 2px 2px var(--w98-shadow),
    inset -2px -2px var(--w98-light2);
}

.taskbar-start-icon { width: 16px; height: 16px; }

.taskbar-divider {
  width: 2px;
  height: 22px;
  margin: 0 1px;
  border: 0;
  border-left: 1px solid var(--w98-shadow);
  border-right: 1px solid var(--w98-light);
}

.taskbar-windows { gap: 3px; }

.taskbar-btn {
  height: 22px;
  padding: 0 6px;
  gap: 4px;
  /* El boton lleva el pictograma de la app y el nombre: en fila, como el 98 */
  display: inline-flex;
  align-items: center;
  min-width: 0;
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #000;
  text-align: left;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
}

.taskbar-btn:active,
.taskbar-btn.active {
  box-shadow:
    inset 1px 1px var(--w98-dark),
    inset -1px -1px var(--w98-light),
    inset 2px 2px var(--w98-shadow),
    inset -2px -2px var(--w98-light2);
  background: var(--w98-face);
  background-image: none;
}

.taskbar-btn-minimized { font-style: normal; color: #303030; }

.taskbar-tray {
  height: 22px;
  padding: 0 6px 0 5px;
  gap: 5px;
  border: 1px solid;
  border-color: var(--w98-shadow) var(--w98-light) var(--w98-light) var(--w98-shadow);
  background: var(--w98-face);
}

.tray-icon {
  width: 18px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #000;
  cursor: var(--cursor-pointer), pointer;
  position: relative;
  padding: 0;
  border: 1px solid transparent;
  background: none;
}
.tray-icon:hover { border-color: var(--w98-light) var(--w98-shadow) var(--w98-shadow) var(--w98-light); }
.tray-icon:active { border-color: var(--w98-shadow) var(--w98-light) var(--w98-light) var(--w98-shadow); }

.tray-icon-glyph {
  display: block;
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

.tray-sep {
  width: 2px;
  height: 16px;
  border-left: 1px solid var(--w98-shadow);
  border-right: 1px solid var(--w98-light);
}

.taskbar-clock {
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #000;
  padding: 0 3px;
  background: none;
  border: 1px solid transparent;
  cursor: var(--cursor-pointer), pointer;
}
.taskbar-clock:hover { border-color: var(--w98-light) var(--w98-shadow) var(--w98-shadow) var(--w98-light); }
.taskbar-clock--alterado { color: #008000; font-weight: bold; }

/* ── El desplegable de la bandeja (volumen, programas, reloj) ── */
.tray-popup {
  position: absolute;
  right: 4px;
  bottom: 34px;
  width: 236px;
  padding: 7px 8px 8px;
  background: var(--w98-face);
  border: 2px solid;
  border-color: var(--w98-light) var(--w98-shadow) var(--w98-shadow) var(--w98-light);
  box-shadow: inset 1px 1px 0 var(--w98-light2), 2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #000;
  z-index: 60;
}
.tray-popup-title {
  font-weight: 700;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--w98-shadow);
}
.tray-popup-body { display: flex; flex-direction: column; gap: 6px; }
.tray-popup-note { color: #303030; font-size: 10.5px; line-height: 1.35; }

.tray-popup-btn {
  font: inherit;
  padding: 3px 8px;
  background: var(--w98-face);
  border: 1px solid;
  border-color: var(--w98-light) var(--w98-shadow) var(--w98-shadow) var(--w98-light);
  cursor: var(--cursor-pointer), pointer;
}
.tray-popup-btn:active { border-color: var(--w98-shadow) var(--w98-light) var(--w98-light) var(--w98-shadow); }

.tray-vol-row { display: flex; align-items: center; gap: 6px; }
.tray-vol-ico { width: 14px; height: 12px; background: #404040; }
.tray-vol-ico-mas { width: 20px; }
.tray-vol-range { flex: 1 1 auto; }

/* Globo de aviso de la bandeja (como el de "Hay actualizaciones") */
.tray-balloon {
  position: absolute;
  right: 4px;
  bottom: 34px;
  width: 230px;
  padding: 8px 9px;
  background: #ffffe1;
  color: #000;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--w98-ui-font);
  font-size: 11px;
  line-height: 1.35;
  z-index: 9600;
}

.tray-balloon-title { font-weight: bold; margin-bottom: 3px; }
.tray-balloon-text { line-height: 1.35; }

/* Maximizada ocupa todo, hasta la barra de tareas: sin los topes de las ventanas normales */
.window-maximized { border-width: 2px; max-width: none; max-height: none; }
.window-maximized .window-titlebar { margin: 0; }

.tray-balloon-close {
  position: absolute;
  right: 3px;
  top: 2px;
  width: 14px;
  height: 13px;
  font-size: 9px;
  line-height: 1;
  background: var(--w98-face);
  border: 0;
  box-shadow: inset -1px -1px var(--w98-dark), inset 1px 1px var(--w98-light);
}

/* ═══════════════════ Menú Inicio ═══════════════════ */

.start-menu {
  bottom: 28px;
  left: 2px;
  width: min(220px, calc(100vw - 6px));
  /* visible: los submenús salen por la derecha y no se pueden recortar */
  overflow: visible;
  padding: 3px 3px 3px 24px;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2),
    2px 2px 0 rgba(0, 0, 0, 0.35);
  animation: none;
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

.start-menu-header {
  left: 3px;
  top: 3px;
  bottom: 3px;
  width: 21px;
  padding: 6px 1px;
  background: linear-gradient(180deg, var(--w98-navy2), var(--w98-navy));
  align-items: flex-end;
  justify-content: center;
}

.start-menu-header-title {
  font-family: var(--w98-ui-font);
  font-size: 15px;
  font-weight: bold;
  color: #c0c0c0;
  letter-spacing: 0;
  text-shadow: none;
}

.start-menu-header-title b {
  color: #fff;
  font-weight: bold;
}

.start-menu-list { padding: 0; gap: 0; }

.start-menu-item {
  height: 34px;
  padding: 3px 8px 3px 4px;
  gap: 8px;
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #000;
  background: transparent;
}

.start-menu-item:hover {
  background: var(--w98-navy);
  color: #fff;
}

.start-menu-item.is-dim { color: var(--w98-shadow); }
.start-menu-item.is-dim:hover { background: var(--w98-navy); color: #c0c0c0; }

.start-menu-item-icon { width: 24px; height: 24px; }
.start-menu-item-label { flex: 1; }
.start-menu-cascade::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid #000;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: auto;
}
.start-menu-item:hover .start-menu-cascade::after,
.start-menu-item:hover.start-menu-cascade::after { border-left-color: #fff; }

.start-menu-sub {
  position: absolute;
  left: 100%;
  top: -4px;
  display: none;
  min-width: min(190px, 60vw);
  max-width: calc(100vw - 232px);
  max-height: calc(100vh - 60px);
  overflow: auto;
  padding: 3px;
  background: var(--w98-face);
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2),
    2px 2px 0 rgba(0, 0, 0, 0.35);
}

/* Cada submenú sale a la altura de su entrada */
.start-menu-cascade { position: relative; }
.start-menu-item:hover > .start-menu-sub { display: block; }
/* Y con un clic se queda abierta, para quien no tenga ratón o no quiera apuntar */
.start-menu-item.is-open > .start-menu-sub { display: block; }
.start-menu-item.is-open { background: var(--w98-navy, #000080); color: #fff; }

.start-menu-sub .start-menu-item { height: 26px; padding: 2px 8px 2px 4px; }
.start-menu-sub .start-menu-item-icon { width: 18px; height: 18px; }

.start-menu-sep {
  height: 0;
  margin: 3px 2px;
  border-top: 1px solid var(--w98-shadow);
  border-bottom: 1px solid var(--w98-light);
}

/* ═══════════════════ Cuadros de diálogo ═══════════════════ */

.dialog-overlay {
  background: transparent;
  z-index: 9200;
}

.dialog-window {
  min-width: 260px;
  max-width: 460px;
  padding: 3px;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light2),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light),
    3px 3px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

.dialog-titlebar {
  height: 18px;
  padding: 0 3px;
  background: linear-gradient(90deg, var(--w98-navy), var(--w98-navy2));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-title {
  color: #fff;
  font-size: 11px;
  font-weight: bold;
}

.dialog-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 10px;
  background: var(--w98-face);
}

.dialog-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 0;
  background: none;
  position: relative;
}

/* Iconos de aviso dibujados a mano (nada de emoji): círculo con símbolo */
.dialog-icon::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50% !important;
  border: 2px solid #000;
}

.dialog-icon::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--w98-ui-font);
  font-size: 19px;
  font-weight: bold;
  color: #000;
}

.dialog-icon-error::before { background: #d04040; }
.dialog-icon-error::after { content: 'X'; }

.dialog-icon-warning::before { background: #f0d000; }
.dialog-icon-warning::after { content: '!'; }

.dialog-icon-question::before { background: #d0d0f0; }
.dialog-icon-question::after { content: '?'; }

.dialog-icon-info::before { background: #d0d0f0; }
.dialog-icon-info::after { content: 'i'; font-style: italic; }

.dialog-message {
  font-family: var(--w98-ui-font);
  font-size: 11px;
  line-height: 1.5;
  color: #000;
  padding-top: 4px;
  white-space: pre-wrap;
}

.dialog-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 4px 12px 12px;
}

.dialog-btn {
  min-width: 76px;
  height: 23px;
  padding: 0 10px;
  font-family: var(--w98-ui-font);
  font-size: 11px;
  color: #000;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
}

.dialog-btn:active {
  box-shadow:
    inset 1px 1px var(--w98-dark),
    inset -1px -1px var(--w98-light),
    inset 2px 2px var(--w98-shadow),
    inset -2px -2px var(--w98-light2);
  padding: 1px 9px 0 11px;
}

.dialog-btn-default { outline: 1px solid #000; outline-offset: -4px; }

/* ═══════════════════ Cuadro "Ejecutar" ═══════════════════ */

/* ═══════════════════ Buscar archivos ═══════════════════ */

.find-btn {
  min-width: 84px;
  height: 23px;
  font-family: var(--w98-ui-font);
  font-size: 11px;
  background: var(--w98-face);
  border: 0;
  color: #000;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
}

.find-btn:active {
  box-shadow:
    inset 1px 1px var(--w98-dark),
    inset -1px -1px var(--w98-light),
    inset 2px 2px var(--w98-shadow),
    inset -2px -2px var(--w98-light2);
}

.find-empty { padding: 8px; color: var(--w98-shadow); }

/* ═══════════════════ Panel de control ═══════════════════ */

/* Iconos del panel, dibujados con cajas (sin imágenes de ahora) */

.app-ico-sound::before { left: 5px; top: 12px; width: 6px; height: 9px; background: #000; }
.app-ico-sound::after { left: 11px; top: 8px; width: 9px; height: 17px; background: #c0c0c0; border: 2px solid #000; box-shadow: inset 0 0 0 1px #fff; }

/* ═══════════════════ Propiedades del sistema ═══════════════════ */

/* ═══════════════════ Office: correo (bandeja de entrada) ═══════════════════ */

.inbox-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--w98-face);
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

.inbox-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  border-bottom: 1px solid var(--w98-shadow);
  box-shadow: inset 0 -1px 0 var(--w98-light);
}

.inbox-tool {
  height: 22px;
  padding: 0 8px;
  font-family: var(--w98-ui-font);
  font-size: 11px;
  background: var(--w98-face);
  color: #000;
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
}

.inbox-tool:active { box-shadow: inset 1px 1px var(--w98-dark), inset -1px -1px var(--w98-light), inset 2px 2px var(--w98-shadow), inset -2px -2px var(--w98-light2); }
.inbox-tool[disabled] { color: var(--w98-shadow); }

.inbox-split { flex: 1; display: flex; min-height: 0; }

.inbox-folders {
  width: 148px;
  padding: 6px 4px;
  background: #fff;
  box-shadow:
    inset -1px -1px var(--w98-light),
    inset 1px 1px var(--w98-shadow),
    inset -2px -2px var(--w98-light2),
    inset 2px 2px var(--w98-dark);
  margin: 4px;
  overflow: auto;
}

.inbox-folder {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  cursor: var(--cursor-pointer), pointer;
}

.inbox-folder:hover { background: #e8e8f8; }
.inbox-folder.is-on { background: var(--w98-navy); color: #fff; }
.inbox-folder-count { margin-left: auto; }

.inbox-list-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 4px 0 4px 0;
}

.inbox-list-head {
  display: flex;
  background: var(--w98-face);
  border-bottom: 1px solid var(--w98-shadow);
}

.inbox-list-head span {
  padding: 3px 8px;
  box-shadow: inset -1px 0 var(--w98-shadow), inset 1px 1px var(--w98-light);
  flex: 0 0 auto;
}

.inbox-mail-list {
  flex: 1;
  overflow: auto;
  background: #fff;
  box-shadow:
    inset -1px -1px var(--w98-light),
    inset 1px 1px var(--w98-shadow),
    inset -2px -2px var(--w98-light2),
    inset 2px 2px var(--w98-dark);
  margin: 0 4px 0 0;
}

.inbox-mail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  border-bottom: 1px solid #f0f0f0;
  cursor: var(--cursor-pointer), pointer;
  white-space: nowrap;
  overflow: hidden;
}

.inbox-mail:hover { background: #e8e8f8; }
.inbox-mail.is-on { background: var(--w98-navy); color: #fff; }
.inbox-mail.is-unread { font-weight: bold; }
.inbox-mail-from { width: 132px; overflow: hidden; text-overflow: ellipsis; }
.inbox-mail-subject { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.inbox-mail-date { color: #303030; }
.inbox-mail.is-on .inbox-mail-date { color: #d0d0ff; }
.inbox-clip { width: 12px; text-align: center; }

.inbox-reader {
  height: 172px;
  margin: 0 4px 4px 0;
  background: #fff;
  box-shadow:
    inset -1px -1px var(--w98-light),
    inset 1px 1px var(--w98-shadow),
    inset -2px -2px var(--w98-light2),
    inset 2px 2px var(--w98-dark);
  overflow: auto;
  padding: 8px;
}

.inbox-reader-head { border-bottom: 1px solid #d0d0d0; padding-bottom: 6px; margin-bottom: 8px; line-height: 1.6; }
.inbox-reader-body { line-height: 1.6; white-space: pre-wrap; }
.inbox-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 8px;
  background: var(--w98-face);
  box-shadow: inset -1px -1px var(--w98-dark), inset 1px 1px var(--w98-light);
  cursor: var(--cursor-pointer), pointer;
}

.inbox-status {
  padding: 3px 8px;
  border-top: 1px solid var(--w98-shadow);
  box-shadow: inset 0 1px 0 var(--w98-light);
}

/* ═══════════════════ Apagar el equipo ═══════════════════ */

.shutdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 9900;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shutdown-safe {
  color: #ffb000;
  font-family: 'Courier New', monospace;
  font-size: 30px;
  letter-spacing: 2px;
  text-align: center;
}

.shutdown-safe small {
  display: block;
  margin-top: 18px;
  font-size: 14px;
  color: #c08000;
  letter-spacing: 0;
}

.shutdown-note {
  position: absolute;
  bottom: 24px;
  width: 100%;
  text-align: center;
  color: #808080;
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

/* ═══════════════════ Avisos (toast) ═══════════════════ */

.notification-toast {
  padding: 3px;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2),
    2px 2px 0 rgba(0, 0, 0, 0.35);
  font-family: var(--w98-ui-font);
  font-size: 11px;
  animation: none;
}

.notification-header {
  height: 18px;
  padding: 0 3px;
  background: linear-gradient(90deg, var(--w98-navy), var(--w98-navy2));
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.notification-title { color: #fff; font-size: 11px; }
.notification-body { padding: 8px; line-height: 1.5; }

.notification-close {
  width: 16px;
  height: 14px;
  font-size: 0;
  background: var(--w98-face);
  border: 0;
  box-shadow:
    inset -1px -1px var(--w98-dark),
    inset 1px 1px var(--w98-light),
    inset -2px -2px var(--w98-shadow),
    inset 2px 2px var(--w98-light2);
  position: relative;
}

.notification-close::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 3px;
  width: 8px;
  height: 8px;
  background-image:
    linear-gradient(45deg, transparent 42%, #000 42%, #000 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #000 42%, #000 58%, transparent 58%);
}

/* ═══════════════════ Explorador de archivos ═══════════════════ */

.explorer-content {
  background: #fff;
  box-shadow:
    inset -1px -1px var(--w98-light),
    inset 1px 1px var(--w98-shadow),
    inset -2px -2px var(--w98-light2),
    inset 2px 2px var(--w98-dark);
  margin: 3px;
  font-family: var(--w98-ui-font);
  font-size: 11px;
}

.explorer-item { padding: 4px 6px; display: flex; align-items: center; gap: 8px; }
.explorer-item:hover { background: #e8e8f8; }
.explorer-item-name { color: #000; }
.explorer-loading,
.explorer-empty { padding: 10px; color: var(--w98-shadow); }

/* ═══════════════════ Visor de texto ═══════════════════ */

.text-viewer {
  background: #fff;
  font-family: 'Fixedsys', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.35;
  color: #000;
  padding: 4px;
  white-space: pre-wrap;
  box-shadow:
    inset -1px -1px var(--w98-light),
    inset 1px 1px var(--w98-shadow),
    inset -2px -2px var(--w98-light2),
    inset 2px 2px var(--w98-dark);
  margin: 3px;
  height: calc(100% - 6px);
  overflow: auto;
}

/* ═══════════════════ Iconos de 16x16 de la barra de título ═══════════════════ */

.win-ico {
  width: 16px;
  height: 16px;
  position: relative;
  display: block;
  flex-shrink: 0;
}

.win-ico::before,
.win-ico::after { content: ''; position: absolute; }

.win-ico-folder::before {
  left: 1px; top: 3px; width: 14px; height: 9px;
  background: #ffd75e; border: 1px solid #000;
}
.win-ico-folder::after {
  left: 1px; top: 1px; width: 6px; height: 3px;
  background: #ffd75e; border: 1px solid #000; border-bottom: 0;
}

.win-ico-txt::before {
  left: 3px; top: 1px; width: 10px; height: 14px;
  background: #fff; border: 1px solid #000;
}
.win-ico-txt::after {
  left: 5px; top: 4px; width: 6px; height: 1px;
  background: #000; box-shadow: 0 3px 0 #000, 0 6px 0 #000;
}

.win-ico-exe::before {
  left: 1px; top: 2px; width: 14px; height: 12px;
  background: #c0c0c0; border: 1px solid #000;
}
.win-ico-exe::after {
  left: 2px; top: 3px; width: 12px; height: 3px;
  background: #000080;
}

.win-ico-browser::before {
  left: 2px; top: 1px; width: 12px; height: 11px;
  border: 1px solid #000; background: #fff;
  border-radius: 50% !important;
}
.win-ico-browser::after {
  left: 1px; top: 7px; width: 14px; height: 6px;
  background: #1060c0; border: 1px solid #000; border-top: 0;
}

.win-ico-cmd::before {
  left: 1px; top: 1px; width: 14px; height: 14px;
  background: #000; border: 1px solid #808080;
}
.win-ico-cmd::after {
  left: 3px; top: 4px; width: 8px; height: 2px;
  background: #c0c0c0; box-shadow: 0 4px 0 #c0c0c0;
}

.win-ico-mail::before {
  left: 1px; top: 3px; width: 14px; height: 10px;
  background: #fff; border: 1px solid #000;
}
.win-ico-mail::after {
  left: 3px; top: 5px; width: 10px; height: 6px;
  background: linear-gradient(45deg, transparent 46%, #000 46%, #000 54%, transparent 54%),
              linear-gradient(-45deg, transparent 46%, #000 46%, #000 54%, transparent 54%);
}

.win-ico-search::before {
  left: 2px; top: 1px; width: 9px; height: 9px;
  border: 2px solid #000; background: #fff;
  border-radius: 50% !important;
}
.win-ico-search::after {
  left: 10px; top: 10px; width: 6px; height: 2px;
  background: #000; transform: rotate(45deg);
}

.win-ico-cpanel::before {
  left: 1px; top: 3px; width: 14px; height: 11px;
  background: #c0c0c0; border: 1px solid #000;
}
.win-ico-cpanel::after {
  left: 3px; top: 5px; width: 4px; height: 4px;
  background: #ff0000; box-shadow: 6px 0 0 #00a000, 0 5px 0 #0000c0, 6px 5px 0 #f0d000;
}

/* Messenger: dos bocadillos, uno encima del otro */
.win-ico-msgr::before {
  left: 1px; top: 2px; width: 9px; height: 7px;
  background: #fff; border: 1px solid #000;
}
.win-ico-msgr::after {
  left: 6px; top: 7px; width: 8px; height: 6px;
  background: #e8f0ff; border: 1px solid #000;
}

/* Foto: marco con el cielo dentro */
.win-ico-img::before {
  left: 1px; top: 3px; width: 14px; height: 10px;
  background: #fff; border: 1px solid #000;
}
.win-ico-img::after {
  left: 3px; top: 5px; width: 10px; height: 6px;
  background: linear-gradient(180deg, #7fc4ff 0 55%, #3f8f3f 55% 100%);
}

/* Icono genérico de ventana para los botones de la barra de tareas */
.win-ico-window::before {
  left: 2px; top: 3px; width: 11px; height: 9px;
  background: #fff; border: 1px solid #000;
}
.win-ico-window::after {
  left: 2px; top: 3px; width: 11px; height: 3px;
  background: #000080;
}

.win-ico-time::before {
  left: 2px; top: 1px; width: 12px; height: 12px;
  border: 1px solid #000; background: #fff;
  border-radius: 50% !important;
}
.win-ico-time::after {
  left: 7px; top: 4px; width: 2px; height: 5px; background: #000;
  box-shadow: 2px 5px 0 -1px #000;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PANTALLA DE INICIO — el menú del juego es un cuadro del 98, no un menú
   moderno: cristal gris, barra de título azul y botones de verdad.
   ═══════════════════════════════════════════════════════════════════════════ */

/* La pantalla de inicio es el escritorio del PC con su cuadro encima, no un
   menu moderno sobre negro. Ojo: nunca dejar esto sin opacity, porque la regla
   base de .title-menu arranca en opacity 0 y se quedaria invisible. */
.title-menu {
  opacity: 1;
  animation: none !important;
  background: #0a0a0a url('../assets/Fondo de pantalla.jpg') center / cover no-repeat !important;
  justify-content: center !important;
  padding: 0 16px !important;
}

.title-window {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  padding: 2px;
  width: min(94vw, 470px);
  max-height: 96vh;
  overflow: auto;
}

.title-window-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
}

.title-window-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: url('../assets/Logo.png') center / contain no-repeat;
}

.title-window-title { flex: 1; }

.title-window-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
}

.title-menu-main {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 10px;
  position: relative;
  margin-top: 0;
  width: 100%;
}

.title-menu-main .menu-logo {
  filter: none;
  image-rendering: pixelated;
  max-height: 24vh;
}

.title-btn,
.title-btn--secondary,
.chapter-btn,
.settings-btn,
.title-chapter-menu button,
.settings-panel button {
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif !important;
  font-size: 12px !important;
  font-weight: normal !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
  color: #000 !important;
  background: #c0c0c0 !important;
  border: 2px solid !important;
  border-color: #ffffff #0a0a0a #0a0a0a #ffffff !important;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf !important;
  border-radius: 0 !important;
  transition: none !important;
  padding: 5px 12px !important;
  margin-top: 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 92px;
  transform: none !important;
}

.title-btn:active,
.title-btn--secondary:active,
.chapter-btn:active,
.settings-panel button:active {
  border-color: #0a0a0a #ffffff #ffffff #0a0a0a !important;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #dfdfdf !important;
  padding: 6px 11px 4px 13px !important;
}

.title-btn:focus,
.title-btn--secondary:focus,
.chapter-btn:focus {
  outline: 1px dotted #000 !important;
  outline-offset: -4px !important;
}

.title-menu-actions { gap: 6px; width: 100%; }
.title-menu-actions .title-btn { min-width: 168px; font-weight: bold !important; }

/* los botones secundarios, en dos columnas iguales: nada de filas torcidas */
.title-menu-subactions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  flex-direction: row !important;
  flex-wrap: wrap;
}
.title-menu-subactions .title-btn { width: 100% !important; min-width: 0; }

@media (max-width: 420px) {
  .title-menu-subactions { grid-template-columns: minmax(0, 1fr); }
}

.title-menu-footer {
  width: 100%;
  padding-bottom: 0;
  gap: 2px;
  border-top: 1px solid #808080;
  box-shadow: 0 1px 0 #ffffff;
  padding-top: 8px;
}

.title-credit,
.title-copyright {
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: #404040;
  text-shadow: none;
  letter-spacing: 0;
}

/* Opciones y ayuda: diálogos del 98 encima del escritorio */
.settings-panel {
  background: rgba(0, 0, 0, 0.62) !important;
  animation: none !important;
}

.settings-panel.active { display: flex !important; }

.settings-panel > * { max-width: 460px; }

/* el nombre ya va en la barra de titulo del cuadro: no se repite dentro */
.settings-panel .settings-title { display: none; }

.title-help::before { content: 'Ayuda'; }

.settings-panel::before {
  content: 'Opciones';
  align-self: center;
  width: min(90vw, 460px);
  padding: 3px 6px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  margin-top: 4px;
}

.settings-panel .settings-title,
.settings-panel .settings-label,
.settings-panel .settings-row { font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif; letter-spacing: 0; text-shadow: none; }

.title-chapter-menu {
  background: #c0c0c0 !important;
  border: 2px solid !important;
  border-color: #ffffff #0a0a0a #0a0a0a #ffffff !important;
  border-radius: 0 !important;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf !important;
}

.title-chapter-menu h2 {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff !important;
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif !important;
  font-size: 12px !important;
  padding: 3px 6px !important;
  margin: 0 0 12px !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

.title-chapter-menu .chapter-btn { width: 100% !important; text-align: center; margin-bottom: 6px !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   APAGAR EL EQUIPO — el cuadro del 98, con su lista de radios
   ═══════════════════════════════════════════════════════════════════════════ */
.shutdown-dlg {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif;
  font-size: 11px;
  color: #000;
}

.shutdown-title { font-size: 12px; }

.shutdown-list { display: flex; flex-direction: column; gap: 6px; }

.shutdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: var(--cursor-pointer), pointer;
}

.shutdown-radio {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  border-radius: 50% !important;
  position: relative;
}

.shutdown-row.is-on .shutdown-radio::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: #000;
  border-radius: 50% !important;
}

.shutdown-nota { color: #404040; padding-left: 20px; }

.shutdown-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.shutdown-btn {
  min-width: 76px;
  padding: 4px 10px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #0a0a0a #0a0a0a #ffffff;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
  font-family: inherit;
  font-size: 11px;
  color: #000;
  cursor: var(--cursor-pointer), pointer;
}

.shutdown-btn:active {
  border-color: #0a0a0a #ffffff #ffffff #0a0a0a;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #dfdfdf;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LA GUÍA
   Lo que toca abrir parpadea como parpadeaban las cosas en el 98: la etiqueta
   del icono se pone azul de selección y vuelve, y el botón de la barra de
   tareas se enciende como cuando un programa te reclama. Se apaga en cuanto
   lo abres.
   ═══════════════════════════════════════════════════════════════════════════ */

.desktop-icon.aviso-parpadeo .desktop-icon-label,
.trash-icon.aviso-parpadeo .trash-icon-label {
  animation: aviso-etiqueta 1.1s steps(1, end) infinite;
}

@keyframes aviso-etiqueta {
  0% { background: #000080; color: #fff; outline: 1px dotted #ffff80; }
  50% { background: transparent; color: inherit; outline: none; }
}

.desktop-icon.aviso-parpadeo .icon-box,
.trash-icon.aviso-parpadeo .trash-icon-img {
  animation: aviso-icono 1.1s steps(1, end) infinite;
}

@keyframes aviso-icono {
  0% { filter: brightness(1.35) contrast(1.1); }
  50% { filter: none; }
}

.taskbar-btn.aviso-parpadeo {
  animation: aviso-boton 1.1s steps(1, end) infinite;
}

@keyframes aviso-boton {
  0% { background: #000080; color: #fff; }
  50% { background: #c0c0c0; color: #000; }
}

/* El globo que señala algo se puede pulsar para abrirlo */
.tray-balloon.tray-balloon-link { cursor: var(--cursor-pointer), pointer; }

/* Atrás, Adelante y Detener, apagados cuando no tienen nada que hacer */
.ie-tb[disabled] { opacity: 0.45; filter: grayscale(1); pointer-events: none; }

/* El enlace que deja un forero en su mensaje */
.forum-post-link { color: #0000cc; text-decoration: underline; cursor: var(--cursor-pointer), pointer; }

.ie-blank { min-height: 100%; background: #fff; }

/* El icono del volumen de la bandeja: un altavoz de 16x16 dibujado con cajas
   (antes se quedaba en blanco: los pseudoelementos no tenían contenido) */
.tray-icon-glyph { position: relative; }
.tray-icon-glyph::before,
.tray-icon-glyph::after { content: ''; position: absolute; }
.tray-icon-glyph.app-ico-sound::before { left: 2px; top: 5px; width: 4px; height: 6px; background: #000; border: 0; box-shadow: none; }
.tray-icon-glyph.app-ico-sound::after {
  left: 5px; top: 2px; width: 0; height: 0; background: none; box-shadow: none;
  border-style: solid; border-color: transparent #000 transparent transparent; border-width: 6px 7px 6px 0;
}

/* ── La pista de la bandeja: un globo amarillo con una interrogación.
   Se rellena mientras hay algo pendiente ── */
.tray-icon-glyph.app-ico-pista::before {
  content: '?'; left: 2px; top: 1px; width: 11px; height: 11px;
  background: #ffffe1; border: 1px solid #000; color: #000;
  font: bold 9px/11px Tahoma, sans-serif; text-align: center;
}
.tray-icon-glyph.app-ico-pista::after {
  left: 4px; top: 12px; width: 0; height: 0; background: none;
  border-style: solid; border-color: #000 transparent transparent transparent; border-width: 3px 3px 0 0;
}
.tray-pista:not(.tray-pista--activa) .tray-icon-glyph.app-ico-pista::before { background: #c0c0c0; color: #555; }

/* La guía manda a la casa: Inicio parpadea, y dentro «Levantarse» */
.taskbar-start.aviso-parpadeo,
.start-menu-item.aviso-parpadeo { animation: aviso-boton 1.1s steps(1, end) infinite; }

/* ═══════════════════════════════════════════════════════════════════════════
   PANTALLA DE INICIO — «Bienvenido a NO LO BORRES», como el «Bienvenido a
   Windows 98»: a la izquierda las entradas en una columna; a la derecha el
   logo sobre negro y qué hace la entrada que señalas. Nada suelto en el centro.
   ═══════════════════════════════════════════════════════════════════════════ */
.title-window { width: min(94vw, 640px); }
.title-window-body { align-items: stretch !important; padding: 10px 10px 8px !important; gap: 8px !important; }

.title-menu-main.title-bienvenida {
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

/* La lista: un hueco hundido con las entradas planas, que se levantan al pasar */
.title-entries {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #0a0a0a;
}
.title-window .title-entry {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100% !important;
  min-width: 0;
  text-align: left;
  padding: 6px 8px !important;
  background: transparent !important;
  border: 2px solid transparent !important;
  box-shadow: none !important;
}
.title-window .title-entry:hover,
.title-window .title-entry:focus {
  background: #c0c0c0 !important;
  border-color: #ffffff #0a0a0a #0a0a0a #ffffff !important;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf !important;
  outline: none !important;
}
.title-window .title-entry:focus .title-entry-label { outline: 1px dotted #000; outline-offset: 1px; }
.title-window .title-entry:active {
  border-color: #0a0a0a #ffffff #ffffff #0a0a0a !important;
  box-shadow: inset 1px 1px 0 #808080 !important;
  padding: 7px 7px 5px 9px !important;
}
.title-entry-label { font-size: 12px; letter-spacing: 0.5px; }
.title-entry--main .title-entry-label { font-weight: bold; font-size: 13px; }
.title-entry-ico { width: 28px; height: 28px; flex-shrink: 0; background: center / contain no-repeat; }
.title-entry-ico--jugar { background-image: url('../assets/menu/jugar.svg'); }
.title-entry-ico--seguir { background-image: url('../assets/menu/seguir.svg'); }
.title-entry-ico--nueva { background-image: url('../assets/menu/nueva.svg'); }
.title-entry-ico--capitulos { background-image: url('../assets/menu/capitulos.svg'); }
.title-entry-ico--finales { background-image: url('../assets/menu/finales.svg'); }
.title-entry-ico--opciones { background-image: url('../assets/menu/opciones.svg'); }
.title-entry-ico--ayuda { background-image: url('../assets/menu/ayuda.svg'); }

/* El panel: el logo sobre negro (como la foto del «Bienvenido») y debajo la explicación */
.title-panel {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #0a0a0a;
}
.title-panel-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: radial-gradient(ellipse at center, #2a0000 0%, #050505 70%);
  border-bottom: 1px solid #808080;
}
.title-panel-banner .menu-logo {
  max-height: 130px !important;
  max-width: 88%;
  margin: 0 !important;
  image-rendering: auto !important;
  filter: drop-shadow(0 0 10px rgba(160, 0, 0, 0.45)) !important;
}
.title-panel-text { padding: 12px 14px; font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif; color: #000; }
.title-desc-title { font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.title-desc-text { font-size: 12px; line-height: 1.5; color: #202020; }

.title-menu-footer { text-align: center; padding-top: 6px !important; }
.title-menu-footer .title-credit { font-size: 11px; color: #404040; }

@media (max-width: 560px) {
  .title-menu-main.title-bienvenida { grid-template-columns: minmax(0, 1fr); }
  .title-panel { order: -1; min-height: 0; }
  .title-panel-text { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ICONOS Y GUÍA, MÁS CLAROS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Las etiquetas parten por palabras («Mis / documentos», nunca «documento / s»),
   también con fuentes más anchas que Tahoma */
.desktop-icon { width: 80px; }
.desktop-icon-label { max-width: 78px; word-break: normal; overflow-wrap: break-word; }

/* Lo que toca parpadea más claro: un halo amarillo y una marca «!» */
.desktop-icon.aviso-parpadeo .icon-box,
.trash-icon.aviso-parpadeo .trash-icon-img { animation: aviso-halo 1.1s ease-in-out infinite; }
@keyframes aviso-halo {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 225, 77, 0)) brightness(1); }
  50% { filter: drop-shadow(0 0 7px #ffe14d) drop-shadow(0 0 2px #ffe14d) brightness(1.3); }
}
.desktop-icon.aviso-parpadeo::after {
  content: '!';
  position: absolute;
  top: 0;
  right: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffe14d;
  border: 1px solid #000;
  color: #000;
  font: bold 11px/15px Tahoma, Verdana, sans-serif;
  text-align: center;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
  animation: aviso-marca 1.1s steps(1, end) infinite;
}
@keyframes aviso-marca { 0% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* La pista de la bandeja: una bombilla con la palabra «Pista», que se
   enciende mientras hay algo pendiente */
.tray-icon.tray-pista { width: auto; padding: 0 5px 0 2px; gap: 3px; height: 20px; border: 1px solid transparent; }
.tray-pista-img { width: 16px; height: 16px; filter: grayscale(1) opacity(0.6); }
.tray-pista-texto { font: 11px var(--w98-ui-font, Tahoma, sans-serif); color: #404040; }
.tray-pista.tray-pista--activa { background: #ffffe1; border-color: #808080; animation: pista-viva 1.6s ease-in-out infinite; }
.tray-pista.tray-pista--activa .tray-pista-img { filter: none; }
.tray-pista.tray-pista--activa .tray-pista-texto { color: #000; font-weight: bold; }
@keyframes pista-viva { 0%, 100% { box-shadow: 0 0 0 rgba(255, 225, 77, 0); } 50% { box-shadow: 0 0 6px 1px #ffe14d; } }

/* El globo: más grande, con su «i», y entra con un saltito */
.tray-balloon { width: 290px; padding: 10px 26px 10px 44px; font-size: 12px; animation: globo-entra 0.25s ease-out; }
.tray-balloon-ico { position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; }
.tray-balloon-title { font-size: 12px; }
@keyframes globo-entra { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
/* (la barra de tareas quita todas las animaciones con !important: la pista es la excepción) */
.taskbar .tray-pista.tray-pista--activa { animation: pista-viva 1.6s ease-in-out infinite !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   VENTANAS DEL MENÚ PRINCIPAL
   Capítulos, finales, opciones y ayuda conservan el escritorio detrás. El
   marco, la barra azul y la X son de verdad; no hay títulos dibujados con
   pseudoelementos ni pantallas negras a página completa.
   ═══════════════════════════════════════════════════════════════════════════ */
.title-dialog-window {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 100001;
  width: min(92vw, 460px);
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.45);
}
.title-dialog-body {
  max-height: calc(88vh - 28px);
  overflow: auto;
  align-items: stretch;
}
.title-window-close {
  flex: 0 0 auto;
  width: 20px !important;
  min-width: 20px !important;
  height: 18px;
  padding: 0 0 2px !important;
  margin: 0 0 0 4px !important;
  border: 1px solid !important;
  border-color: #fff #0a0a0a #0a0a0a #fff !important;
  background: #c0c0c0 !important;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf !important;
  color: #000 !important;
  font: bold 13px/14px Tahoma, sans-serif !important;
  text-align: center;
}
.title-window-close:active {
  border-color: #0a0a0a #fff #fff #0a0a0a !important;
}

.settings-panel {
  padding: 18px;
  background: rgba(0, 0, 0, 0.38) !important;
}
.settings-panel::before,
.title-help::before { content: none !important; display: none !important; }
.settings-panel > .title-dialog-window {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: min(92vw, 430px);
  max-width: 92vw;
  max-height: 86vh;
}
.settings-panel > .title-dialog-window.help-window { width: min(92vw, 620px); }
.settings-panel .title-dialog-body { gap: 12px; padding: 14px; }
.settings-panel .settings-row {
  width: 100%;
  max-width: none;
  padding: 8px 0;
  color: #000;
  background: transparent;
  border: 0;
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif;
}
.settings-panel .settings-label { color: #000; }
.settings-panel .settings-back { align-self: flex-end; }
.title-help .title-help-body {
  max-width: none;
  max-height: 56vh;
  padding: 10px 12px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  color: #111;
  font-family: 'MS Sans Serif', Tahoma, Verdana, sans-serif;
  font-size: 12px;
  line-height: 1.5;
}
.title-help .title-help-lead { color: #111; }
.title-help .title-help-sub { color: #000080; }
.title-help .title-help-item { color: #222; }

.title-chapter-menu.title-dialog-window {
  inset: auto;
  left: 50%;
  top: 50%;
  display: block;
  width: min(92vw, 420px);
  padding: 2px;
  gap: 0;
}
.title-chapter-menu .title-dialog-body { padding: 12px; gap: 6px; }
.title-chapter-menu .chapter-btn { margin: 0 0 6px !important; }
.title-chapter-menu .chapter-btn:last-child { margin-bottom: 0 !important; }
.title-endings-menu.title-dialog-window { width: min(94vw, 660px); }

/* La pista pertenece a la bandeja, pegada a su botón y alineada a la
   izquierda. Nunca se presenta como un cartel en el centro de la pantalla. */
.tray-balloon {
  right: 6px;
  bottom: 36px;
  max-width: calc(100vw - 12px);
  text-align: left;
  transform-origin: bottom right;
}
