/* ========================================
   CAMIONERO OS - Escritorio Windows 98
   ======================================== */

/* ---------- Variables ---------- */
:root {
  --negro: #0a0a0a;
  --blanco: #f0f0e8;
  --amarillo: #f5c518;
  --verde-ruta: #006b3f;
  --gris-asfalto: #1a1a1a;

  --font-titulo: 'VT323', monospace;
  --font-cuerpo: 'Share Tech Mono', monospace;

  --taskbar-height: 36px;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-cuerpo);
  font-size: 13px;
}


/* ========================================
   BOOT SCREEN
   ======================================== */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.boot-content {
  text-align: center;
  color: #c0c0c0;
  font-family: var(--font-cuerpo);
}

.boot-logo {
  font-family: var(--font-cuerpo);
  font-size: 8px;
  line-height: 1.1;
  color: #c0392b;
  margin-bottom: 20px;
  display: block;
  white-space: pre;
}

.boot-text {
  font-size: 14px;
  margin: 4px 0;
  color: #c0c0c0;
}

.boot-loading {
  font-size: 13px;
  color: #aaa;
}

.boot-progress {
  width: 300px;
  height: 20px;
  margin: 12px auto;
  background: #000;
  border: 2px inset #c0c0c0;
  padding: 2px;
}

.boot-progress-bar {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    navy 0px,
    navy 8px,
    #000 8px,
    #000 10px
  );
  transition: width 0.3s linear;
}

.boot-skip {
  font-size: 12px;
  color: #666;
  margin-top: 16px;
}

#boot-screen.hiding {
  animation: bootFade 0.5s forwards;
}

@keyframes bootFade {
  to { opacity: 0; pointer-events: none; }
}


/* ========================================
   DESKTOP - Fondo Ruta Argentina
   ======================================== */
#desktop {
  position: fixed;
  inset: 0;
  bottom: var(--taskbar-height);
  overflow: hidden;
  background: #17102b;
}

/* ---------- Efectos sobre el fondo ---------- */

/* Scanlines CRT */
#desktop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 3;
}

/* Viñeta oscura */
#desktop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
  z-index: 2;
}


/* ---------- Escena de ruta pixel art ---------- */
#escena-ruta {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
}

/* El paisaje se desplaza en loop: todo a la misma "velocidad de suelo",
   salvo el pasto lejano y las nubes (parallax) */
.lineas {
  animation: rodarSuelo 0.72s linear infinite;
}

.postes {
  animation: rodarPostes 2.4s linear infinite;
}

.pasto {
  animation: rodarPasto 24s linear infinite;
}

.nubes {
  animation: rodarNubes 90s linear infinite;
}

@keyframes rodarSuelo {
  to { transform: translateX(-24px); }
}

@keyframes rodarPostes {
  to { transform: translateX(-80px); }
}

@keyframes rodarPasto {
  to { transform: translateX(-240px); }
}

@keyframes rodarNubes {
  to { transform: translateX(-240px); }
}

/* Camion: entra desde la izquierda cuando termina el boot, despues rebota */
.camion-wrap {
  transform: translateX(-140px);
}

#escena-ruta.andando .camion-wrap {
  animation: camionEntra 2s steps(28) forwards;
}

@keyframes camionEntra {
  from { transform: translateX(-140px); }
  to   { transform: translateX(0); }
}

.camion-bounce {
  animation: camionRebota 0.4s steps(1) infinite;
}

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

/* Humo del escape */
.humo {
  opacity: 0;
  animation: subeHumo 1.6s steps(4) infinite;
}

.humo.h2 { animation-delay: 0.5s; }
.humo.h3 { animation-delay: 1s; }

@keyframes subeHumo {
  0%   { transform: translate(0, 0); opacity: 0.9; }
  100% { transform: translate(-8px, -12px); opacity: 0; }
}

/* Giro de ruedas: 2 frames alternados */
.rayo-a {
  animation: giroA 0.25s steps(1) infinite;
}

.rayo-b {
  animation: giroB 0.25s steps(1) infinite;
}

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

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

/* Luces de posicion del techo */
.luces-techo {
  animation: pulsoLuces 2.4s steps(1) infinite;
}

@keyframes pulsoLuces {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Estrellas titilando */
.estrella {
  animation: titila 2.4s steps(1) infinite;
}

.estrella.e2 { animation-delay: 0.8s; }
.estrella.e3 { animation-delay: 1.6s; }

@keyframes titila {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}

/* En pantallas verticales el recorte del SVG deja al camion afuera:
   se lo corre hacia el centro de la escena */
@media (max-aspect-ratio: 2/3) {
  .camion-wrap {
    transform: translateX(-140px);
  }

  #escena-ruta.andando .camion-wrap {
    animation-name: camionEntraMovil;
  }
}

@keyframes camionEntraMovil {
  from { transform: translateX(-140px); }
  to   { transform: translateX(55px); }
}

@media (prefers-reduced-motion: reduce) {
  .lineas, .postes, .pasto, .nubes,
  .camion-bounce, .humo, .estrella,
  .rayo-a, .rayo-b, .luces-techo,
  #escena-ruta.andando .camion-wrap {
    animation: none;
  }
  .camion-wrap {
    transform: none;
  }
  .humo {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) and (max-aspect-ratio: 2/3) {
  .camion-wrap {
    transform: translateX(55px);
  }
}


/* ========================================
   ICONOS DE ESCRITORIO
   ======================================== */
.desktop-icons {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.desktop-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  font-family: var(--font-cuerpo);
  font-size: 11px;
  z-index: 1;
}

.desktop-icon:hover,
.desktop-icon:focus {
  background: rgba(0, 0, 128, 0.4) !important;
  border: none !important;
  outline: none !important;
}

.icon-emoji {
  font-size: 40px;
  line-height: 1;
  text-shadow: none;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.7));
}

.icon-img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.7));
}

/* Iconos pixel chicos en barras de titulo */
.titulo-icon {
  width: 14px;
  height: 14px;
  vertical-align: text-bottom;
  margin-right: 2px;
}

.rueda-girando-icon {
  animation: girar 3s linear infinite;
}

.icon-label {
  text-align: center;
  max-width: 104px;
  word-wrap: break-word;
}


/* ========================================
   VENTANAS (overrides de 98.css)
   ======================================== */
.win {
  position: absolute;
  display: none;
  z-index: 10;
  max-width: calc(100vw - 20px);
  font-family: var(--font-cuerpo);
  font-size: 13px;
}

.win.open {
  display: block;
}

.win .title-bar {
  cursor: grab;
  user-select: none;
}

.win .title-bar:active {
  cursor: grabbing;
}

.win-body {
  max-height: 70vh;
  overflow-y: auto;
  font-family: var(--font-cuerpo);
  line-height: 1.5;
}

/* Iframe drag protection overlay */
.win.dragging iframe {
  pointer-events: none;
}


/* ========================================
   CONTENIDO DE VENTANAS
   ======================================== */

/* -- Inicio -- */
.inicio-content {
  text-align: center;
  padding: 16px;
}

.inicio-patente {
  display: inline-block;
  border: 3px solid #000;
  padding: 12px 32px;
  background: #fff;
  margin-bottom: 16px;
}

.inicio-patente::before {
  content: '';
  display: none;
}

.patente-top {
  display: block;
  font-size: 12px;
  letter-spacing: 5px;
  color: #666;
  margin-bottom: 4px;
}

.inicio-titulo {
  font-family: var(--font-titulo);
  font-size: 64px;
  color: #000;
  letter-spacing: 8px;
  margin: 0;
  line-height: 1;
}

.patente-bottom {
  display: block;
  font-size: 13px;
  letter-spacing: 7px;
  color: #333;
  margin-top: 4px;
}

.inicio-sub {
  color: #666;
  font-size: 13px;
  margin-bottom: 16px;
}

.gif-placeholder {
  width: 160px;
  height: 120px;
  border: 2px dashed #ccc;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 11px;
  text-align: center;
  padding: 8px;
}

/* Rueda girando */
.rueda-girando {
  width: 120px;
  height: 120px;
  margin: 16px auto;
  display: block;
  animation: girar 3s linear infinite;
}

@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.inicio-credito {
  font-size: 11px;
  color: #888;
  font-style: italic;
}


/* -- Integrantes -- */
.banda-foto {
  width: 100%;
  max-height: none;
  object-fit: cover;
  border: 2px inset #c0c0c0;
  margin-bottom: 12px;
  display: block;
}

.integrantes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.integrante-card {
  text-align: center;
  padding: 8px;
}

.integrante-card strong {
  display: block;
  font-family: var(--font-titulo);
  font-size: 20px;
}

.integrante-card span {
  display: block;
  font-size: 14px;
  color: #666;
}


/* -- Musica -- */
.musica-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.musica-grid fieldset {
  padding: 8px;
}

.disco-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.disco-tapa {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 2px inset #c0c0c0;
  flex-shrink: 0;
}

.disco-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}


/* -- En Vivo -- */
.fechas-tabla {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-cuerpo);
  font-size: 12px;
}

.fechas-tabla th {
  background: var(--verde-ruta);
  color: #fff;
  padding: 6px 10px;
  text-align: left;
  font-family: var(--font-titulo);
  font-size: 15px;
  letter-spacing: 1px;
}

.fechas-tabla td {
  padding: 6px 10px;
  border-bottom: 1px solid #dfdfdf;
}

.fechas-tabla tr:hover td {
  background: #e8e8e8;
}

.estado-pasada {
  color: #999;
  font-family: var(--font-titulo);
  font-size: 14px;
}

.estado-proxima {
  color: var(--verde-ruta);
  font-family: var(--font-titulo);
  font-size: 14px;
  font-weight: bold;
  animation: parpadeo 1.5s infinite;
}

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

.fila-proxima td {
  background: #ffffdd;
}


/* -- El Acoplado -- */
.acoplado-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.acoplado-card {
  text-align: center;
  padding: 8px;
}

.acoplado-img {
  width: 100%;
  height: 80px;
  border: 2px inset #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  background: #f0f0f0;
  margin-bottom: 6px;
}


/* -- Contacto -- */
.contacto-body {
  text-align: center;
}

.contacto-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.contacto-btn {
  text-decoration: none;
}

.contacto-btn button {
  font-family: var(--font-titulo);
  font-size: 18px;
  letter-spacing: 1px;
  padding: 8px 18px;
  cursor: pointer;
}


/* -- no_es_un_virus.exe -- */
.virus-pop {
  position: absolute;
}

.virus-body {
  padding: 3px;
}

.virus-body img {
  display: block;
  width: 100%;
}

.virus-body-texto {
  text-align: center;
  padding: 14px 10px;
  font-family: var(--font-cuerpo);
}

.virus-body-texto p {
  margin: 0 0 6px;
}

.virus-ok {
  margin-top: 8px;
  font-family: var(--font-titulo);
  font-size: 16px;
  padding: 4px 24px;
  cursor: pointer;
}

.virus-pop.titila .title-bar {
  animation: titiloVirus 0.5s steps(1) infinite;
}

@keyframes titiloVirus {
  0%, 100% { background: linear-gradient(90deg, navy, #1084d0); }
  50%      { background: linear-gradient(90deg, #8e2b20, #c0392b); }
}

.virus-pop.tiembla {
  animation: tiemblaVirus 0.14s linear infinite;
}

@keyframes tiemblaVirus {
  0%   { margin-left: 0;    margin-top: 0; }
  25%  { margin-left: -2px; margin-top: 1px; }
  50%  { margin-left: 2px;  margin-top: -1px; }
  75%  { margin-left: -1px; margin-top: -2px; }
  100% { margin-left: 1px;  margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .virus-pop.titila .title-bar,
  .virus-pop.tiembla {
    animation: none;
  }
}


/* ========================================
   TASKBAR
   ======================================== */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-height);
  background: #c0c0c0;
  border-top: 2px outset #fff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 9999;
  font-family: var(--font-cuerpo);
}

.start-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-family: var(--font-titulo);
  font-size: 16px;
  font-weight: bold;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
}

.start-icon-img {
  width: 20px;
  height: 20px;
}

.start-text {
  letter-spacing: 1px;
}

.taskbar-divider {
  width: 2px;
  height: 24px;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  flex-shrink: 0;
}

.taskbar-windows {
  display: flex;
  gap: 3px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
}

.taskbar-btn {
  height: 24px;
  padding: 0 12px;
  font-family: var(--font-cuerpo);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  flex-shrink: 0;
}

.taskbar-btn.active {
  font-weight: bold;
  border-style: inset;
}

.taskbar-clock {
  padding: 2px 10px;
  font-size: 12px;
  font-family: var(--font-cuerpo);
  border: 2px inset #c0c0c0;
  height: 24px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  background: #c0c0c0;
}


/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .desktop-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-content: start;
    padding: 44px 8px 12px;
    gap: 24px 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    bottom: auto;
  }

  .desktop-icon {
    position: static !important;
    padding: 8px 2px;
    min-width: 0;
  }

  .icon-label {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .icon-emoji {
    font-size: 32px;
  }

  .win:not(.virus-pop) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    /* 100vh en movil incluye la zona detras de la barra del navegador;
       dvh es el alto realmente visible */
    height: calc(100vh - var(--taskbar-height)) !important;
    height: calc(100dvh - var(--taskbar-height)) !important;
    max-width: 100vw !important;
    border-radius: 0;
  }

  .win.open:not(.virus-pop) {
    display: flex !important;
    flex-direction: column;
  }

  .win:not(.virus-pop) .title-bar {
    flex: 0 0 auto;
  }

  .win:not(.virus-pop) .win-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .integrantes-grid {
    grid-template-columns: 1fr;
  }

  .acoplado-grid {
    grid-template-columns: 1fr;
  }

  .boot-logo {
    font-size: 4px;
  }

  .boot-progress {
    width: 200px;
  }
}
