/* =============================== RESET ================================ */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}
:root{
  --gold-dark:#f5c542;
  --gold-line:#ffd86b;
  --bg:#ffffff;
  --muted:#6b7280;
  --send-inactive:#bdbdbd;
  --send-active:#d32f2f;
}
html,body{
  height:100%;
}
body{
  font-family:"Poppins","Hind Siliguri",sans-serif;
  background:var(--bg);
  color:#111827;
}

/* =============================== HEADER (THIN) ================================ */
.topbar{
  position:sticky;
  top:0;
  z-index:100;
  width:100%;
  height:44px;
  background:var(--gold-dark);
  border-bottom:2px solid var(--gold-line);
}
.topbar-inner{
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  padding:0 12px;
}
.topbar-center{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  font-weight:700;
  color:#1b1405;
  font-size:16px;
  white-space:nowrap;
}
.brand{
  color:#1b1405;
  font-weight:700;
}
.topbar-actions{
  position:absolute;
  right:12px;
  top:0;
  height:44px;
  display:flex;
  align-items:center;
}

/* ✅ UPDATED: PROFILE BUTTON (FIRE RED) */
.sign-in-btn{
  border:2px solid #1a0000;
  background: linear-gradient(180deg, #ff2b2b 0%, #b30000 55%, #6b0000 100%);
  color:#fff;
  padding:7px 16px;
  font-weight:800;
  cursor:pointer;
  border-radius:10px;
  letter-spacing:.3px;
  text-transform:none;

  box-shadow:
    0 10px 20px rgba(211,47,47,.35),
    0 0 0 2px rgba(0,0,0,.15) inset;

  transition: transform .12s ease, box-shadow .18s ease, filter .18s ease;
}
.sign-in-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.08) saturate(1.15);
  box-shadow:
    0 14px 28px rgba(211,47,47,.45),
    0 0 18px rgba(255,60,60,.35),
    0 0 0 2px rgba(0,0,0,.15) inset;
}
.sign-in-btn:active{
  transform: translateY(0px) scale(.98);
  filter: brightness(0.98);
}
.sign-in-btn:focus-visible{
  outline:3px solid rgba(255,216,107,.85);
  outline-offset:2px;
}

/* =============================== PROFILE (LEFT) ================================ */
.topbar-left{
  position:fixed;
  top:44px;
  left:12px;
  z-index:90;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:transparent;
}
.avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid var(--gold-line);
  background:#fff;
}
.name-stack{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}
.top-name{
  font-size:15px;
  font-weight:700;
  color:#000;
}
.top-link{
  font-size:12px;
  color:#1e6bff;
  text-decoration:none;
  font-weight:600;
}

/* =============================== CHAT SCROLL ================================ */
#chatBox, .chat-box{
  min-height:calc(100dvh - 44px);
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:70px 14px 0;
}

/* =============================== HERO ================================ */
.hero{
  text-align:center;
  padding:10px 5px 5px;
  margin-top:400px;
  font-size:14px;
  color:#111;
}

/* =============================== CHAT BUBBLES ================================ */
.msg-row{
  width:100%;
  display:flex;
  margin:10px 0;
}
.msg-row.user{
  justify-content:flex-end;
}
.msg-row.assistant{
  justify-content:flex-start;
}
.msg-bubble{
  max-width:86%;
  padding:12px 14px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  font-size:14px;
  line-height:1.5;
}
.msg-row.user .msg-bubble{
  background:#f3f6ff;
}
.msg-meta{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  margin-bottom:6px;
}

/* =============================== BOTTOM INPUT ================================ */
.composer-wrap{
  position:sticky;
  bottom:0;
  padding:10px 12px 12px;
  background:linear-gradient(to top, #fff, rgba(255,255,255,.72));
}
.pill-input{
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 12px;
  border-radius:999px;
  background:#f1f1f1;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 10px 26px rgba(0,0,0,.10);
}
.pill-plus{
  width:38px;
  height:38px;
  border-radius:999px;
  border:0;
  background:transparent;
  font-size:24px;
  cursor:pointer;
}
.pill-textarea{
  flex:1;
  border:0;
  outline:none;
  background:transparent;
  resize:none !important;
  overflow:hidden !important;
  font-size:15px;
  line-height:1.3;
  padding:2px 6px;
}
.pill-textarea::-webkit-resizer{
  display:none;
}
.pill-mic{
  width:38px;
  height:38px;
  border-radius:999px;
  border:0;
  background:#dedede;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pill-send{
  width:44px;
  height:44px;
  border-radius:999px;
  border:0;
  background:var(--send-inactive);
  color:#fff;
  cursor:not-allowed;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease, transform .1s ease;
}
.pill-send.active{
  background:var(--send-active);
  cursor:pointer;
}
.pill-send.active:active{
  transform:scale(.95);
}
.status-text{
  margin-top:8px;
  font-size:12px;
  color:#d32f2f;
}

/* scrollbar */
.chat-box::-webkit-scrollbar{
  width:6px;
}
.chat-box::-webkit-scrollbar-thumb{
  background:#cfcfcf;
  border-radius:10px;
}

/* =============================== AUTH MODAL (TikTok style) ================================ */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  z-index:9999;
}
.hidden{
  display:none !important;
}
.auth-sheet{
  width:min(420px, 92vw);
  background:#0f0f0f;
  border-radius:18px 18px 0 0;
  padding:14px;
  box-shadow:0 -10px 30px rgba(0,0,0,.5);
}
.auth-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:4px 2px 10px;
}
.auth-title{
  color:#fff;
  font-weight:700;
  font-size:16px;
}
.auth-close{
  border:0;
  background:transparent;
  color:#fff;
  font-size:18px;
  cursor:pointer;
}
.login-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.login-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:14px 14px;
  border-radius:12px;
  border:1px solid #222;
  background:#151515;
  color:#fff;
  font-weight:600;
  cursor:pointer;
}
.login-ico{
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#2a2a2a;
  font-weight:800;
}
.login-item.fb{
  background:#1877f2;
  border-color:#1877f2;
}
.login-ico.fb{
  background:rgba(255,255,255,.18);
  color:#fff;
}
.login-item.google{
  background:#151515;
}
.login-ico.g{
  background:#2a2a2a;
}
.login-item:hover{
  opacity:.92;
}
.auth-foot{
  margin-top:12px;
}
.small-note{
  color:#bdbdbd;
  font-size:12px;
}

/* extra screens */
.auth-screen{
  margin-top:12px;
}
.auth-subtitle{
  color:#fff;
  font-weight:700;
  margin:6px 2px 10px;
}
.auth-inp{
  width:100%;
  padding:14px 14px;
  border-radius:12px;
  border:1px solid #222;
  background:#151515;
  color:#fff;
  outline:none;
  font-family:inherit;
  font-size:14px;
  margin-bottom:12px;
}
.auth-btn{
  width:100%;
  padding:14px 14px;
  border-radius:12px;
  border:1px solid #222;
  background:#f5c542;
  color:#111;
  font-weight:800;
  cursor:pointer;
  font-family:inherit;
  font-size:14px;
  margin-bottom:10px;
}
.auth-btn.ghost{
  background:#151515;
  color:#fff;
  font-weight:700;
}
.auth-btn.back{
  background:#0f0f0f;
  color:#bdbdbd;
}
.auth-msg{
  color:#ffd86b;
  font-size:12px;
  margin-top:8px;
  min-height:16px;
}
@media (max-width:420px){
  .auth-sheet{
    width:92vw;
  }
}
