/* Windows XP Authentic Styling */

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

body {
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
  font-size: 11px;
  overflow: hidden;
  user-select: none;
  cursor: default;
}

/* Desktop */
.desktop {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1a5490 0%, #2e7db8 50%, #4FC3F7 100%);
  position: relative;
  overflow: hidden;
}

/* Desktop Icons */
.desktop-icons {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, 80px);
  gap: 20px;
  max-width: 400px;
}

.desktop-icon {
  width: 80px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
  padding: 8px 5px;
  border-radius: 2px;
  transition: background-color 0.1s ease;
}

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

.desktop-icon.selected {
  background-color: rgba(0, 123, 255, 0.3);
  border: 1px dotted rgba(255, 255, 255, 0.8);
}

.icon-image {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-label {
  color: white;
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 70px;
}

/* Taskbar */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(
    to bottom,
    #2e7db8 0%,
    #1a5490 50%,
    #146090 51%,
    #2e7db8 100%
  );
  border-top: 1px solid #4FC3F7;
  display: flex;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(79, 195, 247, 0.3);
  z-index: 1000;
}

.start-button {
  height: 24px;
  background: linear-gradient(
    to bottom,
    #4ead4e 0%,
    #2d8f2d 50%,
    #267326 51%,
    #3ba63b 100%
  );
  border: 1px outset #4ead4e;
  border-radius: 3px;
  margin: 3px;
  display: flex;
  align-items: center;
  padding: 2px 12px 2px 6px;
  cursor: pointer;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.start-button:hover {
  background: linear-gradient(
    to bottom,
    #5cbd5c 0%,
    #3d9f3d 50%,
    #368336 51%,
    #4bb64b 100%
  );
}

.start-button:active {
  border: 1px inset #4ead4e;
  background: linear-gradient(
    to bottom,
    #2d8f2d 0%,
    #4ead4e 50%,
    #3ba63b 51%,
    #267326 100%
  );
}

.start-button img {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.taskbar-programs {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 4px;
  gap: 2px;
}

.taskbar-program {
  height: 22px;
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  padding: 2px 8px;
  font-size: 11px;
  color: #000;
  cursor: pointer;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskbar-program.active {
  border: 1px inset #c0c0c0;
  background: linear-gradient(
    to bottom,
    #b8b8b8 0%,
    #e3e3e3 50%,
    #d0d0d0 51%,
    #c0c0c0 100%
  );
}

.system-tray {
  display: flex;
  align-items: center;
  height: 100%;
  background: linear-gradient(to bottom, #e3e3e3 0%, #c0c0c0 100%);
  border: 1px inset #c0c0c0;
  margin: 2px;
  padding: 2px 8px;
  gap: 6px;
}

.tray-icons {
  display: flex;
  gap: 4px;
}

.tray-icons img {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.clock {
  font-size: 11px;
  color: #000;
  text-align: center;
  line-height: 1.1;
}

.clock .time {
  font-weight: normal;
}

.clock .date {
  font-size: 10px;
}

/* Start Menu */
.start-menu {
  position: absolute;
  bottom: 30px;
  left: 3px;
  width: 300px;
  background: #ffffff;
  border: 2px outset #c0c0c0;
  border-radius: 0 8px 8px 0;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  animation: slideUp 0.2s ease-out;
  user-select: none;
}

.start-menu-header {
  background: linear-gradient(to right, #1a5490 0%, #4FC3F7 100%);
  color: white;
  padding: 12px;
  border-radius: 0 6px 0 0;
  position: relative;
  overflow: hidden;
}

/* Animated bubbles in start menu header */
.start-menu-header::before {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 140%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, transparent 30%, rgba(255, 255, 255, 0.1) 31%, rgba(255, 255, 255, 0.1) 32%, transparent 33%),
              radial-gradient(circle at 60% 30%, transparent 25%, rgba(255, 255, 255, 0.08) 26%, rgba(255, 255, 255, 0.08) 27%, transparent 28%),
              radial-gradient(circle at 80% 70%, transparent 35%, rgba(255, 255, 255, 0.12) 36%, rgba(255, 255, 255, 0.12) 37%, transparent 38%);
  animation: bubbleFloat 8s ease-in-out infinite;
}

@keyframes bubbleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 12px;
}

.user-info img {
  width: 24px;
  height: 24px;
}

.start-menu-items {
  padding: 8px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 11px;
  gap: 8px;
  transition: background-color 0.1s ease;
  border: 1px solid transparent;
}

.menu-item:hover {
  background: linear-gradient(to right, rgba(79, 195, 247, 0.3), rgba(79, 195, 247, 0.1));
  color: #1a5490;
  border: 1px solid #4FC3F7;
  transform: translateX(2px);
  position: relative;
}

.menu-item:hover::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #4FC3F7;
  animation: menuPulse 1s ease-in-out infinite;
}

@keyframes menuPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.menu-item:active {
  background-color: #005a9e;
}

.menu-item img {
  width: 16px;
  height: 16px;
}

.menu-separator {
  height: 1px;
  background: #c0c0c0;
  margin: 4px 12px;
}

.start-menu-footer {
  border-top: 1px solid #c0c0c0;
  background: #f0f0f0;
}

.menu-item.power {
  background: linear-gradient(to right, #1a5490 0%, #4FC3F7 100%);
  color: white;
  font-weight: bold;
  margin: 0;
  border-radius: 0 0 6px 0;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.menu-item.power::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  animation: shimmerPower 3s ease-in-out infinite;
}

@keyframes shimmerPower {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.menu-item.power:hover {
  background: linear-gradient(to right, #2e7db8 0%, #81D4FA 100%);
  border: 1px solid #4FC3F7;
  transform: none;
}

.menu-item.power:active {
  background: linear-gradient(to right, #e55a2b 0%, #e58f35 100%);
}

/* XP Button Style */
.xp-button {
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  padding: 4px 12px;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  cursor: pointer;
  margin: 2px;
}

.xp-button:hover {
  background: linear-gradient(
    to bottom,
    #f0f0f0 0%,
    #d0d0d0 50%,
    #c8c8c8 51%,
    #e0e0e0 100%
  );
}

.xp-button:active {
  border: 1px inset #c0c0c0;
  background: linear-gradient(
    to bottom,
    #b8b8b8 0%,
    #e3e3e3 50%,
    #d0d0d0 51%,
    #c0c0c0 100%
  );
}

/* Selection and Focus States */
.desktop-icon:focus,
.menu-item:focus,
.xp-button:focus {
  outline: 1px dotted #000;
  outline-offset: -1px;
}

/* Scrollbars - XP Style */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
  border: 1px inset #c0c0c0;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    to bottom,
    #f0f0f0 0%,
    #d0d0d0 50%,
    #c8c8c8 51%,
    #e0e0e0 100%
  );
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.start-menu {
  animation: slideUp 0.2s ease-out;
}

/* Cursor Styles */
.desktop-icon {
  cursor: pointer;
}

.start-button {
  cursor: pointer;
}

.menu-item {
  cursor: pointer;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .desktop-icons {
    grid-template-columns: repeat(auto-fit, 60px);
    gap: 15px;
  }

  .desktop-icon {
    width: 70px;
    min-height: 80px;
  }

  .icon-image {
    width: 36px;
    height: 36px;
  }

  .icon-label {
    font-size: 10px;
    max-width: 55px;
  }

  .start-menu {
    width: 250px;
  }
}
