/* General Styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: url('win98-bg.png') no-repeat center center fixed;
  background-size: cover;
  color: #000;
}

/* Desktop Icon Styles */
#desktop {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  position: relative;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: black;
  width: 80px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.desktop-icon img {
  width: 64px;
  height: 64px;
  margin-bottom: 5px;
}

.desktop-icon p {
  font-size: 14px;
  margin: 0;
}

.desktop-icon:hover {
  transform: scale(1.1);
}

/* Custom Size for Tired Icon */
.desktop-icon[data-id="tired"] img {
  width: 40px;
  height: 40px;
}

/* Taskbar Styles */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(to bottom, #3399FF, #3399FF); /* XP gradient */
  border-top: 2px solid #2b4f7b;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

/* Start Button */
#start-button {
  width: 140px;
  height: 85px;
  background: url('start-xp-icon.png') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  padding: 2px;
  margin-left: -7px; /* Moves the Start button closer to the left */
  margin-bottom: -10px; /* Moves the Start button down */
  /*margin-right: 5px;*/
  transition: transform 0.2s ease-in-out;
}

#start-button:hover {
  transform: scale(1.12);
}

#start-button:active {
  transform: scale(0.95);
}

#start-button::after {
  content: "Start";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-family: 'Tahoma', sans-serif;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 5px;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

#start-button:hover::after {
  opacity: 1;
}

/* Taskbar Clock */
#taskbar-clock {
  margin-left: auto;
  color: white;
  font-family: 'Tahoma', sans-serif;
  font-size: 14px;
  text-shadow: 1px 1px 0 #2b4f7b;
  padding-right: 27px;
}

/* Start Menu */
#start-menu {
  position: fixed;
  bottom: 60px;
  left: 10px;
  width: 200px;
  background: #f0f0f0;
  border: 2px solid #3e7bb6;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
  z-index: 200;
}

#start-menu ul {
  list-style: none;
  margin: 0;
  padding: 10px;
}

#start-menu li {
  padding: 5px 10px;
}

#start-menu li button {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  padding: 5px;
  font-size: 14px;
  color: #000;
  font-family: 'Tahoma', sans-serif;
  transition: background 0.2s ease;
}

#start-menu li button:hover {
  background: #cce5f6;
}

/* Main Content Styles */
#main-content {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 60%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #2b4f7b;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
  padding: 10px;
  overflow-y: auto;
  z-index: 10;
}

.hidden {
  display: none !important;
}

/* Window Controls */
#window-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: linear-gradient(to bottom, #3399FF, #3399FF); /* XP title bar */
  color: white;
  padding: 6px;
  border-bottom: 2px solid #2b4f7b;
}

#window-controls button {
  width: 25px;
  height: 25px;
  font-family: 'Tahoma', sans-serif;
  font-size: 14px;
  background: #e0e0e0;
  border: 1px solid #808080;
  cursor: pointer;
  margin: 0 2px;
  transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
}

#window-controls button:hover {
  background: #d0d0d0;
}

#window-controls button:active {
  transform: translateY(1px);
  background: #c0c0c0;
}

/* Minimized Windows */
#minimized-windows {
  display: flex;
  gap: 5px;
  max-width: 50%;
  overflow-x: auto;
  padding: 0 10px;
}

.taskbar-item {
  background: #bfcde0;
  border: 1px solid #808080;
  padding: 5px 10px;
  font-family: 'Tahoma', sans-serif;
  font-size: 14px;
  cursor: pointer;
  border-radius: 3px;
}

.taskbar-item:hover {
  background: #d0d0d0;
}

/* Popup Games Window */
#popup-games {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #2b4f7b;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.5);
  z-index: 5;
  display: flex;
  flex-direction: column;
}

#games-folder {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  flex-wrap: wrap;
}

.game-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  width: 80px;
  text-align: center;
  cursor: pointer;
}

.game-icon img {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
  transition: transform 0.2s;
}

.game-icon img:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.game-icon p {
  font-size: 12px;
  color: black;
}
#bsod-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('bsod-screenshot.png') no-repeat center center; /* Center the image */
  background-size: cover; /* Make the image cover the entire screen */
  z-index: 9999; /* Ensure it is above all other elements */
}

#bsod-screen.hidden {
  display: none;
}
.drag-handle {
  cursor: move; /* Indicates draggable area */
}
.window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centers the window */
  display: none; /* Initially hidden */
}

.window.hidden {
  display: none; /* Hidden class ensures windows stay hidden initially */
}

.window:not(.hidden) {
  display: flex; /* Use flexbox for better alignment */
  flex-direction: column; /* Stack elements inside the window */
}
