/* --- ESTILOS GENERALES (STYLES.CSS) --- */
/* (Restaurado de tu proyecto original y actualizado) */
body {
    margin: 0;
    padding: 0;
    /* Evita que la página se mueva o rebote en móviles */
    overflow: hidden; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    background-color: #111;
    color: white;
    /* Deshabilita la selección de texto, útil en móviles */
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

#info-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: #333;
    /* Asegura que el canvas no cause desbordamiento */
    display: block;
}

/* --- ¡MODIFICADO! ESTILOS PARA BOCADILLO DE NPC --- */
/* (Reemplaza los estilos de .npc-modal-*) */

#speech-bubble {
    position: absolute;
    z-index: 20;
    
    /* Apariencia del bocadillo (tema oscuro) */
    background-color: #2d3748; /* bg-gray-800 */
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 250px;
    text-align: left;
    
    /* Posicionamiento: 
      El JS pone left/top en la cabeza del NPC.
      Esto centra el bocadillo (horizontal) y lo pone encima (vertical) 
      con un pequeño margen.
    */
    transform: translate(-50%, calc(-100% - 15px)); /* -100% y 15px extra de padding */
    
    /* Transición suave */
    transition: opacity 0.2s ease, transform 0.2s ease;
    
    /* Evita que el bocadillo intercepte clics */
    pointer-events: none;
}

.speech-bubble-hidden {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 15px)) scale(0.8);
    pointer-events: none; /* Asegurar que está oculto */
}

.speech-bubble-visible {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 15px)) scale(1);
}

#speech-bubble-text {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

/* La "cola" del bocadillo (triángulo) */
.speech-bubble-tail {
    position: absolute;
    bottom: -10px; /* Se solapa 1px con el borde para que no haya hueco */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #2d3748; /* Mismo color que el fondo */
    
    /* Sombra/borde para la cola (truco) */
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.2));
}


/* --- ¡NUEVO! ESTILOS PARA CONTROLES DE CÁMARA --- */
#camera-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px; /* Espacio entre botones */
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 12px;
}

#camera-controls button {
    width: 50px;
    height: 50px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%; /* Botones redondos */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    /* Evita el destello azul al tocar en móviles */
    -webkit-tap-highlight-color: transparent; 
}

#camera-controls button:active {
    background-color: rgba(255, 255, 255, 0.3);
}


#menu-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
}

#menu-toggle-btn {
    width: 50px;
    height: 50px;
    font-size: 28px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%; /* Botón redondo */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    -webkit-tap-highlight-color: transparent; 
}

#menu-toggle-btn:active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* --- ¡NUEVO! ESTILOS PARA MENÚ DE INTERACCIÓN --- */
#interaction-menu-modal {
    position: absolute;
    z-index: 19; /* Debajo del bocadillo pero encima de todo lo demás */
    background-color: #2d3748; /* bg-gray-800 */
    color: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 200px;
    
    /* Posicionamiento (igual que el bocadillo) */
    transform: translate(-50%, calc(-100% - 15px));
    transition: opacity 0.2s ease, transform 0.2s ease;
    
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Espacio entre título, botones y cancelar */
}

.interaction-menu-hidden {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 15px)) scale(0.8);
    pointer-events: none;
}

.interaction-menu-visible {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 15px)) scale(1);
    pointer-events: all;
}

#interaction-menu-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    color: #93c5fd; /* blue-300 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

#interaction-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Espacio entre botones */
}

#interaction-menu-buttons button {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #374151; /* gray-700 */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    transition: background-color 0.2s;
}

#interaction-menu-buttons button:hover {
    background-color: #4b5563; /* gray-600 */
}

#interaction-menu-close-btn {
    padding: 0.5rem;
    background-color: #991b1b; /* red-800 */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

#interaction-menu-close-btn:hover {
    background-color: #b91c1c; /* red-700 */
}