@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@100;300&display=swap");
/* 
   ========================================
   404 CAFÉ - ESTILO SISTEMA OPERATIVO RETRO
   ========================================
*/

:root {
  /* Paleta de colores 404 Café */
  --bg-purple: #9d81e1;
  --win-gray: #c3c7cb;
  --win-white: #ffffff;
  --win-shadow-dark: #404040;
  --win-shadow-light: #868a8e;
  --win-blue-title: linear-gradient(90deg, #7b5db3, #b194f1); /* Púrpura 404 */
  --neon-pink: #ff71ce;
  --neon-blue: #01cdfe;
  --text-dark: #050505;
}

/* 1. RESET Y FONDO (ESCRITORIO) */
* {
  box-sizing: border-box;
  image-rendering: pixelated; /* Para que los iconos se vean nítidos */
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-purple);
  /* Efecto de cuadrícula Vaporwave de fondo */
  background-image: 
    linear-gradient(rgba(157, 129, 225, 0.7), rgba(157, 129, 225, 0.7)),
    linear-gradient(white 1px, transparent 1px),
    linear-gradient(90deg, white 1px, transparent 1px);
  background-size: 100% 100%, 50px 50px, 50px 50px;
  
  font-family: 'Tahoma', 'Geneva', sans-serif;
  height: 100vh;
  overflow: hidden; /* Evita el scroll del escritorio */
  color: var(--text-dark);
}

/* 2. ICONOS DEL ESCRITORIO */
#desktop-icons {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 20px;
}

.linksescritorio, .linksescritorio2, .linksescritorio3 {
  position: relative !important; /* Quitamos el absolute previo para usar flex */
  display: flex;
  flex-direction: column;
  gap: 10px;
  left: 0 !important;
}

.linkescritorio {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  width: 90px;
  padding: 10px 5px;
  border: 1px solid transparent;
  transition: 0.1s;
}

.linkescritorio:hover {
  background-color: rgba(0, 0, 128, 0.1);
  border: 1px dotted #fff;
}

.linkescritorio img {
  width: 42px;
  height: 42px;
  margin-bottom: 5px;
  /* Filtro para dar tono púrpura/rosa a iconos genéricos */
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.2));
}

.linkescritorio p {
  margin: 0;
  color: white;
  font-size: 11px;
  text-align: center;
  text-shadow: 1px 1px 1px #000;
  word-wrap: break-word;
}

/* 3. VENTANAS (VENTANITAS) - ESTILO WIN95/98 */
.ventanitas {
  position: absolute;
  background: var(--win-gray);
  display: none;
  min-width: 250px;
  
  /* Borde 3D clásico de Windows */
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-shadow-dark);
  border-bottom: 2px solid var(--win-shadow-dark);
  box-shadow: 1px 1px 0px 1px #000;
  
  padding: 3px;
  z-index: 100;
}

/* Barra de título */
.barra {
  background: var(--win-blue-title);
  color: white;
  padding: 3px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.5px;
  cursor: move;
}

/* Botón de cerrar (X) */
.close {
  background: var(--win-gray);
  color: var(--text-dark);
  width: 16px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  border-top: 1px solid var(--win-white);
  border-left: 1px solid var(--win-white);
  border-right: 1px solid var(--win-shadow-dark);
  border-bottom: 1px solid var(--win-shadow-dark);
  cursor: pointer;
}

.close:active {
  border-top: 1px solid var(--win-shadow-dark);
  border-left: 1px solid var(--win-shadow-dark);
  border-right: 1px solid var(--win-white);
  border-bottom: 1px solid var(--win-white);
  padding: 2px 0 0 2px;
}

/* Contenedor del Iframe / Contenido */
.ventanitas iframe {
  width: 100%;
  border: 2px solid var(--win-shadow-light);
  background: white;
  display: block;
}

/* 4. BARRA DE TAREAS (TASKBAR) */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35px;
  background: var(--win-gray);
  
  border-top: 2px solid var(--win-white);
  display: flex;
  align-items: center;
  padding: 2px 5px;
  z-index: 9999;
}

/* Botón Start */
#start {
  height: 28px;
  padding: 0 10px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-shadow-dark);
  border-bottom: 2px solid var(--win-shadow-dark);
  
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

#start:active {
  border: 2px inset var(--win-white);
  padding: 2px 9px 0 11px;
}

#start::before {
  /*content: "💾";  Icono representativo 404 */
  font-size: 14px;
}

/* Botones de tareas abiertas */
#tasks button {
  height: 28px;
  margin-left: 5px;
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-shadow-dark);
  border-bottom: 2px solid var(--win-shadow-dark);
  font-size: 12px;
  padding: 0 10px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5. ELEMENTOS EXTRA "404 CAFÉ" */

/* Scrollbars Retro */
::-webkit-scrollbar {
  width: 16px;
  background: var(--win-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--win-gray);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-shadow-dark);
  border-bottom: 2px solid var(--win-shadow-dark);
}

/* Efecto de texto CRT (Scanlines) - Opcional */
body::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%), 
              linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
  z-index: 10000;
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
}

/* Animación de carga tipo 404 */
.loading-bar {
  width: 100%;
  height: 20px;
  border: 2px solid var(--win-shadow-dark);
  background: #fff;
  position: relative;
}

.loading-fill {
  height: 100%;
  background: var(--win-blue-title);
  width: 0%;
  transition: width 0.5s;
}

/* Responsive */
@media (max-width: 600px) {
  #desktop-icons {
    flex-direction: column;
    padding: 10px;
  }
  .linksescritorio {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* OPTIMIZACIÓN PARA MÓVILES (IPHONE / ANDROID) */
@media (max-width: 600px) {
    
    /* El fondo ya no debe tener grid pesado para cargar rápido */
    body { background-size: 20px 20px; }

    /* Los iconos del escritorio más pequeños y centrados */
    #desktop-icons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .linkescritorio img { width: 32px; height: 32px; }
    .linkescritorio p { font-size: 9px; }

    /* VENTANAS EN MÓVIL: CASI PANTALLA COMPLETA */
    .ventanitas {
        width: 96% !important;
        left: 2% !important;
        top: 10px !important;
        height: 85vh !important; /* Que ocupe casi toda la altura */
    }

    /* BARRA DE TAREAS MÓVIL */
    #taskbar {
        height: 45px;
    }
    
    #start { font-size: 11px; padding: 0 5px; }
    
    /* Ocultamos el reloj en móviles muy pequeños para dar espacio a las ventanas */
    #systray { display: none; }

    /* Ajuste de IFRAMES para scroll fluido en iOS */
    .ventanitas iframe {
        height: calc(100% - 35px) !important;
        -webkit-overflow-scrolling: touch; /* Scroll suave en iPhone */
    }
}

/* ESTILO MENÚ INICIO WIN95 */
#start-menu {
    position: fixed;
    bottom: 35px;
    left: 2px;
    width: 200px;
    background: #c3c7cb;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    display: flex;
    z-index: 10000;
}

.start-sidebar {
    background: #808080;
    width: 30px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
}

.start-sidebar span {
    transform: rotate(-90deg);
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    font-size: 14px;
    margin-bottom: 2em;
    margin-left: -1em;
}

.start-options { width: 100%; padding: 2px; }

.start-item {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    cursor: pointer;
}

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

.start-item:hover {
    background: #000080;
    color: #fff;
}
/* TKM&YTEAMO */
/* TU PUEDES HACERLO TODO */
/* <3 <3 <3 <3 */



