/* Fullscreen, gradient, and clean UI */
:root {
  --bg-start: #0f172a;
  --bg-end: #111827;
  --glass: rgba(255, 255, 255, 0.06);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --brand: #60a5fa;
  --accent: #22d3ee;
  --ok: #34d399;
  --danger: #f87171;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 10%, rgba(34,211,238,0.12), transparent 40%),
              radial-gradient(1200px 800px at 90% 30%, rgba(96,165,250,0.12), transparent 40%),
              linear-gradient(160deg, var(--bg-start), var(--bg-end));
  background-attachment: fixed;
}

.app-header, .app-footer {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 🔥 Header ampliado */
.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 920px;        /* igual que el chat */
  padding: 16px 24px;
  border-radius: 16px;     /* mismo estilo que las cards */
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}

/* Texto de marca más grande */
.brand-text { 
  display: flex; 
  flex-direction: column; 
  line-height: 1.2; 
}
.brand-text strong { 
  font-weight: 800; 
  font-size: 1.6rem; 
  letter-spacing: 0.5px; 
}
.brand-text span { 
  color: var(--muted); 
  font-size: 1rem; 
  margin-top: 2px; 
}

/* Logo más grande */
.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.25);
}
.avatar img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}

.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

#welcome h1 {
  margin: 0 0 8px 0;
  font-size: 34px;
}

#welcome p { color: var(--muted); margin-top: 0; }

.input-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

input[type="text"] {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
  font-size: 16px; /* ✅ evita el auto-zoom en iOS */
}
input[type="text"]::placeholder { color: #b6bcc6; }

button {
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  color: #0b1220;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  cursor: pointer;
  transition: transform 0.05s ease;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:active { transform: translateY(1px); }

.hint { display: block; color: var(--muted); margin-top: 6px; }

.chat {
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
}
.hidden { display: none; }

.messages {
  height: 58vh;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.msg .bubble {
  max-width: 70%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}
.msg.user { justify-content: flex-end; }
.msg.user .bubble {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.35);
}

.chat-form {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
}

.app-footer a {
  color: var(--muted);
  text-decoration: none;
}
