:root {
  --bg-dark: #0b141a;
  --header: #202c33;
  --bot-msg: #202c33;
  --user-msg: #005c4b;
  --input-bg: #1f2c34;
  --text-light: #e9edef;
  --shadow-soft: 0 4px 15px rgba(0,0,0,.45);
}

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-dark);
  overflow: hidden;
}

.app {
  width: 100%;
  max-width: 430px;
  height: 100vh;
  margin: auto;
  background: url("img/fondo.jpg") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  position: relative;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  backdrop-filter: none;
 /* backdrop-filter: blur(0.5px); */
  z-index: 0;
}

/* Header */
.header {
  height: 56px;
  background: var(--header);
  color: var(--text-light);
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  z-index: 2;
}

/* Chat */
.chat {
  flex: 1;
  padding: 14px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1;
}

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
  animation: fade .3s ease;
}

.bot {
  background: var(--bot-msg);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.user {
  background: var(--user-msg);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* Input */
.input-area {
  background: var(--input-bg);
  padding: 8px;
  display: flex;
  gap: 8px;
  z-index: 2;
  box-shadow: 0 -2px 10px rgba(0,0,0,.4);
}

.input-area input {
  flex: 1;
  border-radius: 20px;
  padding: 10px 14px;
  border: none;
  background: #2a3942;
  color: var(--text-light);
  outline: none;
}

.input-area button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #00a884;
  color: white;
  font-size: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

/* Animación */
@keyframes fade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Solo vertical */
@media (orientation: landscape) {
  body::before {
    content: "Gira el dispositivo a vertical 📱";
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    font-size: 18px;
  }
}

