/* === Grundlayout === */
body {
  margin: 0;
  font-family: "MS Sans Serif", Arial, sans-serif;
  background: #008080;
  color: #000;
}

.desktop {
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* === Allgemeine Fenster === */
.window {
  position: absolute;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080, -2px -2px 0 #fff;
  font-size: 14px;
  width: auto;          /* Fenster so breit wie nötig */
  height: auto;         /* Fensterhöhe = Inhalt */
  display: inline-block; /* Damit es sich anpasst */
}


.window-header {
  background: linear-gradient(180deg, #000080 0%, #000060 100%);
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
}

.window-body {
  background: #dcdcdc;
  padding: 10px;
  min-height: 100px;
}

/* === Buttons === */
button {
  background: #d4d0c8;
  border: 2px outset #fff;
  padding: 4px 10px;
  font-family: "MS Sans Serif";
  cursor: pointer;
}

button:active {
  border: 2px inset #808080;
}

/* === Taskleiste === */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  box-shadow: inset 0 2px #808080;
  z-index: 9999;
  overflow: hidden;
}

.start-btn {
  background: #d4d0c8;
  border: 2px outset #fff;
  padding: 4px 10px;
  font-weight: bold;
  cursor: pointer;
}

.clock {
  font-size: 14px;
  font-family: "MS Sans Serif";
}

/* === Fortschrittsbalken === */
.fill {
  transition: width 0.5s ease-in-out;
  background: linear-gradient(90deg, #00aa00 0%, #66ff66 100%);
}

.fill.normal {
  background: linear-gradient(90deg, #00aa00 0%, #66ff66 100%);
}

.fill.warning {
  background: linear-gradient(90deg, #ffaa00 0%, #ff6600 100%);
}

.fill.critical {
  background: linear-gradient(90deg, #ff0000 0%, #aa0000 100%);
}

/* === Statusfenster === */
#statusWindow.status {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 220px;
  background: #e0e0e0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080;
  font-family: "MS Sans Serif", sans-serif;
  font-size: 13px;
}

#statusWindow .title-bar {
  background: navy;
  color: white;
  padding: 2px 5px;
  font-weight: bold;
}

#statusWindow .window-body {
  background: #dcdcdc;
  padding: 6px 10px;
}

#statusTable {
  width: 100%;
}

#statusTable td:first-child {
  font-weight: bold;
}

#statusTable td:last-child {
  text-align: right;
  min-width: 50px;
}

/* === EmotiOS Fenster === */
.window.emoti {
  position: absolute;
  top: 100px;
  left: 400px;
  width: 480px;
  height: auto;
  background: #d0d0d0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080, -2px -2px 0 #fff;
  font-family: "MS Sans Serif", Arial, sans-serif;
  user-select: none;
}

.window.emoti .window-header {
  background: linear-gradient(180deg, #000080 0%, #000060 100%);
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
  cursor: move;
}

.emoti-face {
  text-align: center;
  margin-bottom: 10px;
}

.emoti-face img {
  width: 45px;
  height: 45px;
  image-rendering: pixelated;
  border: 2px solid #808080;
  background: #000;
  padding: 4px;
}

.emoti-textbox {
  background: #f0f0f0;
  border: 2px inset #808080;
  padding: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
  min-height: 100px;
}

/* === Systemsteuerung === */
#controlPanel {
  border: 2px solid #000080;
  box-shadow: 3px 3px 0 #808080, -2px -2px 0 #fff;
  background: #c0c0c0;
  width: 600px;
}

#controlPanel .title-bar {
  background: linear-gradient(180deg, #000080 0%, #000060 100%);
  color: #fff;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 10px;
  height: 26px;
  border-bottom: 2px solid #000040;
  box-shadow: inset 1px 1px #3a3a3a, inset -1px -1px #8080ff;
}

.window-controls {
  display: flex;
  gap: 4px;
}

.window-controls span {
  background: #000060;
  color: #fff;
  font-weight: bold;
  border: 1px solid #000;
  padding: 0 6px;
  cursor: pointer;
}

.window-controls span:hover {
  background: #2020a0;
}

#controlPanel .window-body {
  background: #d4d0c8;
  padding: 10px;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #808080;
}

#buttonGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

#buttonGrid button {
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: "MS Sans Serif";
  font-size: 12px;
  padding: 4px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

#buttonGrid button:hover {
  background: #e0e0e0;
}

/* === Startmenü === */
.start-menu {
  position: fixed;
  bottom: 40px;
  left: 10px;
  width: 180px;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080;
  display: flex;
  flex-direction: column;
  z-index: 9998;
}

.start-menu button {
  background: #dcdcdc;
  border: none;
  text-align: left;
  padding: 6px 10px;
  font-family: "MS Sans Serif";
  cursor: pointer;
}

.start-menu button:hover {
  background: #000080;
  color: #fff;
}
/* === Emoti-Aktionsleiste === */
.emoti-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.emoti-actions button {
  background: #d4d0c8;
  border: 2px outset #fff;
  font-family: "MS Sans Serif";
  font-size: 14px;
  padding: 6px 16px;
  cursor: pointer;
}

.emoti-actions button:hover {
  background: #e0e0e0;
}

.emoti-actions button:active {
  border: 2px inset #808080;
}

/* === Desktop-Icons === */
.desktop-icon {
  position: absolute;
  top: 40px;
  left: 40px;
  width: 80px;
  text-align: center;
  cursor: pointer;
  font-family: "MS Sans Serif";
  color: white;
  user-select: none;
}

.desktop-icon img {
  width: 48px;
  height: 48px;
  display: block;
  margin: 0 auto 4px auto;
  image-rendering: pixelated;
}

/* === Kontextmenü des Papierkorbs === */
.context-menu {
  position: absolute;
  top: 60px;
  left: 0;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080;
  display: flex;
  flex-direction: column;
  z-index: 2000;
}

.context-menu button {
  background: #d4d0c8;
  border: none;
  padding: 6px 12px;
  text-align: left;
  font-family: "MS Sans Serif";
  cursor: pointer;
}

.context-menu button:hover {
  background: #000080;
  color: white;
}

.hidden {
  display: none;
}
.start-menu .menu-separator {
  border-top: 2px solid #808080;
  border-bottom: 2px solid #fff;
  margin: 6px 0;
}
/* === Ruhemodus-Overlay === */
#sleepOverlay {
  position: fixed;
  inset: 0;
  background: #000;
  color: #c0c0c0;                /* Hellgrau passend zum Rest */
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 10000;
}

#sleepOverlay.hidden {
  display: none;
}

.sleep-message p {
  margin-bottom: 20px;
  text-align: center;
}

#sleepOverlay button {
  background: #d4d0c8;           /* Standard-Win98-Grau */
  color: #000;
  border: 2px outset #fff;
  padding: 6px 18px;
  font-family: "MS Sans Serif";
  font-size: 14px;
  cursor: pointer;
}

#sleepOverlay button:hover {
  background: #e0e0e0;
}

/* === Neustart-Overlay === */
#restartOverlay {
  position: fixed;
  inset: 0;
  background: #000;
  color: #c0c0c0;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 999999; /* über ALLEM, sogar der Taskleiste */

}

#restartOverlay.hidden {
  display: none;
}

.restart-message p {
  margin-bottom: 20px;
  text-align: center;
}

.progress-bar {
  width: 300px;
  height: 18px;
  background: #202020;
  border: 2px inset #808080;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #000080 0%, #0000ff 100%);
  transition: width 0.3s linear;
}
/* === Bluescreen-Overlay === */
#bluescreenOverlay {
  position: fixed;
  inset: 0;
  background: #0000aa;
  color: #ffffff;
  font-family: "Lucida Console", monospace;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  z-index: 999999;
}

#bluescreenOverlay.hidden {
  display: none;
}

.bsod-content {
  width: 80%;
  max-width: 900px;
  white-space: pre-wrap;
}
@keyframes glitchEffect {
  0% { transform: translate(1px, -1px) rotate(0deg); }
  20% { transform: translate(-2px, 2px) rotate(-0.5deg); }
  40% { transform: translate(-3px, 1px) rotate(0.5deg); }
  60% { transform: translate(2px, 3px) rotate(0deg); }
  80% { transform: translate(-1px, -2px) rotate(0.3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
/* === Installations-Overlay (bereinigt) === */
.install-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #e0e0e0;
  font-family: "Consolas", monospace;
  font-size: 1.1em;
  padding: 50px;
  white-space: pre-line;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.install-screen.hidden {
  display: none;
  pointer-events: none; /* blockiert keine Klicks */
}

.install-screen.fade-out {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none; /* Klicks wieder freigeben */
}

#installText {
  display: block;
  min-height: 250px;
  margin-bottom: 60px;
  width: 80%;
}

#nameInputSection {
  text-align: center;
  margin-top: 40px;
}

#nameInputSection input {
  background: #111;
  border: 1px solid #00ff99;
  color: #00ff99;
  padding: 8px;
  font-family: inherit;
}

#nameInputSection button {
  background: #00ff99;
  color: #000;
  border: none;
  padding: 8px 16px;
  margin-left: 10px;
  cursor: pointer;
  font-weight: bold;
}
/* === Defragmentierungs-Overlay (Win98-Look) === */
.defrag-overlay {
  position: fixed;
  inset: 0;
  background: rgba(192,192,192,0.95);   /* klassisches Grau */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 999999;
  font-family: "MS Sans Serif", Arial, sans-serif;
  color: #000;
}

.defrag-window {
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080, -2px -2px 0 #fff;
  width: 360px;
  padding: 10px;
  text-align: left;
}

.defrag-window p {
  margin: 0 0 10px 0;
  font-size: 13px;
}

.progress-bar {
  width: 100%;
  height: 18px;
  background: #d4d0c8;
  border: 2px inset #808080;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg,#000080 0%,#0000ff 100%);
  transition: width 0.6s linear;
}
/* === Herzchen bei Kokett === */
.heart {
  position: fixed;
  bottom: 0;
  left: 50%;
  font-size: 18px;
  color: #ff4da6;
  opacity: 0.9;
  animation: floatHeart 3s linear forwards;
  pointer-events: none;
}

@keyframes floatHeart {
  0%   { transform: translateY(0) scale(1);   opacity: 1; }
  100% { transform: translateY(-150vh) scale(1.5); opacity: 0; }
}

/* === Fensterleisten-Farbe bei Kokett === */
.kokett-theme .window-header {
  background: #ffb6c1 !important; /* zartrosa */
  color: #000 !important;
  border-bottom: 1px solid #ff69b4;
}

}
/* === Firewall Defense Fenster (neu, Win98-Stil) === */
.window.firewall {
  width: 480px;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #808080, -2px -2px 0 #fff;
  font-family: "MS Sans Serif", Arial, sans-serif;
  color: #000;
}

.window.firewall .window-header {
  background: linear-gradient(180deg, #000080 0%, #000060 100%);
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
  cursor: move;
}

.window.firewall .window-header button {
  background: #d4d0c8;
  border: 1px solid #000;
  width: 18px;
  height: 18px;
  font-weight: bold;
  cursor: pointer;
  line-height: 14px;
  text-align: center;
}

.window.firewall .window-header button:hover {
  background: #e0e0e0;
}

.window.firewall .window-body {
  background: #dcdcdc;
  padding: 8px;
  box-sizing: border-box;
}

.firewall-console {
  background: #000;
  color: #00ff00;
  font-family: "Consolas", monospace;
  font-size: 13px;
  height: 160px;
  overflow-y: auto;
  border: inset 2px #808080;
  padding: 6px;
}

.firewall-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.firewall-controls .buttons {
  display: flex;
  gap: 6px;
}

.firewall-controls button {
  background: #d4d0c8;
  border: 2px outset #fff;
  padding: 4px 10px;
  font-family: "MS Sans Serif";
  cursor: pointer;
}

.firewall-controls button:active {
  border: 2px inset #808080;
}

.firewall-controls .status {
  font-size: 13px;
  font-weight: bold;
}

.firewall-footer {
  margin-top: 8px;
  font-size: 12px;
  color: #222;
  background: #c0c0c0;
  border-top: 1px solid #999;
  padding-top: 4px;
}


/* === Sanfter Wut-Effekt === */
.angry-theme .window-header {
  background: linear-gradient(180deg, #ff4040 0%, #a00000 100%) !important;
  animation: angryPulse 2s ease-in-out infinite;
}

@keyframes angryPulse {
  0%   { background-color: rgba(255, 0, 0, 0.05); }
  50%  { background-color: rgba(255, 0, 0, 0.15); }
  100% { background-color: rgba(255, 0, 0, 0.05); }
}

.blackout {
  background: #000;
  transition: background 2s ease;
}

.dirtSpot {
  position: fixed;
  cursor: pointer;
  z-index: 5000;
  opacity: 0.9;
  filter: drop-shadow(0 0 4px rgba(0,0,0,0.4));
  transition: transform 0.2s ease, opacity 0.3s ease;
}
.dirtSpot:hover {
  transform: scale(1.2);
  opacity: 1;
}
.dirtSpot {
  image-rendering: pixelated; /* oder crisp-edges, je nach Browser */
}
/* Dreckwolken smooth ein-/ausblenden */
.dirtSpot {
  position: absolute;
  opacity: 0;
  transform: scale(0.9);           /* kleiner starten */
  transition: opacity 240ms ease, transform 240ms ease;
  will-change: opacity, transform; /* Browser-Hilfe */
  pointer-events: auto;
}

.dirtSpot.show {
  opacity: 1;
  transform: scale(1);
}
.desktop-icon {
  width: 72px; /* oder was du nutzt */
  text-align: center;
  user-select: none;
}
.desktop-icon img {
  display: block;
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  margin: 0 auto 4px;
}
.desktop-icon img {
  display:block;
  width:48px;
  height:48px;
  image-rendering: pixelated;
  margin:0 auto 4px;
}
/* Einheitliche Desktop-Icon-Slots */
.desktop-icon {
  position: absolute;
  left: 16px;           /* Spalte links */
  width: 110px;         /* genug für Text */
  height: 120px;        /* FIX: fester Slot verhindert Überlappung */
  text-align: center;
  user-select: none;
}

.desktop-icon img {
  display: block;
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  margin: 0 auto 6px;
}

.desktop-icon > div {
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
}

#internetIcon .icon,
#arcadeIcon .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  image-rendering: pixelated;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#internetIcon .icon { background-image: url("img/internet.png"); }
#arcadeIcon  .icon { background-image: url("img/arcade.png"); }

#terminalWindow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 260px;
  background: #c0c0c0;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #808080, -2px -2px 0 #fff;
  z-index: 3000;
  display: none;
}

#terminalWindow.active { display: block; }

#terminalWindow .window-header {
  background: linear-gradient(180deg, #000080 0%, #000060 100%);
  color: white;
  font-weight: bold;
  padding: 4px 8px;
  cursor: move;
  border-bottom: 2px solid #808080;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#terminalWindow .window-body {
  background: #dcdcdc;
  padding: 8px;
  height: calc(100% - 32px);
  display: flex;
  flex-direction: column;
}

#terminalOutput {
  flex: 1;
  overflow-y: auto;
  background: #000;
  color: #fff; /* Weiß statt grün */
  font-family: "Lucida Console", monospace;
  font-size: 13px;
  padding: 6px;
  border: inset 2px #808080;
}


#terminalInput {
  border: inset 2px #808080;
  padding: 4px;
  font-family: "Lucida Console", monospace;
  font-size: 13px;
  outline: none;
}

#contactWindow input, 
#contactWindow textarea {
  font-family: "MS Sans Serif";
  font-size: 13px;
  background: #fff;
  border: inset 2px #808080;
  padding: 3px;
}

#contactWindow button {
  border: 2px outset #fff;
  background: #d4d0c8;
  font-family: "MS Sans Serif";
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
}

#contactWindow button:hover {
  background: #e0e0e0;
}
