/* RESET Y BASE */
html, body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #008080;
  font-family: 'Courier New', Courier, monospace; 
  font-weight: bold;
  overflow: hidden; 
  color: black;
  cursor:url('./images/flecha.png'), auto;
}

* { box-sizing: border-box; }

/* =========================================
   1. SECCIÓN PRINCIPAL
   ========================================= */
.section--top {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
  align-items: center;         
  padding-top: 80px;           
  gap: 60px;                   
  position: relative;
  z-index: 1;
  pointer-events: none;
}

#drawingCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; 
  pointer-events: auto; 
  cursor: crosshair;
}

/* =========================================
   2. TÍTULO Y VENTANAS
   ========================================= */
.hero-title {
  position: relative;
  text-align: center;
  margin: 0;
  z-index: 20;
  pointer-events: auto; 
}

.hero-title h1 {
  font-family: 'Courier New', monospace;
  font-size: 50px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 4px 4px 0px #000080, 6px 6px 0px #000000;
  margin: 0;
  line-height: 1;
}

.location-tag {
  display: inline-block;
  background-color: #000080;
  color: white;
  padding: 8px 15px;
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
  border: 2px solid white;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
  transform: none;
}

.win95-window {
  background-color: #c0c0c0;
  border-top: 2px solid #dfdfdf;
  border-left: 2px solid #dfdfdf;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: 4px 4px 0px rgba(0,0,0,0.5);
  padding: 4px;
  width: 90%;
  max-width: 600px;
  position: fixed; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  pointer-events: auto;
}

.title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  padding: 3px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  cursor: move;       
  user-select: none;  
}

.title-bar-text { color: white; letter-spacing: 1px; }

.title-bar-controls button {
  background: #c0c0c0;
  border: 1px solid black;
  border-top-color: white;
  border-left-color: white;
  cursor: pointer;
  font-weight: bold;
}

.win95-btn {
  background: #c0c0c0;
  border: 2px solid black;
  border-top-color: white;
  border-left-color: white;
  padding: 5px 20px;
  color: black;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

/* =========================================
   3. ICONOS
   ========================================= */
.section--work {
  position: absolute;
  top: 20px;
  left: 20px;
  width: auto;
  z-index: 50;
  pointer-events: auto; 
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery__item {
  width: 100px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery__item:hover { background-color: #000080; outline: 1px dotted yellow; }
.gallery__img { width: 48px; height: 48px; margin-bottom: 5px; }
.gallery__caption { color: white; text-shadow: 1px 1px 1px black; font-size: 12px; }

.mobile-only-icons {
  display: none;
}

.pc-only-icons {
  display: block;
}

/* =========================================
   4. BARRA DE TAREAS Y MENÚ INICIO
   ========================================= */
.taskbar {
  position: fixed; bottom: 0; left: 0;
  width: 100%; height: 40px;
  background-color: #c0c0c0;
  border-top: 2px solid #dfdfdf;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 9999 !important;
  padding: 2px;
}

.start-btn {
  display: flex; align-items: center;
  height: 32px;
  background: #c0c0c0;
  border: 2px solid black;
  border-top-color: white; border-left-color: white;
  cursor: pointer; font-weight: bold;
}

.notification-area {
  background: #c0c0c0;
  border: 2px solid white; border-top-color: gray; border-left-color: gray;
  padding: 5px 10px;
  font-size: 12px;
}

.start-menu {
  position: fixed; bottom: 40px; left: 2px;
  width: 200px;
  background-color: #c0c0c0;
  border: 2px solid black; border-top-color: white; border-left-color: white;
  display: none; 
  z-index: 10000;
  flex-direction: row;
}

.start-sidebar {
  width: 30px; 
  background: linear-gradient(180deg, #000080, #1084d0);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
  flex-shrink: 0;
}

.vertical-text {
  writing-mode: vertical-rl; transform: rotate(180deg);
  color: white; font-weight: bold; font-family: sans-serif;
}

.start-options { 
  list-style: none; padding: 0; margin: 0; width: 100%; 
  background-color: #c0c0c0;
}

.start-options li { 
  padding: 10px; cursor: pointer; display: flex; align-items: center; 
  background-color: #c0c0c0;
  color: black;
}

.start-options li:hover { background: #000080; color: white; }
.start-options li img { width: 24px; margin-right: 10px; }

.divider {
  height: 1px;
  background: #808080;
  border-bottom: 1px solid #fff;
  margin: 2px 0;
  pointer-events: none;
}

/* SCROLLBAR RETRO */
#ventana-proyectos .window-body::-webkit-scrollbar { width: 16px; }
#ventana-proyectos .window-body::-webkit-scrollbar-track {
  background: #dfdfdf;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #808080;
}
#ventana-proyectos .window-body::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #808080;
  border: 1px solid #000;
}

.today {
    background-color: #000080 !important;
    color: white !important;
    font-weight: bold;
    border: 1px dotted white;
}

/* =========================================
   5. DISEÑO RESPONSIVE
   ========================================= */

/* --- CELULAR (MAX 600PX) --- */
@media (max-width: 600px) {

  body > .status-bar {
    display: none !important;
  }

  .pc-only-icons {
    display: none !important;
  }

  .mobile-only-icons {
    display: flex !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 20 !important;
    pointer-events: auto !important;
    width: 100% !important;
  }

  #drawingCanvas {
    z-index: -1 !important;
  }

  .section--top {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
    height: auto !important;
    min-height: 0 !important;
    position: relative !important;
    z-index: 5 !important;
  }

  .hero-title h1 {
    font-size: 22px !important;
    text-shadow: 2px 2px 0px #000080, 3px 3px 0px #000000 !important;
  }

  .location-tag {
    font-size: 11px !important;
    margin-top: 5px !important;
  }

  .icons-right {
    position: relative !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    z-index: 20 !important;
  }

  .mobile-only-icons {
    display: flex !important;
    justify-content: center !important;
    position: relative !important;
    z-index: 20 !important;
    pointer-events: auto !important;
    width: 100% !important;
    margin-top: 60px !important;
  }

  .gallery {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    justify-items: center !important;
  }

  /*
   * FIX MOBILE: solo ancho y fondo.
   * NO tocamos display, position, transform ni z-index
   * porque el JS los maneja dinámicamente.
   */
  .win95-window {
    width: 92% !important;
    max-width: 92% !important;
    background-color: #c0c0c0 !important;
    background: #c0c0c0 !important;
    box-shadow: 6px 6px 0px rgba(0,0,0,0.7) !important;
  }

  .window-body img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Imágenes de labs más chicas en mobile */
  #ventana-lab1-redes .window-body img,
  #ventana-lab4-redes .window-body img,
  #ventana-lab5-redes .window-body img {
    max-height: 80px !important;
  }
}

/* --- COMPUTADORA (MIN 601PX) --- */
@media (min-width: 601px) {
  .icons-right {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: auto !important;
    display: block !important;
    z-index: 50 !important;
  }

  .section--work {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    display: block !important;
    z-index: 50 !important;
  }

  .gallery {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  #drawingCanvas {
    z-index: 0 !important;
  }
}
