/* =========================
   VARIABLES
========================= */
:root {
  --primary: #008cff;
  --bg-dark: #000000;
  --panel-dark: #0e0e0e;
  --text-light: #eaeaea;
  --muted: #9aa4b2;
  --radius: 14px;
  --glow: 0 0 18px rgba(0,140,255,.35);
}

/* =========================
   RESET BÁSICO
========================= */
* {
  box-sizing: border-box;
}

/* =========================
   BODY
========================= */
body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: Arial, Helvetica, sans-serif;
  padding: 20px;
  line-height: 1.5;
  text-align: center;
}

/* Centrado general */
body > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   TEXTOS
========================= */
h1 { letter-spacing: 1px; }

h2 { color: var(--muted); }

.actualizado { font-style: italic; color: var(--muted); }

/* =========================
   BOTONES
========================= */
.button {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--primary), #004cff);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  margin: 8px;
  font-weight: 600;
  box-shadow: var(--glow);
  transition: transform .2s, box-shadow .2s;
}

.button:hover { transform: translateY(-2px); box-shadow: 0 0 25px rgba(0,140,255,.6); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }

/* =========================
   LINKS
========================= */
.link { display: inline-block; margin-top: 20px; color: var(--primary); text-decoration: none; }

/* =========================
   CONTENEDORES
========================= */
#dispositivos-container,
#chatbot,
.modal-panel,
.legal-text {
  background: var(--panel-dark);
  border: 1px solid rgba(0,140,255,.25);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 0 20px rgba(0,140,255,.15);
  margin-top: 20px;
}

/* Ocultos por defecto (mismo comportamiento que antes) */
#dispositivos-container, #chatbot { display: none; }

/* =========================
   DISPOSITIVOS
========================= */
.dispositivo {
  background: #111;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 20px;
}

/* =========================
   IMÁGENES
========================= */
img { max-width: 100%; border-radius: 10px; }

/* =========================
   INPUTS
========================= */
#search-box, #user-prompt {
  width: 100%;
  padding: 12px;
  background: #0b0b0b;
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

/* =========================
   CHAT
========================= */
#chat-log {
  max-height: 260px;
  overflow-y: auto;
  background: #0b0b0b;
  padding: 10px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  text-align: left;
}

#chat-form { display: flex; gap: 10px; }
#user-prompt { flex: 1; }

/* =========================
   CARD ACTIONS
========================= */
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* =========================
   MODAL
========================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  z-index: 999;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 1000;
  padding: 16px;
}

.modal-panel {
  width: min(900px, 92vw);
  max-height: 88vh;
  overflow: auto;
  background: var(--panel-dark);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  padding: 16px;
}

  footer {
    position: relative;
    background-color: #333; /* gris oscuro*/
    color: white;
    padding: 15px 20px; /* Espaciado interno */
    text-align: center;
    min-height: 80px;
    overflow: hidden;
  }

  /* Footer background image that covers the whole footer area */
  .footer img.footer-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.14;
    border-radius: 0;
    z-index: 0;
  }

  .footer .footer-content {
    position: relative;
    z-index: 1;
  }

.modal-header { display:flex; justify-content: space-between; align-items:center; }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-body iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 8px; }

/* Pequeños ajustes responsivos */
@media (max-width: 600px) {
  .button { width: 100%; }
}
