/* Importar Tipografía Outfit de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --bg-dark: #090a0f;
  --panel-bg: rgba(18, 20, 32, 0.65);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --accent-blue: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

/* === Fondo Animado de Admin === */
.admin-body {
  background: radial-gradient(circle at 10% 20%, rgba(18, 20, 32, 1) 0%, rgba(9, 10, 15, 1) 90%);
}

.admin-body::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  animation: float 20s infinite linear;
  pointer-events: none;
  z-index: 0;
}

@keyframes float {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === Panel Glassmorphism === */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px;
  width: 90%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

h1 {
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  text-align: center;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 32px;
  font-weight: 300;
}

/* === Elementos de Formulario === */
.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Contenedor de Color Pickers */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 16px;
  transition: all 0.3s ease;
}

.color-picker-wrapper:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
}

.color-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  cursor: pointer;
  margin-right: 16px;
}

.color-input::-webkit-color-swatch {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.color-text {
  font-family: monospace;
  font-size: 1.1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  text-transform: uppercase;
}

/* Inputs de texto / número */
.text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s ease;
}

.text-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* === Botones === */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(29, 78, 216, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(29, 78, 216, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

/* === Estado de Conexión y Notificaciones === */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.status-badge.connected {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border-color: rgba(16, 185, 129, 0.2);
}

.status-badge.disconnected {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border-color: rgba(239, 68, 68, 0.2);
}

.status-badge.offline {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  border-color: rgba(245, 158, 11, 0.2);
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background-color: currentColor;
  display: inline-block;
}

.status-badge.connected .dot {
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Notificación flotante */
.notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 20, 32, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 24px;
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
}

.notification.show {
  transform: translateX(-50%) translateY(0);
}

.notification.success {
  border-left: 4px solid var(--success-color);
}

.notification.error {
  border-left: 4px solid var(--error-color);
}

/* === Pantalla de Usuario (Show) === */
.show-body {
  width: 100vw;
  height: 100vh;
  transition: background-color 0s linear; /* Controlado dinámicamente */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* HUD Overlay en pantalla completa */
.hud-overlay {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.5s ease;
}

.hud-overlay.hidden {
  opacity: 0;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: auto;
}

.hud-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: auto;
}

.hud-card {
  background: rgba(10, 11, 18, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
  border-radius: 16px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.hud-card p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.hud-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.hud-card-interactive {
  cursor: pointer;
  transition: all 0.3s ease;
}

.hud-card-interactive:hover {
  background: rgba(10, 11, 18, 0.65);
  transform: translateY(-2px);
}

/* Botón flotante para alternar HUD */
.hud-toggle-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 16px;
  border-radius: 100px;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
