/* app.css — MineeMe Alpha UI (polished Feb 24, 2026) */

:root {
  --bg0: #070A12;
  --bg1: #0B1020;
  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.10);
  --stroke: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);
  --blue: #2F6BFF;
  --blue2: #2AA8FF;
  --error-red: rgba(255, 80, 80, 0.18);
  --error-border: rgba(255, 80, 80, 0.45);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1000px 600px at 30% 15%, rgba(47,107,255,.22), transparent 60%),
    radial-gradient(900px 600px at 70% 20%, rgba(42,168,255,.16), transparent 55%),
    radial-gradient(900px 700px at 50% 95%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden;
}

/* Layout container (was missing in some versions) */
.wrap{
  max-width:1120px;
  margin:28px auto 42px;
  padding:0 18px;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 20px;
}
.brand svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 8px 18px rgba(47,107,255,.35));
}

/* NEW: dot styling for Minee.Me */
.brandDot{
  color: var(--blue2);
  font-size: 1.18em;
  line-height: 0;
  margin: 0 0.06em;
  position: relative;
  top: -0.02em;
  filter: drop-shadow(0 0 10px rgba(42,168,255,.35));
}

.nav {
  display: flex;
  gap: 22px;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.nav a {
  color: inherit;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  transition: all .15s ease;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(47,107,255,.14);
  border: 1px solid rgba(47,107,255,.22);
}

.userchip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-weight: 700;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all .2s ease;
}
.avatar:hover {
  box-shadow: 0 0 0 4px rgba(47,107,255,.25);
}

/* Panel */
.panel {
  margin-top: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 22px 22px 100px; /* extra bottom space */
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: radial-gradient(650px 260px at 50% 0%, rgba(255,255,255,.12), transparent 60%);
  pointer-events: none;
}

/* Greeting */
.hero {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 6px 20px;
  position: relative;
  z-index: 1;
}
.hero h1 { margin: 0; font-size: 26px; letter-spacing: .2px; }
.hero p { margin: 0; color: var(--muted); font-weight: 600; }

/* Chat */
.chat {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 0 16px 100px;
  max-height: 52vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}
.chat::-webkit-scrollbar { width: 10px; height: 10px; }
.chat::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }

.row{display:flex;gap:10px;align-items:flex-start; width:100%;}
.row.user{justify-content:flex-end;}
.row.assistant{justify-content:flex-start;}
.bubble.user{
  border-radius:22px 22px 6px 22px; /* right-side tail */
}
.bubble.assistant{
  border-radius:22px 22px 22px 6px; /* left-side tail */
}

.bubble {
  max-width: 760px;
  padding: 16px 22px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  line-height: 1.5;
  font-size: 15.2px;
  white-space: pre-wrap;
}
.bubble.user {
  background: linear-gradient(180deg, rgba(47,107,255,.42), rgba(47,107,255,.22));
  border-color: rgba(47,107,255,.45);
  border-radius: 22px 22px 6px 22px;
}
.bubble.assistant {
  border-radius: 22px 22px 22px 6px;
}
.bubble.error {
  background: var(--error-red);
  border-color: var(--error-border);
  color: #ffdddd;
}

.namepill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.miniicon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 14px rgba(47,107,255,.35));
}

/* Composer — fixed bottom */
.composer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  padding-bottom: env(safe-area-inset-bottom, 12px);
  background: rgba(7,10,18,0.94);
  border-top: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(0,0,0,.4);
}
.composer input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  padding: 12px 0;
}
.composer input:focus {
  box-shadow: 0 0 0 3px rgba(47,107,255,.35);
}
.composer input::placeholder { color: rgba(255,255,255,.55); }

/* Buttons */
.btn {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: all .15s ease;
  user-select: none;
}
.btn:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.22); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .65; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(180deg, rgba(47,107,255,.58), rgba(47,107,255,.28));
  border-color: rgba(47,107,255,.60);
}

/* Quick chips */
.subbar {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.subbtn {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.78);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.subbtn:hover { background: rgba(255,255,255,.08); transform: scale(1.03); }
.subbtn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Voice wave (cleaner: no background; glow only when thinking) */
.voice {
  margin-top: 20px;
  text-align: center;
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
}
.wave {
  margin: 10px auto 0;
  width: min(920px, 96%);
  height: 86px;
  position: relative;
}
#voiceCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* NEW: default glow is basically off */
.waveGlow {
  position: absolute;
  inset: -22px;
  background:
    radial-gradient(520px 170px at 50% 55%, rgba(42,168,255,.22), transparent 62%),
    radial-gradient(740px 220px at 50% 55%, rgba(47,107,255,.14), transparent 74%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

/* only glow when thinking */
.wave.thinking .waveGlow {
  opacity: .9;
}

/* Hint */
.hint {
  margin-top: 6px;
  font-size: 11px;
  opacity: .65;
  color: rgba(255,255,255,.55);
}

/* Dots */
.dots::after {
  content: '.';
  animation: dots 1.4s steps(4, end) infinite;
}
@keyframes dots {
  0%,20%  { content: '.'; }
  40%     { content: '..'; }
  60%     { content: '...'; }
  80%,100% { content: '....'; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dots::after { animation: none !important; }
}

/* Mobile */
@media (max-width: 820px) {
  .nav { display: none; }
  .bubble { max-width: 100%; }
  .chat { max-height: 56vh; }
  .hero h1 { font-size: 22px; }
}

/* Very small screens — make Send full-width */
@media (max-width: 430px) {
  .composer {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
  }
  .composer input { flex: 1 1 100%; padding: 12px 10px; }
  .composer .btn:not(.primary) {
    flex: 1 1 calc(50% - 6px);
    padding: 10px;
    font-size: 13px;
  }
  .composer .btn.primary {
    flex: 1 1 100%;
    padding: 12px;
    font-size: 14px;
  }
}