/* === Base / Utilities === */

@font-face{font-family:"Poppins";src:url("fonts/poppins-thin.ttf") format("truetype");font-weight:100;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-thinitalic.ttf") format("truetype");font-weight:100;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-extralight.ttf") format("truetype");font-weight:200;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-extralightitalic.ttf") format("truetype");font-weight:200;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-light.ttf") format("truetype");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-lightitalic.ttf") format("truetype");font-weight:300;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-italic.ttf") format("truetype");font-weight:400;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-medium.ttf") format("truetype");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-mediumitalic.ttf") format("truetype");font-weight:500;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-semibold.ttf") format("truetype");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-semibolditalic.ttf") format("truetype");font-weight:600;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-bold.ttf") format("truetype");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-bolditalic.ttf") format("truetype");font-weight:700;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-extrabold.ttf") format("truetype");font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-extrabolditalic.ttf") format("truetype");font-weight:800;font-style:italic;font-display:swap}
                                            
@font-face{font-family:"Poppins";src:url("fonts/poppins-black.ttf") format("truetype");font-weight:900;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("fonts/poppins-blackitalic.ttf") format("truetype");font-weight:900;font-style:italic;font-display:swap}

body { font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important; }
h1,h2,h3 { font-weight:600; }   /* auto-picks SemiBold */
.em { font-style: italic; }



.hidden { display: none !important; }
[hidden] { display: none !important; }
body.authed #authGate { display: none !important; }

/* Auth Gate */
.authGate{
  position: fixed;
  inset: 0;                   
  z-index: 2000;              
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vmin, 24px);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity .2s ease;
}
.authGate .alert {
  border-radius: 10px;
  border: 1px solid rgba(220,53,69,.35);
  background: rgba(220,53,69,.12);
  color: dimgray;
  padding: .5rem .75rem;
  margin-bottom: .75rem;
}
:root[data-theme="light"] .authGate .alert {
  color: #842029;
  background: #f8d7da;
  border-color: #f5c2c7;
}
body.authed #authGate { opacity: 0; pointer-events: none; }
.authGate .card{ width: min(420px, 92vw); border-radius: var(--radius); }

.authOverlay{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2vmin, 24px);
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity .2s ease;
}

.authOverlay[hidden]{ opacity: 0; pointer-events: none; }

/* Base tokens (dark / default) */
:root{
  --bg:#0e0f12;
  --panel:#14161a;
  --panel-2:#0f1114;
  --card:#171a1f;
  --card-2:#0d0f12;
  --body-grad-2:#0a0b0e;
  --text:#e7edf6;
  --text-strong:#f2f6ff;
  --muted:#9aa3b2;
  --accent:#0d6efd;
  --accent-2:#2db4a6;
  --success:#38c172;
  --own-bg:#0d6efd;
  --other-bg:#1d2026;
  --header-glass-from: rgba(23,26,31,.9);
  --header-glass-to:   rgba(23,26,31,.7);
  --composer-glass-from: rgba(20,22,26,.85);
  --composer-glass-to:   rgba(20,22,26,.95);
  --input-bg:#0e0f12;
  --border-weak:   rgba(255,255,255,0.06);
  --border-weak-2: rgba(255,255,255,0.04);
  --scroll-track: #0f1115;
  --scroll-thumb: #2db4a6;
  --scroll-thumb-hover: #0d6efd;
  --radius:14px;
  --ban:#ff4d4f;
  --disabled-bg: rgba(255,255,255,.06);
  --disabled-border: var(--border-weak);
  --disabled-text: rgba(255,255,255,.55);
  --disabled-dot: #9aa3b2;
  --disabled-opacity: .55;
}

:root[data-theme="light"]{
  --ban:#d93025;
  --disabled-bg: rgba(0,0,0,.04);
  --disabled-border: var(--border-weak);
  --disabled-text: rgba(12,18,34,.55);
  --disabled-dot: #b8c4d9;
  --disabled-opacity: .6;
}

/* Base element styles */
*{ box-sizing:border-box }
html,body{ height:100%; }
body{
  margin:0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(45,180,166,.08), transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--body-grad-2) 100%);
  color: var(--text);
}

/* Scrollbars */
#messages::-webkit-scrollbar{ width:10px }
#messages::-webkit-scrollbar-track{ background:var(--scroll-track); border-radius:var(--radius) }
#messages::-webkit-scrollbar-thumb{
  background:var(--scroll-thumb); border-radius:var(--radius);
  border:2px solid var(--scroll-track); transition:background-color .3s ease
}
#messages::-webkit-scrollbar-thumb:hover{ background:var(--scroll-thumb-hover) }
#messages{ scrollbar-width:thin; scrollbar-color:var(--scroll-thumb) var(--scroll-track); }
#messages:hover{ scrollbar-color:var(--scroll-thumb-hover) var(--scroll-track) }

.userList::-webkit-scrollbar{ width:8px }
.userList::-webkit-scrollbar-track{ background:#20242a; border-radius:4px }
.userList::-webkit-scrollbar-thumb{ background:#8aa; border-radius:4px; border:2px solid #20242a }
.userList::-webkit-scrollbar-thumb:hover{ background:#adb }
