/* Windows XP Window Components */

/* Window Styles - Ocean Enhanced */
.window {
  position: absolute;
  background: #f0f0f0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3),
              0 0 20px rgba(79, 195, 247, 0.2);
  min-width: 300px;
  min-height: 200px;
  z-index: 100;
  animation: windowOpen 0.2s ease-out;
}

/* Active window glow */
.window.active {
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3),
              0 0 30px rgba(79, 195, 247, 0.4),
              inset 0 0 5px rgba(79, 195, 247, 0.1);
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 30px) !important;
  z-index: 900;
}

.window.minimized {
  display: none;
}

.window.active {
  z-index: 1000;
}

/* Title Bar - Ocean Theme */
.title-bar {
  height: 24px;
  background: linear-gradient(
    to bottom,
    #4FC3F7 0%,
    #2e7db8 50%,
    #1a5490 51%,
    #0077BE 100%
  );
  border-bottom: 1px solid #1a5490;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: move;
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* Animated wave effect on title bar */
.title-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent
  );
  animation: titleWave 4s ease-in-out infinite;
}

@keyframes titleWave {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: -100%; }
}

.window:not(.active) .title-bar {
  background: linear-gradient(
    to bottom,
    #b0b0b0 0%,
    #909090 50%,
    #808080 51%,
    #a0a0a0 100%
  );
}

.window:not(.active) .title-bar::after {
  display: none;
}

/* Window control buttons with water drop effect */
.window-controls button {
  transition: all 0.2s ease;
  position: relative;
}

.window-controls button:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.window-controls button:active {
  transform: scale(0.95);
}

.window-controls button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(79, 195, 247, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.window-controls button:hover::after {
  width: 30px;
  height: 30px;
}

.window:not(.active) .title-bar {
  background: linear-gradient(
    to bottom,
    #808080 0%,
    #606060 50%,
    #505050 51%,
    #707070 100%
  );
  border-bottom: 1px solid #505050;
}

.title-text {
  color: white;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 4px;
}

.title-icon {
  width: 16px;
  height: 16px;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-controls button {
  width: 16px;
  height: 14px;
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  font-family: "Marlett", sans-serif;
  font-size: 8px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.minimize-btn::before {
  content: "0";
}
.maximize-btn::before {
  content: "1";
}
.restore-btn::before {
  content: "2";
}
.close-btn::before {
  content: "r";
}

/* Mobile-friendly window controls */
@media (max-width: 768px) {
  .window-controls {
    gap: 4px;
  }
  
  .window-controls button {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 4px;
    background: linear-gradient(
      to bottom,
      #4FC3F7 0%,
      #2e7db8 50%,
      #1a5490 51%,
      #0077BE 100%
    );
    border: 2px solid #1a5490;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  }
  
  .window-controls button:active {
    background: linear-gradient(
      to bottom,
      #1a5490 0%,
      #2e7db8 50%,
      #4FC3F7 51%,
      #0077BE 100%
    );
  }
  
  /* Replace Marlett font with actual symbols for mobile */
  .minimize-btn::before {
    content: "−";
    font-family: Arial, sans-serif;
  }
  
  .maximize-btn::before {
    content: "□";
    font-family: Arial, sans-serif;
  }
  
  .restore-btn::before {
    content: "◱";
    font-family: Arial, sans-serif;
  }
  
  .close-btn::before {
    content: "×";
    font-family: Arial, sans-serif;
  }
  
  .close-btn {
    background: linear-gradient(
      to bottom,
      #ff6b6b 0%,
      #dc3545 50%,
      #c92a2a 51%,
      #ff4757 100%
    );
    border-color: #c92a2a;
  }
  
  .close-btn:active {
    background: linear-gradient(
      to bottom,
      #c92a2a 0%,
      #dc3545 50%,
      #ff6b6b 51%,
      #ff4757 100%
    );
  }
  
  /* Bigger title bar for mobile */
  .title-bar {
    height: 48px;
    padding: 0 12px;
  }
  
  .title-text {
    font-size: 14px;
  }
  
  .window-content {
    height: calc(100% - 48px);
  }
}

/* Window Content */
.window-content {
  padding: 8px;
  height: calc(100% - 24px);
  overflow: auto;
  background: #f0f0f0;
}

/* Resize Handles */
.resize-handle {
  position: absolute;
  background: transparent;
}

.resize-handle.n {
  top: -2px;
  left: 4px;
  right: 4px;
  height: 4px;
  cursor: n-resize;
}
.resize-handle.s {
  bottom: -2px;
  left: 4px;
  right: 4px;
  height: 4px;
  cursor: s-resize;
}
.resize-handle.e {
  top: 4px;
  right: -2px;
  bottom: 4px;
  width: 4px;
  cursor: e-resize;
}
.resize-handle.w {
  top: 4px;
  left: -2px;
  bottom: 4px;
  width: 4px;
  cursor: w-resize;
}
.resize-handle.ne {
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  cursor: ne-resize;
}
.resize-handle.nw {
  top: -2px;
  left: -2px;
  width: 8px;
  height: 8px;
  cursor: nw-resize;
}
.resize-handle.se {
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  cursor: se-resize;
}
.resize-handle.sw {
  bottom: -2px;
  left: -2px;
  width: 8px;
  height: 8px;
  cursor: sw-resize;
}

/* Dialog Windows */
.password-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  /* CRITICAL: Ensure dialog can receive touch events */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.dialog-window {
  background: #f0f0f0;
  border: 2px outset #c0c0c0;
  width: 400px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  animation: windowOpen 0.2s ease-out;
}

.dialog-content {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dialog-icon img {
  width: 32px;
  height: 32px;
}

.dialog-text {
  flex: 1;
  font-size: 11px;
  line-height: 1.4;
}

.dialog-text p {
  margin-bottom: 8px;
}

.dialog-text input {
  width: 100%;
  padding: 4px;
  border: 1px inset #c0c0c0;
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  margin-top: 8px;
}

.dialog-buttons {
  padding: 8px 16px 16px;
  text-align: right;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* CRITICAL FIX: Mobile password dialog button styling */
@media (max-width: 768px) {
  .password-dialog {
    /* Ensure full coverage on mobile */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
  }
  
  .dialog-window {
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .dialog-buttons {
    padding: 16px;
    gap: 12px;
    justify-content: center;
  }
  
  /* Ensure buttons are easily tappable on mobile */
  .dialog-buttons button,
  .dialog-buttons .xp-button {
    min-width: 100px;
    min-height: 48px; /* Android/iOS minimum touch target */
    font-size: 16px;
    padding: 12px 20px;
    /* Ensure buttons can be tapped */
    position: relative;
    z-index: 10000;
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
  }
  
  .dialog-buttons .xp-button {
    /* CRITICAL: Large touch targets for mobile */
    min-width: 100px !important;
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 12px 20px !important;
    
    /* Ensure buttons can receive touch events */
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3) !important;
    user-select: none !important;
    pointer-events: auto !important;
    
    /* Proper z-index */
    position: relative !important;
    z-index: 10000 !important;
    
    /* Remove any potential blocking styles */
    transform: none !important;
    opacity: 1 !important;
  }
  
  .dialog-buttons .xp-button:active {
    /* Visual feedback for mobile touch */
    transform: scale(0.95) !important;
    background: #b8b8b8 !important;
  }
}

/* Squirt Copy Button System */
.squirt-container {
  position: fixed;
  bottom: 40px;
  right: 20px;
  z-index: 1500;
  pointer-events: auto;
}

.squirt-button {
  background: linear-gradient(135deg, #FFD15C 0%, #FFA500 100%);
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 10px 16px;
  box-shadow: 0 4px 12px rgba(255, 209, 92, 0.4),
              0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 2px solid #FFD700;
  position: relative;
  overflow: hidden;
  min-width: 100px;
  height: 44px;
}

.squirt-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 209, 92, 0.6),
              0 4px 10px rgba(0, 0, 0, 0.3);
  border-color: #FFC107;
}

.squirt-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 209, 92, 0.3);
}

.squirt-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent
  );
  transition: left 0.5s ease;
}

.squirt-button:hover::before {
  left: 100%;
}

.squirt-text {
  font-family: "Tahoma", sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  line-height: 1;
  letter-spacing: 0.3px;
}

.squirt-notification {
  position: absolute;
  bottom: 55px;
  right: 0;
  background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
  border: 2px solid #1976D2;
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(79, 195, 247, 0.4),
              0 2px 8px rgba(0, 0, 0, 0.2);
  animation: slideInSquirt 0.3s ease-out;
  pointer-events: none;
  white-space: nowrap;
}

.notification-text {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ca-address {
  font-family: "Courier New", monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

.squirt-notification::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 30px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #4FC3F7;
}

.squirt-notification::before {
  content: "";
  position: absolute;
  bottom: -11px;
  right: 28px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #1976D2;
}

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

@keyframes squirtSuccess {
  0% {
    transform: translateY(0);
    background: linear-gradient(135deg, #FFD15C 0%, #FFA500 100%);
  }
  25% {
    transform: translateY(-4px) scale(1.05);
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
    border-color: #1976D2;
  }
  50% {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    border-color: #388E3C;
  }
  100% {
    transform: translateY(0);
    background: linear-gradient(135deg, #FFD15C 0%, #FFA500 100%);
    border-color: #FFD700;
  }
}

.squirt-button.squirting {
  animation: squirtSuccess 0.8s ease;
}

/* Mobile optimizations for Squirt button */
@media (max-width: 768px) {
  .squirt-container {
    bottom: 45px;
    right: 15px;
  }
  
  .squirt-button {
    padding: 8px 12px;
    min-width: 85px;
    height: 38px;
  }
  
  .squirt-button i[data-lucide="copy"] {
    width: 16px !important;
    height: 16px !important;
    margin-right: 4px !important;
  }
  
  .squirt-text {
    font-size: 11px;
  }
  
  .squirt-notification {
    bottom: 48px;
    right: -10px;
    min-width: 180px;
    padding: 6px 10px;
  }
  
  .notification-text {
    font-size: 10px;
  }
  
  .ca-address {
    font-size: 9px;
  }
}

/* Notepad Application Styles */
.notepad-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f0f0f0;
}

.notepad-menubar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 2px 8px;
  display: flex;
  gap: 16px;
  font-size: 11px;
}

.notepad-menubar .menu-item {
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.1s ease;
}

.notepad-menubar .menu-item:hover {
  background-color: #0078d4;
  color: white;
}

.notepad-content {
  flex: 1;
  padding: 0;
  background: white;
  border: 1px inset #c0c0c0;
  margin: 2px;
}

.notepad-textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 8px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  resize: none;
  background: white;
  color: black;
}

.notepad-textarea::placeholder {
  color: #888;
  font-style: italic;
}

/* Registry Editor Application Styles */
.registry-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f0f0f0;
}

.registry-menubar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 2px 8px;
  display: flex;
  gap: 16px;
  font-size: 11px;
}

.registry-menubar .menu-item {
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.1s ease;
}

.registry-menubar .menu-item:hover {
  background-color: #0078d4;
  color: white;
}

.registry-content {
  flex: 1;
  display: flex;
  background: white;
  border: 1px inset #c0c0c0;
  margin: 2px;
}

.registry-left-pane {
  width: 250px;
  border-right: 1px solid #c0c0c0;
  background: white;
  overflow-y: auto;
  padding: 4px;
}

.registry-right-pane {
  flex: 1;
  background: white;
  overflow-y: auto;
}

.registry-tree {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
}

.registry-node {
  display: flex;
  align-items: center;
  padding: 2px 4px;
  cursor: pointer;
  user-select: none;
  border-radius: 2px;
  transition: background-color 0.1s ease;
}

.registry-node:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.registry-node.selected {
  background-color: #0078d4;
  color: white;
}

.registry-node .node-icon {
  margin-right: 4px;
  font-size: 14px;
}

.registry-node .node-text {
  flex: 1;
}

.registry-children {
  margin-left: 16px;
}

.registry-node:not(.expanded) .registry-children {
  display: none;
}

.registry-header {
  display: flex;
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  font-size: 11px;
  font-weight: bold;
  padding: 4px;
}

.registry-column {
  flex: 1;
  padding: 4px 8px;
  border-right: 1px solid #c0c0c0;
}

.registry-column:last-child {
  border-right: none;
}

.registry-entries {
  font-family: "Tahoma", sans-serif;
  font-size: 11px;
}

.registry-entry {
  display: flex;
  padding: 2px 4px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.registry-entry:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.registry-entry.selected {
  background-color: #0078d4;
  color: white;
}

.entry-name {
  flex: 1;
  padding: 2px 8px;
  border-right: 1px solid #e0e0e0;
}

.entry-type {
  flex: 1;
  padding: 2px 8px;
  border-right: 1px solid #e0e0e0;
}

.entry-data {
  flex: 1;
  padding: 2px 8px;
}

/* Folder View Styles */
.folder-window {
  background: white;
}

.folder-toolbar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-button {
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
}

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

.toolbar-button img {
  width: 16px;
  height: 16px;
}

.address-bar {
  flex: 1;
  margin-left: 8px;
  padding: 2px 4px;
  border: 1px inset #c0c0c0;
  background: white;
  font-size: 11px;
}

.folder-content {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  height: calc(100% - 32px);
  overflow-y: auto;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.1s ease;
}

.file-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.file-item.selected {
  background-color: rgba(0, 123, 255, 0.3);
  border: 1px dotted #0080ff;
}

.file-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.file-icon svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
}

.file-icon.locked::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: url("../assets/icons/lock_small.png") no-repeat center;
  background-size: contain;
}

.file-label {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 70px;
}

/* Document Viewer Styles */
.document-viewer {
  background: white;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.document-toolbar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.zoom-controls button {
  width: 24px;
  height: 20px;
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  font-size: 12px;
  cursor: pointer;
}

.zoom-level {
  font-size: 11px;
  min-width: 40px;
  text-align: center;
}

.document-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-family: "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.6;
  color: #000;
}

.document-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 16px;
}

.lock-icon {
  width: 64px;
  height: 64px;
  opacity: 0.5;
}

.lock-message {
  font-size: 14px;
  color: #666;
}

/* Status Bar */
.status-bar {
  height: 20px;
  background: linear-gradient(to bottom, #e3e3e3 0%, #c0c0c0 100%);
  border-top: 1px solid #a0a0a0;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  color: #000;
}

.status-panel {
  border: 1px inset #c0c0c0;
  padding: 1px 4px;
  margin-right: 4px;
}

/* Transitions and Effects */
.window {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.window.minimizing {
  animation: windowMinimize 0.3s ease-out forwards;
}

@keyframes windowMinimize {
  to {
    opacity: 0;
    transform: scale(0.1) translateY(100px);
  }
}

.window.restoring {
  animation: windowRestore 0.3s ease-out;
}

@keyframes windowRestore {
  from {
    opacity: 0;
    transform: scale(0.1) translateY(100px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: #f0f0f0;
  border: 2px outset #c0c0c0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  min-width: 120px;
  font-size: 11px;
}

.context-menu-item {
  padding: 4px 16px 4px 24px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-menu-item:hover {
  background: #0078d4;
  color: white;
}

.context-menu-item.disabled {
  color: #808080;
  cursor: default;
}

.context-menu-item.disabled:hover {
  background: transparent;
  color: #808080;
}

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

/* My Computer Window Styles */
.my-computer-window {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.my-computer-toolbar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.my-computer-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: white;
}

.computer-section {
  margin-bottom: 24px;
}

.computer-section h3 {
  font-size: 12px;
  color: #0066cc;
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
}

.drive-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drive-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.drive-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.drive-info {
  flex: 1;
}

.drive-name {
  font-weight: bold;
  font-size: 11px;
}

.drive-details {
  font-size: 10px;
  color: #666;
}

.other-items {
  display: flex;
  gap: 16px;
}

.other-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.1s ease;
  font-size: 11px;
}

.other-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

/* Control Panel Styles */
.control-panel-window {
  height: 100%;
  padding: 16px;
  overflow-y: auto;
  background: white;
}

.control-panel-header h2 {
  font-size: 16px;
  color: #0066cc;
  margin-bottom: 4px;
}

.control-panel-header p {
  font-size: 11px;
  color: #666;
  margin-bottom: 20px;
}

.category-section {
  margin-bottom: 24px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
}

.category-section h3 {
  font-size: 12px;
  color: #0066cc;
  margin-bottom: 12px;
}

.control-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.1s ease;
  font-size: 11px;
}

.control-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

/* Help Window Styles */
.help-window {
  height: 100%;
  background: white;
  overflow-y: auto;
}

.help-header {
  background: linear-gradient(to bottom, #0080ff 0%, #0060df 100%);
  color: white;
  padding: 16px;
}

.help-header h1 {
  font-size: 18px;
  margin-bottom: 4px;
}

.help-header p {
  font-size: 12px;
  opacity: 0.9;
}

.help-content {
  padding: 16px;
}

.help-section {
  margin-bottom: 24px;
}

.help-section h3 {
  font-size: 14px;
  color: #0066cc;
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e0e0e0;
}

.help-list {
  list-style: none;
  padding: 0;
}

.help-list li {
  margin-bottom: 8px;
}

.help-list a {
  color: #0066cc;
  text-decoration: none;
  font-size: 11px;
  padding: 4px;
  border-radius: 2px;
  transition: background-color 0.1s ease;
}

.help-list a:hover {
  background-color: rgba(0, 123, 255, 0.1);
  text-decoration: underline;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.help-search {
  flex: 1;
  padding: 6px;
  border: 1px inset #c0c0c0;
  font-size: 11px;
}

.search-btn {
  padding: 6px 12px;
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  cursor: pointer;
  font-size: 11px;
}

.tips-box {
  background: #fffbf0;
  border: 1px solid #e0e0e0;
  padding: 12px;
  border-radius: 4px;
}

.tips-box p {
  margin-bottom: 8px;
  font-size: 11px;
}

.help-footer {
  background: #f0f0f0;
  padding: 12px;
  border-top: 1px solid #e0e0e0;
  font-size: 11px;
}

/* Run Dialog Styles */
.run-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.run-content {
  padding: 16px;
}

.run-content p {
  font-size: 11px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.run-input-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.run-input-section label {
  font-size: 11px;
  font-weight: bold;
}

.run-input {
  flex: 1;
  padding: 4px;
  border: 1px inset #c0c0c0;
  font-size: 11px;
}

.browse-btn {
  padding: 4px 8px;
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  cursor: pointer;
  font-size: 11px;
}

/* Paint Application Styles */
.paint-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f0f0f0;
}

.paint-toolbar {
  background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
  border-bottom: 1px solid #c0c0c0;
  padding: 8px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tool-section,
.color-section {
  border: 1px inset #c0c0c0;
  padding: 8px;
  background: #f0f0f0;
}

.tool-section h4,
.color-section h4 {
  font-size: 11px;
  margin-bottom: 6px;
  color: #333;
}

.paint-tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 120px;
}

.paint-tool {
  width: 28px;
  height: 28px;
  background: linear-gradient(
    to bottom,
    #e3e3e3 0%,
    #c0c0c0 50%,
    #b8b8b8 51%,
    #d0d0d0 100%
  );
  border: 1px outset #c0c0c0;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.color-palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  width: 150px;
  margin-bottom: 8px;
}

.color-box {
  width: 20px;
  height: 20px;
  border: 1px outset #c0c0c0;
  cursor: pointer;
}

.color-box.active {
  border: 2px inset #000;
}

.current-color {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

.color-preview {
  width: 20px;
  height: 20px;
  border: 1px inset #c0c0c0;
}

.paint-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.paint-actions .xp-button {
  font-size: 10px;
  padding: 4px 8px;
}

.paint-canvas-container {
  flex: 1;
  padding: 8px;
  background: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
}

#paintCanvas {
  border: 1px inset #c0c0c0;
  background: white;
  cursor: crosshair;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.paint-status {
  background: linear-gradient(to bottom, #e3e3e3 0%, #c0c0c0 100%);
  border-top: 1px solid #a0a0a0;
  padding: 2px 8px;
  display: flex;
  gap: 16px;
  font-size: 10px;
  color: #000;
}

.paint-status span {
  border-right: 1px solid #808080;
  padding-right: 8px;
}

.paint-status span:last-child {
  border-right: none;
}

/* Version Dialog Styles */
.version-dialog {
  padding: 16px;
  background: white;
}

.version-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.version-header h2 {
  font-size: 14px;
  color: #0066cc;
}

.version-info {
  font-size: 11px;
  line-height: 1.4;
}

.version-info p {
  margin-bottom: 4px;
}

.version-footer {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e0e0e0;
}
/* Windows XP Authentic Styling with Mobile Support */

* {
  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;
  width: 100%;
  height: 100vh;
  position: fixed;
}

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

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

.desktop-icon {
  width: 80px;
  height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5px;
  border-radius: 2px;
  transition: background-color 0.1s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.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: 32px;
  height: 32px;
  margin-bottom: 4px;
}

.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: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(
    to bottom,
    #3a6cf0 0%,
    #1e3d94 50%,
    #1a3587 51%,
    #2b5bb7 100%
  );
  border-top: 1px solid #4a7bff;
  display: flex;
  align-items: center;
  z-index: 1000;
  width: 100%;
}

.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);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.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;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.taskbar-programs::-webkit-scrollbar {
  display: none;
}

.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;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.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;
  flex-shrink: 0;
}

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

.tray-icons img {
  width: 16px;
  height: 16px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.clock {
  font-size: 11px;
  color: #000;
  text-align: center;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

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

/* Start Menu */
.start-menu {
  position: fixed;
  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;
  max-height: calc(100vh - 35px);
  overflow-y: auto;
}

.start-menu-header {
  background: linear-gradient(to right, #ff6b35 0%, #f7931e 100%);
  color: white;
  padding: 12px;
  border-radius: 0 6px 0 0;
}

.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;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 32px;
}

.menu-item:hover,
.menu-item:focus {
  background-color: #0078d4;
  color: white;
  border: 1px solid #005a9e;
  outline: none;
}

.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, #ff6b35 0%, #f7931e 100%);
  color: white;
  font-weight: bold;
  margin: 0;
  border-radius: 0 0 6px 0;
  border: 1px solid transparent;
}

.menu-item.power:hover {
  background: linear-gradient(to right, #ff8555 0%, #ffa33e 100%);
  border: 1px solid #e55a2b;
}

.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;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.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) translateY(20px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* Window drag effect */
.window.dragging {
  opacity: 0.9;
  transform: scale(1.02);
  transition: all 0.1s ease;
}

.window.dragging::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 2px dashed rgba(79, 195, 247, 0.5);
  border-radius: 4px;
  pointer-events: none;
}

/* Touch Feedback */
.touch-feedback {
  background-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(0.95);
  transition: all 0.1s ease;
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    touch-action: manipulation;
  }

  body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  .desktop {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    padding-bottom: 35px;
  }

  /* Desktop icons - mobile optimized */
  .desktop-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    grid-template-columns: repeat(4, 70px);
    gap: 15px;
    max-width: calc(100vw - 20px);
    padding-right: 10px;
  }

  .desktop-icon {
    width: 70px;
    height: 75px;
    padding: 3px;
  }

  .icon-image {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
  }

  .icon-label {
    font-size: 10px;
    max-width: 65px;
    line-height: 1.1;
  }

  /* Taskbar - always visible at bottom */
  .taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 35px;
    z-index: 1001;
    flex-wrap: nowrap;
  }

  .start-button {
    height: 28px;
    margin: 3px 2px;
    padding: 2px 8px;
    font-size: 10px;
    min-width: 65px;
    flex-shrink: 0;
  }

  .start-button img {
    width: 14px;
    height: 14px;
  }

  .taskbar-programs {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .taskbar-programs::-webkit-scrollbar {
    display: none;
  }

  .taskbar-program {
    height: 20px;
    padding: 1px 6px;
    font-size: 10px;
    max-width: 120px;
    display: inline-block;
    vertical-align: top;
    margin: 0 1px;
    min-width: 60px;
  }

  .system-tray {
    padding: 1px 4px;
    margin: 1px;
    min-width: 85px;
    flex-shrink: 0;
  }

  .tray-icons img {
    width: 14px;
    height: 14px;
  }

  .clock {
    font-size: 9px;
    line-height: 1;
  }

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

  /* Start Menu - mobile optimized */
  .start-menu {
    position: fixed;
    bottom: 35px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: auto;
    max-height: calc(100vh - 35px);
    border-radius: 0;
    overflow-y: auto;
  }

  .start-menu-header {
    padding: 8px;
  }

  .user-info {
    font-size: 11px;
  }

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

  .menu-item {
    padding: 10px 12px;
    font-size: 12px;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  .menu-item img {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  /* Touch-friendly scrollbars */
  ::-webkit-scrollbar {
    width: 8px;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
  }

  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .desktop-icons {
    grid-template-columns: repeat(3, 80px);
    gap: 12px;
  }

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

  .start-menu {
    width: 100vw;
  }

  .taskbar-program {
    max-width: 100px;
    min-width: 50px;
  }

  .system-tray {
    min-width: 75px;
  }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .desktop-icons {
    grid-template-columns: repeat(6, 60px);
    gap: 10px;
  }

  .desktop-icon {
    width: 60px;
    height: 65px;
  }

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

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

  .start-menu {
    max-height: calc(100vh - 35px);
    width: 320px;
    right: auto;
    left: 0;
  }
}

/* Touch states for better mobile feedback */
@media (max-width: 768px) {
  .desktop-icon:active,
  .start-button:active,
  .menu-item:active,
  .taskbar-program:active,
  .xp-button:active {
    transform: scale(0.95);
    opacity: 0.8;
  }

  /* Disable text selection on mobile */
  * {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  /* Allow text selection in input fields */
  input,
  textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .icon-image img,
  .start-button img,
  .menu-item img,
  .tray-icons img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
