
/* styles.css — Super Simple Chat (external CSS) */
/* Tip: Remove inline <style> from index.html and add:
   <link rel="stylesheet" href="styles.css"> */

:root{
  --bg: #0b1020;
  --panel: #12172a;
  --accent: #5b8cff;
  --accent-2: #4ee0b7;
  --text: #e8ebf5;
  --muted: #98a2b3;
  --border: #242a3f;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 10% -20%, rgba(91,140,255,.25), transparent 60%),
              radial-gradient(1000px 600px at 110% 120%, rgba(78,224,183,.18), transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.4;
  display: grid;
  place-items: start center;
  padding: 28px 16px 36px;
}

/* Page title */
h1{
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(90deg, var(--text), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
}

/* Chat panel */
#messages{
  width: min(720px, 100%);
  min-height: 220px;
  max-height: min(60vh, 520px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.0)) , var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Each incoming message (your current JS appends <div>) */
#messages > div{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  padding: 10px 12px;
  border-radius: 12px;
  margin: 6px 0;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

/* Input */
#input{
  width: min(720px, 100%);
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0e1426;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow);
}

#input::placeholder{
  color: var(--muted);
}

#input:focus{
  border-color: color-mix(in oklab, var(--accent) 60%, white 0%);
  box-shadow: 0 0 0 3px rgba(91,140,255,.20), var(--shadow);
  background: #0c1222;
}

/* Scrollbar (WebKit) */
#messages::-webkit-scrollbar{
  width: 10px;
}
#messages::-webkit-scrollbar-track{
  background: transparent;
}
#messages::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(91,140,255,.65), rgba(78,224,183,.55));
  border-radius: 8px;
}

/* Small screens */
@media (max-width: 520px){
  body{ padding: 20px 12px 28px; }
  #messages{ min-height: 180px; }
  #input{ padding: 12px 14px; }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
