:root{
  --mint:#97FEDD;
  --lav:#BE95FF;
  --w:#FFFFFF;
  --b:#000000;

  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.04);
  --stroke: rgba(255,255,255,.14);
  --muted: rgba(255,255,255,.65);
}

*{ box-sizing:border-box; }

/* ==== BACKGROUND TEXTURE (like screenshot) ==== */
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--w);

  /* layered spotlights + vignette */
  background:
    radial-gradient(900px 700px at 18% 62%, rgba(255,255,255,.18) 0%, rgba(255,255,255,.10) 22%, rgba(0,0,0,0) 58%),
    radial-gradient(850px 650px at 78% 66%, rgba(255,255,255,.22) 0%, rgba(255,255,255,.12) 24%, rgba(0,0,0,0) 60%),
    radial-gradient(650px 520px at 52% 30%, rgba(255,255,255,.10) 0%, rgba(255,255,255,.06) 26%, rgba(0,0,0,0) 60%),
    radial-gradient(1200px 900px at 50% 55%, rgba(0,0,0,.00) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.70) 100%),
    linear-gradient(180deg, #0a0a0a 0%, #000 100%);

  background-attachment: fixed;
  overflow-x: hidden;
}

/* subtle grain / noise overlay */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: .10;
  mix-blend-mode: overlay;
}

/* ensure content renders above overlay */
.top, .wrap, .layout, .card, .mascot, main, header{
  position: relative;
  z-index: 1;
}

/* ===== Header ===== */
.top{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:14px;
  padding:18px 18px 10px;
  flex-wrap:wrap;
}

.brand{ display:flex; gap:12px; align-items:center; }

.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  object-fit: contain;
  display:block;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.12);
  padding: 6px;
}

.title{
  font-weight:900;
  font-size:18px;
  line-height:1;
}

.sub{
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
}

.status{
  display:flex;
  gap:8px;
  align-items:center;
}

.pill{
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  background: rgba(190,149,255,.18);
  border: 1px solid rgba(190,149,255,.35);
  color: var(--w);
}

/* ===== Layout ===== */
.wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 18px 18px;
}

.layout{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap:14px;
  align-items:start;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .mascot{ position: relative; top: 0; }
}

/* ===== Cards ===== */
.card{
  border:1px solid var(--stroke);
  background: var(--panel2);
  border-radius:18px;
  padding:14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
}

/* ===== Chat ===== */
.chat{
  height:70vh;
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  padding:12px;
}

.msg{ display:flex; margin:10px 0; }
.msg.user{ justify-content:flex-end; }

.bubble{
  max-width: 82%;
  padding:10px 12px;
  border-radius:14px;
  white-space:pre-wrap;
  line-height:1.35;
}

.msg.user .bubble{
  background: var(--mint);
  color: var(--b);
  border-top-right-radius:6px;
}

.msg.bot .bubble{
  background: rgba(190,149,255,.18);
  border: 1px solid rgba(190,149,255,.35);
  border-top-left-radius:6px;
}

/* ===== Composer ===== */
.composer{
  margin-top:10px;
  display:flex;
  gap:10px;
}

.composer textarea{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color:var(--w);
  outline:none;
  resize:none;
}

.composer textarea:focus{
  border-color: rgba(151,254,221,.6);
}

/* ===== Buttons ===== */
.btn{
  border:1px solid var(--stroke);
  background: var(--panel);
  color:var(--w);
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
  transition: transform .08s ease, border-color .15s ease, filter .15s ease;
}

.btn:hover{
  border-color: rgba(190,149,255,.55);
}

.btn:active{
  transform: translateY(1px);
}

.btn.primary{
  background: var(--lav);
  border-color: transparent;
  color: var(--b);
}

.btn.primary:hover{
  filter: brightness(1.03);
}

.btn.ghost{
  background: transparent;
  border-color: rgba(255,255,255,.2);
  color: var(--muted);
}

/* ===== Footer row ===== */
.footerRow{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.hint{
  color:var(--muted);
  font-size:12px;
}

/* ===== Mascot ===== */
.mascot{
  position:sticky;
  top:14px;
}

.mascotCard{
  border:1px solid var(--stroke);
  background: var(--panel2);
  border-radius:18px;
  padding:10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  overflow:hidden;
  position:relative;
  backdrop-filter: blur(10px);
}

.mascotVideo{
  width:100%;
  height:70vh;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  object-fit: contain;
  display:block;
}

.mascotBadge{
  position:absolute;
  left:14px;
  bottom:14px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  color: var(--b);
  background: var(--mint);
  font-weight:900;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  opacity:.95;
}

/* ===== Scrollbar (optional) ===== */
.chat::-webkit-scrollbar{ width: 10px; }
.chat::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.14);
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.35);
}
.chat::-webkit-scrollbar-track{
  background: rgba(255,255,255,.05);
  border-radius: 999px;
}

.titleLink{
  color: rgba(255,0,255,.92);
  text-decoration: none;
}
.titleLink:hover{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.titleLink:active{
  opacity: .9;
}
