/* ZynAI Standalone (static) — neon, clean, ChatGPT-ish */
:root{
  --bg:#0a0d10;
  --panel:#0f1520;
  --panel2:#0c111a;
  --border:#1f2937;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --cyan:#22d3ee;
  --purple:#a855f7;
  --pink:#ec4899;
  --danger:#fb7185;
  --ok:#34d399;
  --shadow:0 0 30px rgba(34, 211, 238, .18);
  --shadow2:0 0 30px rgba(168, 85, 247, .18);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(900px 600px at 15% 15%, rgba(34, 211, 238, .10), transparent 60%),
              radial-gradient(900px 600px at 85% 25%, rgba(168, 85, 247, .10), transparent 60%),
              var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}
.container{max-width:1100px; margin:0 auto; padding:0 16px;}
.hidden{display:none!important}

/* Focus visibility for keyboard users */
:focus-visible{
  outline:2px solid var(--cyan);
  outline-offset:2px;
}
.btn:focus-visible,.input:focus-visible,.textarea:focus-visible{
  outline:2px solid var(--cyan);
  outline-offset:2px;
}

.topbar{
  position:sticky; top:0;
  backdrop-filter: blur(10px);
  background: rgba(15, 21, 32, .75);
  border-bottom:1px solid var(--border);
  z-index:10;
}
.topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:12px;
}
.brand{
  display:flex; align-items:center; gap:12px;
}
.logo{
  width:38px; height:38px; border-radius:14px;
  background: linear-gradient(135deg, rgba(34,211,238,.25), rgba(168,85,247,.25));
  border:1px solid rgba(34,211,238,.25);
  box-shadow: var(--shadow);
}
.brand h1{margin:0; font-size:16px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted)}
.brand .sub{margin:0; font-size:20px; font-weight:700; color:var(--cyan)}

.badges{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}
.badge strong{color:var(--text); font-weight:700}
.badge.ok strong{color:var(--ok)}
.badge.danger strong{color:var(--danger)}

.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{border-color: rgba(34,211,238,.6)}
.btn.primary{
  background: linear-gradient(135deg, rgba(34,211,238,.85), rgba(168,85,247,.85));
  border:0;
  box-shadow: var(--shadow);
  color:#071018;
}
.btn.primary:hover{box-shadow: var(--shadow2)}
.btn.ghost{background:transparent}
.btn.small{padding:8px 10px; border-radius:10px; font-size:12px}

.main{
  padding:22px 0 110px;
}
.chat-card{
  border:1px solid var(--border);
  background: rgba(15, 21, 32, .55);
  border-radius:18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  overflow:hidden;
}
.chat-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid var(--border);
  background: rgba(12,17,26,.6);
}
.chat-head .title{display:flex; flex-direction:column; gap:4px}
.chat-head .title .big{font-size:16px; font-weight:800}
.chat-head .title .small{font-size:12px; color:var(--muted)}
.chat-head .actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap}

.chat-log{
  padding:16px;
  max-height:calc(100vh - 260px);
  overflow:auto;
}
.message{
  display:flex;
  margin:12px 0;
}
.message.user{justify-content:flex-end}
.bubble{
  max-width:820px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.03);
  line-height:1.45;
  font-size:14px;
  white-space:pre-wrap;
  word-wrap:break-word;
}
.message.user .bubble{
  border:0;
  background: linear-gradient(135deg, rgba(34,211,238,.85), rgba(168,85,247,.85));
  color:#071018;
  box-shadow: var(--shadow);
}
.meta{
  margin-top:6px;
  font-size:11px;
  color:rgba(148,163,184,.9);
}

.composer{
  position:fixed;
  left:0; right:0; bottom:0;
  padding:14px 0;
  background: rgba(10,13,16,.7);
  backdrop-filter: blur(10px);
  border-top:1px solid var(--border);
}
.composer-inner{
  display:flex; gap:10px; align-items:flex-end;
}
.textarea{
  flex:1;
  min-height:44px;
  max-height:160px;
  resize:none;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(15, 21, 32, .7);
  color:var(--text);
  outline:none;
}
.textarea:focus{border-color: rgba(34,211,238,.7); box-shadow: var(--shadow)}
.hint{
  font-size:12px;
  color:var(--muted);
  margin-top:10px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.modal-overlay{
  position:fixed; inset:0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:50;
  padding:16px;
}
.modal{
  width:min(560px, 100%);
  border-radius:18px;
  border:1px solid var(--border);
  background: rgba(15,21,32,.95);
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
  overflow:hidden;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid var(--border);
}
.modal-head strong{font-size:16px}
.modal-body{padding:14px 14px; color:var(--muted); font-size:14px; line-height:1.5}
.modal-actions{
  display:flex; gap:10px; justify-content:flex-end;
  padding:14px 14px;
  border-top:1px solid var(--border);
}

.auth-wrap{
  min-height:100vh;
  display:flex; align-items:center; justify-content:center;
  padding:32px 16px;
}
.auth-card{
  width:min(480px, 100%);
  border:1px solid var(--border);
  background: rgba(15, 21, 32, .70);
  border-radius:18px;
  padding:18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.auth-card h2{margin:0 0 6px 0; font-size:22px}
.auth-card p{margin:0 0 18px 0; color:var(--muted); font-size:13px}
.tabs{display:flex; gap:10px; margin-bottom:14px}
.tab{flex:1}
.input{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(12,17,26,.6);
  color:var(--text);
  outline:none;
}
.input:focus{border-color: rgba(34,211,238,.7); box-shadow: var(--shadow)}
.form-row{display:flex; flex-direction:column; gap:8px; margin:10px 0}
.error{color:var(--danger); font-size:13px}
.smalltext{color:var(--muted); font-size:12px}

footer.small-footer{
  margin-top:18px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
}
