@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #080811;
  --panel: rgba(17, 18, 34, .78);
  --panel-solid: #111220;
  --panel-hover: #191a30;
  --text: #f4f3ff;
  --muted: #9293ad;
  --subtle: #62647f;
  --line: rgba(178, 168, 255, .13);
  --purple: #a78bfa;
  --purple-bright: #c4b5fd;
  --cyan: #67e8f9;
  --green: #80f0bd;
  --sidebar: 252px;
  --radius: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  .message.assistant pre {
white-space: pre-wrap;
overflow-wrap: anywhere;
padding: 12px;
border-radius: 10px;
background: #11131b;
overflow-x: auto;
}
.message.assistant code {
font-family: monospace;
}
</CodeBlock>
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(167, 139, 250, .35);
  color: white;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: #32314d;
  border-radius: 20px;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 440px;
  height: 440px;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .13;
}

.ambient-one {
  top: -220px;
  left: 24%;
  background: #754bff;
}

.ambient-two {
  right: -230px;
  bottom: -240px;
  background: #087eac;
  opacity: .12;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(160, 155, 220, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 155, 220, .055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

/* SIDEBAR */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 26px 18px 16px;
  background: rgba(10, 10, 20, .88);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  border: 1px solid rgba(196, 181, 253, .48);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(167,139,250,.25), rgba(103,232,249,.07));
  color: #d8caff;
  box-shadow: 0 0 22px rgba(139, 92, 246, .12);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand-ai {
  color: var(--purple);
}

.new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  margin-top: 38px;
  border: 1px solid rgba(167, 139, 250, .3);
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(139,92,246,.15), rgba(103,232,249,.045));
  font-size: 12px;
  font-weight: 600;
  transition: .25s var(--ease);
}

.new-chat span {
  font-size: 19px;
  color: var(--purple-bright);
}

.new-chat:hover {
  transform: translateY(-2px);
  border-color: rgba(167,139,250,.65);
  box-shadow: 0 8px 28px rgba(139,92,246,.12);
}

.side-label {
  margin: 35px 9px 12px;
  color: var(--subtle);
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
}

.nav-item,
.history-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  transition: .2s ease;
}

.nav-item span {
  color: #777793;
  font-size: 16px;
}

.nav-item:hover,
.history-item:hover {
  background: rgba(255,255,255,.035);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(167,139,250,.13);
  background: rgba(167,139,250,.09);
  color: #e6ddff;
}

.nav-item.active span {
  color: var(--purple-bright);
}

.history-label {
  margin-top: 33px;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.history-item {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-bottom {
  margin-top: auto;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 5px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .7px;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(128,240,189,.65);
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 3px 2px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(135deg, #292042, #13252f);
  color: var(--cyan);
  font-weight: 700;
}

.profile strong,
.profile small {
  display: block;
}

.profile strong {
  font-size: 11px;
  font-weight: 600;
}

.profile small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.profile-more {
  margin-left: auto;
  color: var(--muted);
  letter-spacing: 2px;
}

.mobile-brand {
  display: none;
}

/* MAIN LAYOUT */

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin-left: var(--sidebar);
  padding: 0 42px 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 77px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb span {
  margin: 0 8px;
  color: #494963;
}

.breadcrumb strong {
  color: #d9d8ec;
  font-weight: 500;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.025);
  color: #c8c6df;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: .6px;
}

.model-pill .status-dot {
  width: 5px;
  height: 5px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
  font-size: 17px;
  transition: .2s ease;
}

.icon-button:hover {
  border-color: rgba(167,139,250,.5);
  color: var(--purple-bright);
}

/* WELCOME */

.chat-layout {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 890px;
  min-height: 0;
  margin: 0 auto;
}

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 31px 0 20px;
  text-align: center;
  animation: rise-in .8s var(--ease) both;
}

.orb-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: 15px;
}

.orb {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 63px;
  height: 63px;
  overflow: hidden;
  border: 1px solid rgba(210,198,255,.75);
  border-radius: 22px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,.3), transparent 36%),
    linear-gradient(145deg, #8d6df3 0%, #4b368d 48%, #162a42 100%);
  box-shadow:
    0 0 28px rgba(139,92,246,.38),
    inset 0 0 20px rgba(255,255,255,.12);
  transform: rotate(-9deg);
  animation: orb-float 5s ease-in-out infinite;
}

.orb span {
  color: white;
  font-size: 34px;
  font-weight: 600;
  text-shadow: 0 0 20px rgba(255,255,255,.6);
  transform: rotate(9deg);
}

.orb-ring {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(167,139,250,.28);
  border-radius: 50%;
}

.ring-one {
  animation: orbit 16s linear infinite;
}

.ring-one::before,
.ring-two::after {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  content: '';
}

.ring-one::before {
  top: 15px;
  right: 0;
}

.ring-two {
  inset: 1px 19px;
  border-color: rgba(103,232,249,.28);
  transform: rotate(55deg);
  animation: orbit 12s linear infinite reverse;
}

.ring-two::after {
  bottom: 13px;
  left: -3px;
  background: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple);
}

.orb-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 13px var(--purple-bright);
}

.spark-one {
  top: 8px;
  left: 28px;
}

.spark-two {
  right: 10px;
  bottom: 25px;
  background: var(--cyan);
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #a7a0ce;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
}

.welcome h1,
.explore-view h1 {
  margin-top: 19px;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -2.4px;
}

.welcome h1 span,
.explore-view h1 span {
  background: linear-gradient(100deg, #c4b5fd 10%, #9d9afc 48%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-copy {
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 610px;
  margin-top: 28px;
}

.suggestion {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 16px;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 8px;
  min-height: 68px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(125deg, rgba(23,23,42,.8), rgba(13,14,26,.65));
  text-align: left;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}

.suggestion:hover {
  transform: translateY(-3px);
  border-color: rgba(167,139,250,.38);
  background: linear-gradient(125deg, rgba(36,29,60,.8), rgba(13,20,34,.8));
}

.suggestion > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(167,139,250,.18);
  border-radius: 8px;
  background: rgba(167,139,250,.08);
  color: var(--purple-bright);
  font-size: 14px;
}

.suggestion strong {
  align-self: end;
  font-size: 11px;
  font-weight: 600;
}

.suggestion small {
  grid-column: 2;
  align-self: start;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion > b {
  grid-column: 3;
  grid-row: 1 / 3;
  color: #777590;
  font-size: 13px;
  font-weight: 400;
}

/* CHAT */

.s {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 23px;
  width: 100%;
  padding: 26px 0;
}

.s:empty {
  display: none;
}

. {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  animation: rise-in .35s var(--ease) both;
}

..user {
  justify-content: flex-end;
}

.-content {
  max-width: min(82%, 660px);
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 5px 16px 16px 16px;
  background: rgba(19,20,37,.82);
  color: #e2e1f2;
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

..user .-content {
  border-color: rgba(167,139,250,.22);
  border-radius: 16px 5px 16px 16px;
  background: linear-gradient(135deg, rgba(99,75,164,.25), rgba(31,38,63,.5));
  color: #f4f0ff;
}

.-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid rgba(167,139,250,.25);
  border-radius: 10px;
  background: rgba(167,139,250,.1);
  color: var(--purple-bright);
  font-size: 13px;
  font-weight: 700;
}

..user .-avatar {
  order: 2;
  border-color: rgba(103,232,249,.2);
  background: rgba(103,232,249,.08);
  color: var(--cyan);
}

.-label {
  display: block;
  margin-bottom: 6px;
  color: #a9a0d6;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 1px;
}

..user .-label {
  color: #a8dce5;
}

.-content p + p {
  margin-top: 10px;
}

.-content ul,
.-content ol {
  margin: 9px 0 9px 19px;
}

.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
}

.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple-bright);
  animation: typing 1s ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: .15s;
}

.typing span:nth-child(3) {
  animation-delay: .3s;
}

/* COMPOSER */

.composer-area {
  position: sticky;
  bottom: 0;
  z-index: 5;
  width: 100%;
  padding: 10px 0 9px;
  margin-top: auto;
  background: linear-gradient(to bottom, transparent, rgba(8,8,17,.96) 17%);
}

.composer {
  width: 100%;
  padding: 15px 16px 12px;
  border: 1px solid rgba(167,139,250,.24);
  border-radius: 17px;
  background: rgba(19,19,35,.9);
  box-shadow: 0 14px 55px rgba(0,0,0,.17), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition: border-color .25s, box-shadow .25s;
}

.composer:focus-within {
  border-color: rgba(167,139,250,.58);
  box-shadow: 0 0 0 3px rgba(139,92,246,.055), 0 14px 55px rgba(0,0,0,.2);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 29px;
  max-height: 150px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.composer textarea::placeholder {
  color: #72728e;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.composer-hint {
  color: #777690;
  font-size: 10px;
}

.composer-hint span {
  margin-right: 5px;
  color: var(--purple-bright);
}

.send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 83px;
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid rgba(210,198,255,.25);
  border-radius: 10px;
  background: linear-gradient(120deg, #9173ed, #6253bd);
  color: white;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(113,82,215,.16);
  transition: transform .2s, filter .2s;
}

.send-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.send-button b {
  font-size: 15px;
  font-weight: 400;
}

.disclaimer {
  margin-top: 10px;
  color: #595a74;
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: .3px;
  text-align: center;
}

/* EXPLORE */

.explore-view {
  width: 100%;
  max-width: 850px;
  margin: auto;
  padding: 70px 0;
  animation: rise-in .5s var(--ease) both;
}

.explore-view > .eyebrow {
  justify-content: flex-start;
}

.explore-view h1 {
  margin-top: 20px;
}

.explore-view > p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 35px;
}

.explore-card {
  min-height: 175px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(24,24,44,.85), rgba(14,15,27,.7));
  text-align: left;
  transition: .25s var(--ease);
}

.explore-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167,139,250,.4);
  background: linear-gradient(135deg, rgba(38,29,62,.75), rgba(14,21,34,.8));
}

.explore-card > span {
  color: var(--purple-bright);
  font-size: 20px;
}

.explore-card h3 {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

.explore-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.explore-card b {
  display: inline-block;
  margin-top: 17px;
  color: #bdb0fa;
  font-size: 10px;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* FOOTER */

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 38px;
  border-top: 1px solid var(--line);
  color: #62627b;
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: .7px;
}

.footer-star {
  margin-left: 4px;
  color: var(--purple-bright);
}

/* OPTIONAL LIGHTER ATMOSPHERE */

body.light-atmosphere {
  --bg: #10101d;
  --panel: rgba(25,25,45,.85);
}

body.light-atmosphere .ambient-one {
  opacity: .23;
}

body.light-atmosphere .ambient-two {
  opacity: .2;
}

body.light-atmosphere .grid-bg {
  opacity: .25;
}

/* ANIMATIONS */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orb-float {
  0%, 100% {
    transform: translateY(0) rotate(-9deg);
  }
  50% {
    transform: translateY(-5px) rotate(-4deg);
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: .45;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* TABLET */

@media (min-width: 1500px) {
  .main {
    padding-right: 65px;
    padding-left: 65px;
  }

  .chat-layout {
    max-width: 950px;
  }

  .welcome {
    padding-top: 45px;
  }
}

@media (max-width: 1050px) {
  :root {
    --sidebar: 220px;
  }

  .main {
    padding-right: 25px;
    padding-left: 25px;
  }

  .suggestions {
    max-width: 560px;
  }
}

/* MOBILE */

@media (max-width: 720px) {
  :root {
    --sidebar: 0px;
  }

  body {
    font-size: 13px;
  }

  .sidebar {
    width: min(285px, 85vw);
    transform: translateX(-105%);
    transition: transform .3s var(--ease);
    box-shadow: 15px 0 50px rgba(0,0,0,.3);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open::after {
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(0,0,0,.55);
    content: '';
    backdrop-filter: blur(3px);
  }

  .main {
    min-height: 100vh;
    min-height: 100dvh;
    margin-left: 0;
    padding: 0 17px 10px;
  }

  .topbar {
    height: 62px;
    gap: 10px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
  }

  .mobile-brand .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 17px;
  }

  .breadcrumb {
    display: none;
  }

  .top-actions {
    margin-left: auto;
    gap: 7px;
  }

  .model-pill {
    gap: 6px;
    padding: 7px 9px;
    font-size: 8px;
  }

  .icon-button {
    width: 31px;
    height: 31px;
  }

  .welcome {
    padding: 28px 0 17px;
  }

  .orb-wrap {
    width: 94px;
    height: 94px;
    margin-bottom: 15px;
  }

  .orb {
    width: 55px;
    height: 55px;
    border-radius: 18px;
  }

  .orb span {
    font-size: 29px;
  }

  .welcome h1,
  .explore-view h1 {
    margin-top: 17px;
    font-size: clamp(34px, 9vw, 45px);
    letter-spacing: -1.8px;
  }

  .welcome-copy {
    max-width: 310px;
    margin-top: 13px;
    font-size: 11px;
  }

  .suggestions {
    gap: 8px;
    margin-top: 25px;
  }

  .suggestion {
    grid-template-columns: 22px minmax(0,1fr) 10px;
    gap: 5px 7px;
    min-height: 76px;
    padding: 10px 8px;
    border-radius: 12px;
  }

  .suggestion > span {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }

  .suggestion strong {
    font-size: 10px;
  }

  .suggestion small {
    font-size: 8px;
    white-space: normal;
    line-height: 1.4;
  }

  .suggestion > b {
    font-size: 11px;
  }

  .composer-area {
    padding-top: 13px;
    padding-bottom: 5px;
  }

  .composer {
    padding: 13px 12px 10px;
    border-radius: 15px;
  }

  .composer textarea {
    font-size: 13px;
  }

  .composer-hint {
    max-width: 60%;
    font-size: 9px;
  }

  .send-button {
    min-width: 75px;
    min-height: 34px;
  }

  .disclaimer {
    font-size: 7px;
  }

  .s {
    gap: 18px;
    padding: 20px 0;
  }

  . {
    gap: 8px;
  }

  .-content {
    max-width: 88%;
    padding: 12px 13px;
    font-size: 12px;
  }

  .-avatar {
    width: 27px;
    height: 27px;
  }

  .explore-view {
    padding: 45px 0;
  }

  .explore-grid {
    gap: 9px;
    margin-top: 25px;
  }

  .explore-card {
    min-height: 165px;
    padding: 15px;
    border-radius: 14px;
  }

  .explore-card h3 {
    font-size: 12px;
  }

  .explore-card p {
    font-size: 10px;
  }

  .page-footer {
    min-height: 35px;
    font-size: 7px;
    letter-spacing: .2px;
  }
}

@media (max-width: 360px) {
  .main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .model-pill {
    font-size: 7px;
  }

  .suggestion {
    grid-template-columns: 19px minmax(0,1fr);
    padding: 9px 7px;
  }

  .suggestion > span {
    width: 19px;
    height: 19px;
  }

  .suggestion > b {
    display: none;
  }

  .suggestion strong {
    font-size: 9px;
  }

  .suggestion small {
    grid-column: 2;
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


/* NEXORA AI — testo più leggibile */
.message {
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant {
  line-height: 1.8;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant strong {
  font-weight: 650;
}


.message.assistant {
  display: block;
  line-height: 1.8;
  white-space: normal;
  overflow-wrap: anywhere;
}

.message.assistant p {
  margin: 0 0 1em;
}

.message.assistant h1,
.message.assistant h2,
.message.assistant h3,
.message.assistant h4 {
  line-height: 1.35;
  margin: 1.25em 0 0.55em;
  font-weight: 700;
}

.message.assistant h1:first-child,
.message.assistant h2:first-child,
.message.assistant h3:first-child {
  margin-top: 0;
}

.message.assistant ul,
.message.assistant ol {
  padding-left: 1.5em;
  margin: 0.5em 0 1em;
}

.message.assistant li {
  margin: 0.35em 0;
}

.message.assistant hr {
  border: 0;
  border-top: 1px solid #ffffff25;
  margin: 1.25em 0;
}

.message.assistant blockquote {
  border-left: 3px solid #818cf8;
  margin: 1em 0;
  padding-left: 1em;
  opacity: 0.9;
}

.message.assistant pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: 10px;
  background: #11131b;
  overflow-x: auto;
}

.message.assistant code {
  font-family: monospace;
}

.message.assistant :not(pre) > code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #ffffff12;
}

.nexora-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1em 0;
}

.nexora-table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}

.nexora-table th,
.nexora-table td {
  padding: 10px 12px;
  border: 1px solid #ffffff25;
  vertical-align: top;
}

.nexora-table th {
  font-weight: 700;
  background: #ffffff0b;
}



/* NEXORA — layout conversazione stile ChatGPT */

#messages {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px clamp(12px, 5%, 72px);
}

#messages .message {
  box-sizing: border-box;
  width: fit-content;
  max-width: min(85%, 760px);
  padding: 0;
  margin: 0;
  line-height: 1.8;
  white-space: normal;
  overflow-wrap: anywhere;
}

#messages .message.user {
  align-self: flex-end;
  margin-left: auto;
  padding: 12px 16px;
  border-radius: 20px;
  background: #25283a;
  color: #f5f5ff;
}

#messages .message.assistant {
  align-self: flex-start;
  margin-right: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: left;
}

#messages .message.assistant p {
  margin: 0 0 16px;
}

#messages .message.assistant h1,
#messages .message.assistant h2,
#messages .message.assistant h3,
#messages .message.assistant h4 {
  margin: 24px 0 10px;
  line-height: 1.4;
}

#messages .message.assistant ul,
#messages .message.assistant ol {
  padding-left: 26px;
  margin: 10px 0 18px;
}

#messages .message.assistant li {
  margin-bottom: 8px;
}

#messages .message.assistant hr {
  border: 0;
  border-top: 1px solid #ffffff25;
  margin: 20px 0;
}

#messages .nexora-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 600px) {
  #messages .message {
    max-width: 95%;
  }
}


.message.assistant.is-streaming::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 5px;
  vertical-align: -2px;
  border-radius: 3px;
  background: #a78bfa;
  box-shadow: 0 0 10px #a78bfa, 0 0 20px #8b5cf6;
  animation: nexora-cursor 0.8s steps(2, start) infinite;
}

@keyframes nexora-cursor {
  to {
    opacity: 0.15;
  }
}

@media (prefers-reduced-motion: reduce) {
  .message.assistant.is-streaming::after {
    animation: none;
  }
}

#chatForm,
#chatForm .composer-footer,
#sendButton {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

#sendButton {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#sendButton:disabled {
  cursor: wait;
}


/* NEXORA — menu cronologia su mobile */
@media (max-width: 720px) {
  .sidebar {
    width: min(300px, 85vw);
    max-width: 85vw;
    box-sizing: border-box;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s ease;
    background: rgba(10, 10, 20, 0.98);
  }

  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
  }

  .main {
    width: 100%;
    margin-left: 0;
  }
}


