/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root{
  --bg-1:#0f172a; --bg-2:#1e293b; --accent-1:#0ea5e9; --accent-2:#3b82f6;
  --card:#0f172a; --muted:#94a3b8; --bot:#38bdf8; --user:#475569;
}
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(135deg,var(--bg-1),var(--bg-2));
  color: #f8fafc;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}

/* App container */
.app-container{
  width: 100%; max-width: 900px; background: var(--bg-2); border-radius: 18px;
  overflow: hidden; box-shadow: 0 10px 40px rgba(2,6,23,0.6); display:flex; flex-direction:column;
}

/* Header */
.header{
  background: linear-gradient(135deg,var(--accent-1),var(--accent-2));
  padding: 26px 20px; text-align:center; color:#fff;
}
.logo-area{ display:flex; align-items:center; justify-content:center; gap:14px; }
.logo{ width:54px; border-radius:8px; box-shadow:0 6px 18px rgba(2,6,23,0.3); }
.header h1{ font-size:1.9rem; font-weight:600; line-height:1; }
.header h1 span{ display:block; font-size:0.95rem; font-weight:400; opacity:0.95; margin-top:6px; }
.subtitle{ margin-top:8px; opacity:0.95; font-size:1rem; }

/* Chat section */
.chat-section{ padding:18px; display:flex; flex-direction:column; gap:12px; height:calc(70vh); min-height:520px; }
.chat-box{
  background:var(--card); padding:18px; border-radius:12px; overflow:auto; display:flex; flex-direction:column; gap:12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.chat-box::-webkit-scrollbar{ width:8px; } .chat-box::-webkit-scrollbar-thumb{ background:#334155; border-radius:8px; }

/* Messages */
.message{ max-width:78%; padding:12px 16px; border-radius:14px; line-height:1.45; word-wrap:break-word; animation:fadeInUp .28s ease;}
.bot{ background:var(--bot); color:#002027; align-self:flex-start; border-bottom-left-radius:4px; box-shadow:0 6px 18px rgba(56,189,248,0.12);}
.user{ background:var(--user); color:#f8fafc; align-self:flex-end; border-bottom-right-radius:4px; box-shadow:0 6px 18px rgba(71,85,105,0.08); text-align:right; }

/* Input area */
.input-area{ display:flex; gap:12px; margin-top:6px; }
input{
  flex:1; padding:12px 14px; border-radius:10px; border:none; outline:none; font-size:15px; background:#0b1220; color:#e6eef8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
input:focus{ transform:translateY(-1px); background:#0f1726; }
button{
  padding:12px 20px; border-radius:10px; border:none; cursor:pointer; font-weight:600;
  background: linear-gradient(135deg,var(--accent-2),var(--accent-1)); color:#fff; transition:all .16s ease;
}
button:hover{ transform:translateY(-3px); box-shadow:0 8px 20px rgba(14,165,233,0.12); }

/* Footer */
footer{ background:var(--bg-1); text-align:center; padding:12px; font-size:0.92rem; opacity:0.9; }

/* Animations & responsive */
@keyframes fadeInUp{ from{ opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }
@media (max-width:640px){
  .app-container{ max-width:100%; height:100%; border-radius:12px; }
  .header h1{ font-size:1.3rem; } .chat-section{ height:calc(78vh); min-height:420px; padding:14px; }
}
