/* ============================================
   AURORA OS - Windows 7 Inspired Web OS
   Complete Stylesheet - Improved for Mobile
   ============================================ */

:root {
  --aero-blue: #0078d4;
  --aero-light: #a6d8ff;
  --aero-dark: #005a9e;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --taskbar-height: 40px;
  --window-title-height: 30px;
  --start-menu-width: 380px;
  --start-menu-height: 500px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  height: 100vh;
  width: 100vw;
  touch-action: pan-x pan-y;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 768px) {
  :root {
    --taskbar-height: 50px;
    --window-title-height: 40px;
    --start-menu-width: 100vw;
    --start-menu-height: 80vh;
  }
  
  .desktop-icons {
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
  }
  
  .desktop-icon {
    width: 70px;
    height: 80px;
  }
  
  .taskbar-item {
    min-width: 40px;
    max-width: 60px;
    justify-content: center;
    padding: 0 8px;
  }
  
  .taskbar-item .item-title {
    display: none;
  }
  
  .taskbar-apps {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
  }
  
  .system-tray {
    gap: 8px;
    padding: 0 8px;
  }
  
  .clock .date {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --taskbar-height: 55px;
    --window-title-height: 45px;
  }
  
  .desktop-icon {
    width: 60px;
    height: 70px;
  }
  
  .desktop-icon .icon-img {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }
  
  .start-button {
    width: 60px;
    height: 42px;
  }
  
  .start-button .orb {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   BOOT SCREEN
   ============================================ */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(180deg, #000428 0%, #004e92 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 1s ease;
}

#boot-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.boot-logo {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(0, 212, 255, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.2);
  animation: pulse 2s ease-in-out infinite;
  margin-bottom: 40px;
}

.boot-logo::before {
  content: 'A';
  font-size: 80px;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.boot-text {
  color: white;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 8px;
  margin-bottom: 60px;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.boot-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  margin-top: -50px;
  margin-bottom: 60px;
}

.boot-loader {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.boot-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00d4ff, #0099cc);
  border-radius: 2px;
  animation: loadProgress 3s ease-in-out forwards;
}

.boot-status {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-top: 20px;
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(0, 212, 255, 0.5); }
  50% { transform: scale(1.05); box-shadow: 0 0 80px rgba(0, 212, 255, 0.8); }
}

@keyframes loadProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============================================
   DESKTOP
   ============================================ */
#desktop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(100vh - var(--taskbar-height));
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
  background-size: 400% 400%;
  animation: aurora 15s ease infinite;
  z-index: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes aurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.desktop-icons {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 5px;
  padding: 15px;
  height: 100%;
  width: 100px;
}

.desktop-icon {
  width: 80px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.desktop-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.desktop-icon.selected {
  background: rgba(0, 120, 212, 0.4);
  border: 1px solid rgba(0, 120, 212, 0.6);
}

.desktop-icon .icon-img {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 4px;
}

.desktop-icon .icon-text {
  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: 100%;
}

/* ============================================
   TASKBAR
   ============================================ */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: var(--taskbar-height);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.9) 100%);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  z-index: 9000;
  padding: 0 10px;
  -webkit-tap-highlight-color: transparent;
}

.start-button {
  width: 50px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-right: 10px;
}

.start-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.start-button.active {
  background: rgba(0, 120, 212, 0.5);
}

.start-button .orb {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.taskbar-apps {
  flex: 1;
  display: flex;
  gap: 4px;
  height: 36px;
  overflow: hidden;
}

.taskbar-item {
  min-width: 160px;
  max-width: 200px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.taskbar-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.taskbar-item.active {
  background: rgba(255, 255, 255, 0.2);
  border-bottom-color: #00d4ff;
}

.taskbar-item.minimized {
  opacity: 0.7;
}

.taskbar-item .item-icon {
  font-size: 18px;
}

.taskbar-item .item-title {
  color: white;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.system-tray {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  height: 36px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  margin-left: 10px;
}

.tray-icon {
  color: white;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.tray-icon:hover {
  opacity: 1;
}

.clock {
  color: white;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.clock:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

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

/* ============================================
   START MENU
   ============================================ */
#start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 0;
  width: var(--start-menu-width);
  height: var(--start-menu-height);
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.95) 0%, rgba(20, 20, 20, 0.98) 100%);
  backdrop-filter: blur(30px);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  z-index: 9500;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#start-menu.open {
  display: flex;
  animation: slideUp 0.2s ease;
}

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

.start-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  font-weight: bold;
}

.user-info {
  flex: 1;
}

.user-name {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

.user-status {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.start-search {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.start-search input {
  width: 100%;
  padding: 10px 15px;
  border: none;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  outline: none;
  transition: background 0.2s;
}

.start-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.start-search input:focus {
  background: rgba(255, 255, 255, 0.15);
}

.start-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.start-section {
  margin-bottom: 15px;
}

.start-section-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-transform: uppercase;
  padding: 5px 20px;
  letter-spacing: 1px;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.start-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.start-item .item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.start-item .item-text {
  color: white;
  font-size: 13px;
}

.start-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.shutdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background 0.2s;
}

.shutdown-btn:hover {
  background: rgba(255, 0, 0, 0.3);
}

/* ============================================
   WINDOWS - MEJORADO PARA RESPONSIVE
   ============================================ */
.window {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  min-width: 300px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s, opacity 0.1s;
  resize: both;
  max-width: 100vw;
  max-height: calc(100vh - var(--taskbar-height));
  -webkit-tap-highlight-color: transparent;
}

/* Ventanas para móviles */
@media (max-width: 768px) {
  .window {
    min-width: 90vw !important;
    min-height: 200px !important;
    width: 90vw !important;
    height: 60vh !important;
    left: 5vw !important;
    top: 10vh !important;
    resize: none;
    touch-action: none;
  }
  
  .window.maximized {
    width: 100vw !important;
    height: calc(100vh - var(--taskbar-height)) !important;
    left: 0 !important;
    top: 0 !important;
    border-radius: 0;
  }
  
  .window-controls .window-btn {
    width: 36px;
    height: 28px;
    font-size: 16px;
  }
  
  .window-titlebar {
    height: var(--window-title-height);
    padding: 0 12px;
  }
  
  .window-title {
    font-size: 14px;
  }
}

/* Ventanas para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .window {
    min-width: 400px !important;
    min-height: 300px !important;
    max-width: 80vw;
    max-height: 80vh;
  }
}

.window.active {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 120, 212, 0.3);
  z-index: 100;
}

.window.minimized {
  display: none;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: calc(100vh - var(--taskbar-height)) !important;
  border-radius: 0;
  resize: none;
}

.window-titlebar {
  height: var(--window-title-height);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  align-items: center;
  padding: 0 10px;
  cursor: move;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.window.active .window-titlebar {
  background: linear-gradient(180deg, #0078d4 0%, #005a9e 100%);
}

.window-icon {
  font-size: 16px;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.window-title {
  flex: 1;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window.active .window-title {
  color: white;
}

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

.window-btn {
  width: 30px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.window-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.window-btn.close:hover {
  background: #e81123;
}

.window-content {
  flex: 1;
  overflow: auto;
  background: white;
  -webkit-overflow-scrolling: touch;
}

.window-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 15px;
  height: 15px;
  cursor: se-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.3) 50%);
  border-radius: 0 0 8px 0;
  touch-action: none;
}

@media (max-width: 768px) {
  .window-resize-handle {
    display: none;
  }
}

/* ============================================
   CONTEXT MENU
   ============================================ */
.context-menu {
  position: fixed;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 8px 0;
  z-index: 10000;
  min-width: 200px;
  backdrop-filter: blur(20px);
}

.context-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
}

.context-item:hover {
  background: rgba(0, 120, 212, 0.1);
}

.context-item .item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.context-separator {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 6px 0;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
#notification-area {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 768px) {
  #notification-area {
    width: 90vw;
    right: 5vw;
    left: 5vw;
  }
}

.notification {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  padding: 15px;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid #0078d4;
}

.notification.error { border-left-color: #e81123; }
.notification.success { border-left-color: #107c10; }
.notification.warning { border-left-color: #ffc107; }

.notification-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 5px;
  color: #333;
}

.notification-message {
  font-size: 13px;
  color: #666;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   APPLICATION STYLES - RESPONSIVE
   ============================================ */

/* Calculator */
.calc-display {
  background: #f0f0f0;
  padding: 20px;
  text-align: right;
  font-size: 36px;
  font-weight: 300;
  border-bottom: 1px solid #ddd;
}

@media (max-width: 768px) {
  .calc-display {
    font-size: 28px;
    padding: 15px;
  }
}

.calc-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 2px;
}

@media (max-width: 480px) {
  .calc-buttons {
    gap: 1px;
  }
}

.calc-btn {
  padding: 20px;
  font-size: 18px;
  border: none;
  background: white;
  cursor: pointer;
  transition: all 0.1s;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
  .calc-btn {
    padding: 15px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .calc-btn {
    padding: 12px;
    font-size: 14px;
  }
}

.calc-btn:hover {
  background: #e0e0e0;
}

.calc-btn:active {
  background: #d0d0d0;
}

.calc-btn.operator {
  background: #f0f0f0;
  font-weight: 500;
}

.calc-btn.equals {
  background: #0078d4;
  color: white;
}

.calc-btn.equals:hover {
  background: #005a9e;
}

/* Notepad */
.notepad-textarea {
  width: 100%;
  height: 100%;
  border: none;
  padding: 15px;
  font-family: 'Consolas', monospace;
  font-size: 14px;
  resize: none;
  outline: none;
  line-height: 1.6;
}

/* Paint */
.paint-container {
  display: flex;
  height: 100%;
  flex-direction: column;
}

@media (min-width: 769px) {
  .paint-container {
    flex-direction: row;
  }
}

.paint-toolbar {
  width: auto;
  height: auto;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  .paint-toolbar {
    width: 60px;
    height: 100%;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #ddd;
  }
}

.paint-tool {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 20px;
  transition: all 0.2s;
}

.paint-tool:hover {
  background: #e0e0e0;
}

.paint-tool.active {
  background: #0078d4;
  color: white;
}

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

.paint-canvas {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: crosshair;
  touch-action: none;
}

/* File Explorer */
.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
}

.explorer-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  min-width: 60px;
}

@media (max-width: 768px) {
  .explorer-btn {
    padding: 8px 12px;
    font-size: 14px;
  }
}

.explorer-btn:hover {
  background: #e0e0e0;
}

.explorer-path {
  flex: 1;
  min-width: 150px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .explorer-path {
    font-size: 14px;
    padding: 8px 12px;
  }
}

.explorer-content {
  display: flex;
  height: calc(100% - 45px);
  flex-direction: column;
}

@media (min-width: 769px) {
  .explorer-content {
    flex-direction: row;
  }
}

.explorer-sidebar {
  width: auto;
  height: auto;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  overflow-x: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

@media (min-width: 769px) {
  .explorer-sidebar {
    width: 180px;
    height: 100%;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #ddd;
    overflow-y: auto;
  }
}

.explorer-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  min-width: 120px;
}

@media (min-width: 769px) {
  .explorer-nav-item {
    min-width: auto;
  }
}

.explorer-nav-item:hover {
  background: rgba(0, 120, 212, 0.1);
}

.explorer-nav-item .nav-icon {
  font-size: 16px;
}

.explorer-files {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.file-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  padding: 10px;
  margin: 5px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

@media (max-width: 768px) {
  .file-item {
    width: 70px;
    padding: 8px;
  }
}

.file-item:hover {
  background: rgba(0, 120, 212, 0.1);
}

.file-item.selected {
  background: rgba(0, 120, 212, 0.2);
}

.file-item .file-icon {
  font-size: 40px;
  margin-bottom: 5px;
}

.file-item .file-name {
  font-size: 11px;
  text-align: center;
  word-break: break-word;
}

/* Browser */
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  flex-wrap: wrap;
}

.browser-nav-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  min-width: 60px;
}

@media (max-width: 768px) {
  .browser-nav-btn {
    padding: 8px 12px;
    font-size: 16px;
  }
}

.browser-address {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  background: white;
  border-radius: 4px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .browser-address {
    font-size: 16px;
  }
}

.browser-frame {
  width: 100%;
  height: calc(100% - 50px);
  border: none;
}

/* Settings */
.settings-container {
  display: flex;
  height: 100%;
  flex-direction: column;
}

@media (min-width: 769px) {
  .settings-container {
    flex-direction: row;
  }
}

.settings-sidebar {
  width: auto;
  height: auto;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
  overflow-x: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 5px;
}

@media (min-width: 769px) {
  .settings-sidebar {
    width: 200px;
    height: 100%;
    flex-direction: column;
    border-bottom: none;
    border-right: 1px solid #ddd;
    gap: 0;
  }
}

.settings-category {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  min-width: 120px;
}

@media (min-width: 769px) {
  .settings-category {
    min-width: auto;
  }
}

.settings-category:hover {
  background: rgba(0, 120, 212, 0.1);
}

.settings-category.active {
  background: rgba(0, 120, 212, 0.15);
  border-right: 3px solid #0078d4;
}

@media (max-width: 768px) {
  .settings-category.active {
    background: rgba(0, 120, 212, 0.15);
    border-bottom: 3px solid #0078d4;
    border-right: none;
  }
}

.settings-category .cat-icon {
  font-size: 18px;
}

.settings-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.settings-section-title {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 20px;
  color: #333;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}

.setting-label {
  font-size: 14px;
  color: #333;
  flex: 1;
  min-width: 200px;
}

.setting-desc {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  width: 100%;
}

/* Task Manager */
.taskmanager-tabs {
  display: flex;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.taskmanager-tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.taskmanager-tab:hover {
  background: rgba(0, 0, 0, 0.05);
}

.taskmanager-tab.active {
  border-bottom-color: #0078d4;
  color: #0078d4;
}

.taskmanager-content {
  padding: 15px;
  overflow: auto;
}

.process-list {
  width: 100%;
  border-collapse: collapse;
  overflow: auto;
  display: block;
}

.process-list th,
.process-list td {
  padding: 10px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.process-list th {
  font-weight: 600;
  background: #f5f5f5;
  position: sticky;
  top: 0;
}

.process-list tr:hover {
  background: rgba(0, 120, 212, 0.05);
}

/* ============================================
   GAME STYLES - RESPONSIVE
   ============================================ */

/* Snake Game */
.snake-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #1a1a2e;
  color: white;
  padding: 10px;
}

.snake-canvas {
  border: 2px solid #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  max-width: 100%;
  max-height: 70%;
}

.snake-score {
  font-size: 24px;
  margin-bottom: 15px;
  font-family: 'Courier New', monospace;
  text-align: center;
}

.snake-controls {
  margin-top: 15px;
  text-align: center;
  width: 100%;
}

.snake-btn {
  padding: 10px 30px;
  font-size: 16px;
  background: #00ff88;
  color: #1a1a2e;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
  width: 100%;
  max-width: 200px;
}

.snake-btn:hover {
  background: #00cc6a;
  transform: scale(1.05);
}

/* Tetris Game */
.tetris-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 100%;
  padding: 20px;
  background: #0d0d1a;
}

@media (min-width: 769px) {
  .tetris-container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.tetris-canvas {
  border: 2px solid #00d4ff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  max-width: 100%;
}

.tetris-sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 300px;
}

.tetris-next {
  background: #1a1a2e;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #333;
  text-align: center;
}

.tetris-next canvas {
  display: block;
  margin: 10px auto;
}

.tetris-stats {
  background: #1a1a2e;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #333;
  font-family: 'Courier New', monospace;
  color: white;
}

.tetris-stat {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
}

.tetris-btn {
  padding: 12px 24px;
  font-size: 16px;
  background: #00d4ff;
  color: #0d0d1a;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
  width: 100%;
}

.tetris-btn:hover {
  background: #00a8cc;
  transform: scale(1.05);
}

/* Pong Game */
.pong-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #000;
  color: white;
  padding: 10px;
}

.pong-canvas {
  border: 2px solid #fff;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
  max-width: 100%;
  max-height: 70%;
}

.pong-score {
  display: flex;
  gap: 50px;
  font-size: 48px;
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
  justify-content: center;
  width: 100%;
}

.pong-controls {
  margin-top: 20px;
  text-align: center;
  width: 100%;
}

.pong-btn {
  padding: 12px 30px;
  font-size: 16px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
  width: 100%;
  max-width: 200px;
}

.pong-btn:hover {
  background: #ccc;
  transform: scale(1.05);
}

/* Games Menu */
.games-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 30px;
}

.game-card {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 212, 255, 0.5);
}

.game-card .game-icon {
  font-size: 64px;
  margin-bottom: 15px;
}

.game-card .game-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.game-card .game-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* ============================================
   SCROLLBARS
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

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

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.window.opening {
  animation: windowOpen 0.2s ease;
}

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

/* ============================================
   MEJORAS ESPECÍFICAS PARA VENTANAS EN MÓVIL
   ============================================ */

/* Evitar zoom en inputs en iOS */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Mejorar arrastre de ventanas en móvil */
@media (max-width: 768px) {
  .window-titlebar {
    touch-action: pan-x pan-y;
  }
  
  .window {
    touch-action: none;
  }
}

/* Asegurar que los botones sean tocables */
@media (max-width: 768px) {
  button, .window-btn, .taskbar-item, .desktop-icon, .start-item {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Ajustar tamaño de fuente en móvil */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-size: 1.2em;
  }
}

/* Optimizar animaciones para móvil */
@media (max-width: 768px) {
  .window {
    transition: transform 0.15s, opacity 0.15s;
  }
  
  * {
    animation-duration: 0.3s !important;
  }
}
