/* ===================================
   RESPONSIVE - ADAPTACIÓN MÓVIL
   =================================== */

/* ===================================
   VIEWPORT MÓVIL (max-width: 768px)
   =================================== */
@media (max-width: 768px) {
  
  /* ===================================
     BODY - BASE
     =================================== */
  body {
    width: 100vw;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
  }

  /* ===================================
     GAME WORLD - CONTENEDOR PRINCIPAL
     =================================== */
  .game-world {
    width: 100vw !important;
    height: auto !important;
    min-height: 100vh;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    transform: scale(1) !important;
    overflow: visible !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 0;
    margin: 0;
  }

  /* ===================================
     HORA DINÁMICA - ARRIBA (SIEMPRE FIJO)
     =================================== */
  .hora-dinamica {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: white;
    text-align: right;
    z-index: 200;
    line-height: 1.3;
    opacity: 0;
    width: auto;
  }

  /* ===================================
     TÍTULO GATOPSIA - ARRIBA DESPUÉS DEL RELOJ
     =================================== */
  .titulo-gatopsia {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 50px auto 0 !important;
    font-size: 2.2rem !important;
    text-align: center;
    letter-spacing: 0.15rem !important;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    opacity: 1 !important;
    transform: scale(1) !important;
    order: 1;
  }

  /* ===================================
     SUBTÍTULO - BAJO TITULO
     =================================== */
  .titulo-sub {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 5px auto 20px !important;
    text-align: center;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    font-size: 0.9rem !important;
    opacity: 1 !important;
    transform: none !important;
    order: 2;
  }

  /* ===================================
     MASCOTA - DESPUÉS SUBTITULO
     =================================== */
  .gatopsia-cat {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: scale(0.75) !important;
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 30px auto;
    pointer-events: auto !important;
    z-index: 5;
    opacity: 1 !important;
    order: 3;
  }

  .gatopsia-cat::before {
    display: none !important;
  }

  /* ===================================
     MENÚ SECCIONES (TEXTOS DE ARCHIVO) - DESPUÉS MASCOTA
     =================================== */
  .menu-secciones {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8rem;
    width: 100%;
    padding: 20px 15px;
    box-sizing: border-box;
    z-index: 10;
    order: 4;
  }

  .menu-secciones .seccion {
    font-size: 1rem !important;
    gap: 0.8rem !important;
    padding: 8px 10px;
    width: 100%;
    flex-shrink: 0;
    text-align: left;
    transform: none !important;
  }

  .menu-secciones .seccion.active {
    transform: scale(1) !important;
  }

  .menu-secciones .icono-seccion {
    opacity: 1;
  }

  .menu-secciones .icono-seccion svg {
    width: 1.4rem;
    height: 1.4rem;
  }

  /* ===================================
     SECCIÓN DE REDES SOCIALES - ABAJO
     =================================== */
  .seccion-redes {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    z-index: 5;
    pointer-events: auto;
    opacity: 1 !important;
    width: 100%;
    padding: 30px 15px;
    box-sizing: border-box;
    animation: none !important;
    text-align: center;
    order: 5;
  }

  .seccion-redes.boot-active {
    animation: none !important;
  }

  .redes-texto {
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(255,255,255,0.9), 0 0 12px rgba(2, 138, 150, 0.8);
    line-height: 1.6;
    max-width: 100%;
    letter-spacing: 0.3px;
    text-align: center;
    padding: 0;
  }

  .redes-sociales {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .red-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 5px;
  }

  .red-item:active {
    transform: scale(0.95);
  }

  .icono-red {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .icono-red img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
  }

  .red-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.2;
  }

  /* ===================================
     PANEL DE SISTEMA - FIJO ABAJO IZQUIERDA
     =================================== */
  .panel-sistema {
    position: fixed !important;
    bottom: 15px !important;
    left: 15px !important;
    right: auto !important;
    top: auto !important;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    color: white;
    z-index: 200;
    max-width: 140px;
    line-height: 1.3;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }

  .panel-sistema .line {
    opacity: 0;
    transform: translateX(-10px);
    margin-bottom: 4px;
  }

  .panel-sistema .line.show {
    animation: lineAppear 0.9s ease forwards;
  }

  .panel-sistema .line:last-child {
    margin-bottom: 0;
  }

  @keyframes lineAppear {
    from {
      opacity: 0;
      transform: translateX(-10px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* ===================================
     OVERLAY
     =================================== */
  #overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 50;
  }

  .overlay-text {
    font-size: 1rem;
    top: 50%;
  }

  /* ===================================
     CONTENEDORES DE CONTENIDO
     =================================== */
  .contenido-archivo,
  .archivo-content,
  [class*="content"],
  [class*="archivo"] {
    position: relative !important;
    width: 100%;
    padding: 20px 15px;
    box-sizing: border-box;
  }

  /* ===================================
     TEXTOS FANTASMAS - OCULTAR EN MÓVIL
     =================================== */
  .ghost-text {
    display: none !important;
  }

  /* ===================================
     AGRADECIMIENTO - AL FONDO
     =================================== */
  .agradecimiento,
  .gracias,
  .thanks,
  .footer-text,
  [class*="thanks"],
  [class*="agradec"] {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100%;
    text-align: center;
    padding: 40px 15px !important;
    box-sizing: border-box;
    margin-top: 20px !important;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

}

/* ===================================
   TABLETS (768px - 1024px)
   =================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  
  .game-world {
    min-height: 100vh;
    height: auto;
  }

  .titulo-gatopsia {
    font-size: 4rem;
    top: 20px;
    right: 20px;
  }

  .gatopsia-cat {
    width: 25rem;
    top: 50%;
    left: 50%;
  }

  .menu-secciones {
    left: 50%;
    top: calc(60% + 5rem);
    width: auto;
  }

  .seccion {
    font-size: 1.4rem;
  }

  .panel-sistema {
    bottom: 20px;
    left: 20px;
    max-width: 200px;
  }

  .hora-dinamica {
    top: 20px;
    left: 20px;
    font-size: 13px;
  }

}

/* ===================================
   ANIMACIONES PARA MÓVIL
   =================================== */
@keyframes lineFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
