:root{
  --bg0:#060815;
  --bg1:#0b1030;
  --panel:rgba(255,255,255,.06);
  --panel2:rgba(255,255,255,.09);
  --border:rgba(255,255,255,.12);
  --text:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --muted2:rgba(234,240,255,.55);
  --primary:#7c3aed; /* purple */
  --primary2:#22d3ee; /* cyan */
  --shadow:0 24px 60px rgba(0,0,0,.45);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 10% 10%, rgba(124,58,237,.25), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(34,211,238,.18), transparent 55%),
    radial-gradient(900px 700px at 40% 90%, rgba(99,102,241,.14), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  line-height:1.55;
}

a{color:inherit}
.container{width:min(1120px, 92vw); margin:0 auto;}

.skip-link{
  position:absolute; left:-9999px; top:8px;
  background:#fff; color:#000; padding:10px 12px; border-radius:10px; z-index:999;
}
.skip-link:focus{left:10px}

.site-header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(14px);
  background:rgba(6,8,21,.55);
  border-bottom:1px solid var(--border);
}
.header-inner{display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:16px;}
.brand{display:flex; align-items:center; gap:12px;}
.brand-mark{
  width:40px; height:40px; border-radius:14px;
  display:grid; place-items:center;
  background:linear-gradient(135deg, rgba(124,58,237,.95), rgba(34,211,238,.85));
  box-shadow:0 12px 30px rgba(124,58,237,.25);
  font-weight:800;
}
.brand-name{font-weight:800; letter-spacing:.2px;}
.brand-tag{color:var(--muted2); font-size:.9rem;}

.header-actions{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end;}

.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  text-decoration:none;
  color:var(--text);
  font-weight:600;
  font-size:.92rem;
}
.pill:hover{background:rgba(255,255,255,.06)}
.pill-primary{border-color:rgba(124,58,237,.6); background:rgba(124,58,237,.18)}
.pill-small{padding:6px 10px; font-size:.82rem; font-weight:600; color:var(--muted)}

.hero{padding:44px 0 18px;}
.hero-grid{display:grid; grid-template-columns:1.2fr .9fr; gap:22px; align-items:stretch;}
.hero-copy h1{font-size: clamp(2rem, 4vw, 3rem); margin:0 0 10px; line-height:1.1;}
.hero-copy p{margin:0 0 18px; color:var(--muted); font-size:1.02rem;}
.hero-cta{display:flex; gap:12px; flex-wrap:wrap; margin:18px 0 14px;}

.notice{
  border:1px dashed rgba(234,240,255,.22);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  padding:12px 14px;
  color:var(--muted);
  font-size:.92rem;
}

.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:14px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.btn:hover{background:rgba(255,255,255,.06)}
.btn-primary{
  border-color:rgba(124,58,237,.7);
  background:linear-gradient(135deg, rgba(124,58,237,.7), rgba(34,211,238,.25));
  box-shadow:0 16px 40px rgba(124,58,237,.24);
}
.btn-primary:hover{filter:brightness(1.05)}
.btn-ghost{background:transparent}

.section{padding:26px 0;}
.section h2{margin:0 0 14px; font-size:1.45rem;}

.cards{display:grid; grid-template-columns:repeat(3, 1fr); gap:14px;}
.card{
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}
.card h3{margin:0 0 8px; font-size:1.05rem;}
.card p{margin:0; color:var(--muted);}

.assistant-card{
  border:1px solid rgba(124,58,237,.28);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.03));
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}
.assistant-media{position:relative;}
.assistant-video{width:100%; aspect-ratio:1/1; display:block; object-fit:cover; background:#050614;}
.assistant-controls{
  position:absolute; left:12px; right:12px; bottom:12px;
  display:flex; gap:10px;
}
.icon-btn{
  flex:1;
  display:flex; align-items:center; justify-content:center; gap:10px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(6,8,21,.55);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  backdrop-filter: blur(10px);
}
.icon-btn:hover{background:rgba(6,8,21,.65)}
.icon-btn[aria-pressed="true"]{border-color:rgba(34,211,238,.7); box-shadow:0 0 0 3px rgba(34,211,238,.14) inset;}
.icon-btn .label{font-weight:800; font-size:.92rem;}

.assistant-meta{padding:14px 14px 16px;}
.assistant-title{display:flex; align-items:center; gap:10px; font-weight:700;}
.dot{width:10px; height:10px; border-radius:999px; background:rgba(34,211,238,.9); box-shadow:0 0 0 6px rgba(34,211,238,.12);}
.assistant-sub{margin:10px 0 0; color:var(--muted);}

.section-chat{padding-top:10px;}
.chat-grid{display:grid; grid-template-columns:1.2fr .8fr; gap:16px; align-items:start;}
.chat-panel{
  border:1px solid rgba(34,211,238,.22);
  background:rgba(255,255,255,.04);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
}
.chat-header{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px; border-bottom:1px solid var(--border); background:rgba(6,8,21,.35);}
.chat-title{margin:0; font-size:1.2rem;}
.chat-hint{margin:6px 0 0; color:var(--muted); font-size:.92rem;}

.chat-status{
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-weight:700;
  font-size:.82rem;
}
.chat-status::before{
  content:'';
  width:10px;
  height:10px;
  border-radius:999px;
  background:rgba(234,240,255,.45);
}
.chat-status.thinking::before{
  background:rgba(124,58,237,.9);
  box-shadow:0 0 0 6px rgba(124,58,237,.14);
}
.chat-status.speaking::before{
  background:rgba(34,211,238,.9);
  box-shadow:0 0 0 6px rgba(34,211,238,.14);
}
.chat-header-actions{display:flex; gap:10px; flex-wrap:wrap; align-items:center;}

.voice-select{
  max-width: 240px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
}
.voice-select:focus{border-color:rgba(34,211,238,.6); box-shadow:0 0 0 3px rgba(34,211,238,.14);}
.voice-select option{background:#0b1030; color:var(--text);}

.messages{padding:16px; height: min(56vh, 520px); overflow:auto; display:flex; flex-direction:column; gap:12px;}
.msg{max-width: 82%; border:1px solid var(--border); border-radius:16px; padding:10px 12px; background:rgba(255,255,255,.04);}
.msg .meta{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; color:var(--muted2); font-size:.78rem;}
.msg .text{margin:0; white-space:pre-wrap;}
.msg.user{margin-left:auto; border-color:rgba(124,58,237,.45); background:rgba(124,58,237,.12);}
.msg.assistant{border-color:rgba(34,211,238,.35); background:rgba(34,211,238,.08);}

/* Avatar bubbles */
.msg-row{display:flex; align-items:flex-start; gap:10px;}
.msg-row.user{justify-content:flex-end;}
.msg-row.assistant{justify-content:flex-start;}
.msg-row .avatar{
  width:34px;
  height:34px;
  border-radius:999px;
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
  object-fit:cover;
  box-shadow:0 10px 24px rgba(0,0,0,.35);
  position:relative;
  z-index:3;
}
.msg-row.user .avatar{display:none;}

/* Ensure avatar is visible even if message bubble has backgrounds/overflows */
.msg-row.assistant .avatar{display:block;}

.chat-input{display:flex; gap:10px; padding:14px 16px; border-top:1px solid var(--border); background:rgba(6,8,21,.35);}
.chat-input input{
  flex:1;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.04);
  color:var(--text);
  border-radius:14px;
  padding:12px 12px;
  outline:none;
}
.chat-input input:focus{border-color:rgba(34,211,238,.6); box-shadow:0 0 0 3px rgba(34,211,238,.14);}

.chat-footer{display:flex; gap:8px; flex-wrap:wrap; padding:12px 16px 16px;}

.side-panel{border:1px solid var(--border); background:rgba(255,255,255,.03); border-radius:var(--radius); padding:14px; box-shadow:var(--shadow);}
.side-panel h3{margin:0 0 12px; font-size:1.1rem;}
.prompt-grid{display:grid; grid-template-columns:1fr; gap:10px;}
.prompt{
  text-align:left;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.03);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  font-weight:650;
}
.prompt:hover{border-color:rgba(124,58,237,.45); background:rgba(124,58,237,.10);}

.side-card{margin-top:14px; padding:14px; border-radius:var(--radius); border:1px solid rgba(124,58,237,.28); background:rgba(124,58,237,.08);}
.list{margin:10px 0 0; padding-left:18px; color:var(--muted);}
.muted{color:var(--muted)}
.small{font-size:.9rem;}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}

.site-footer{border-top:1px solid var(--border); padding:18px 0; margin-top:18px; background:rgba(6,8,21,.35);}
.footer-inner{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;}

@media (max-width: 940px){
  .hero-grid{grid-template-columns:1fr;}
  .chat-grid{grid-template-columns:1fr;}
  .cards{grid-template-columns:1fr 1fr;}
}
@media (max-width: 560px){
  .cards{grid-template-columns:1fr;}
  .messages{height: min(58vh, 520px);}
  .msg{max-width: 92%;}
}
