
/* ASTRA V15 — FULL SCREEN AI WORKSPACE */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #080914;
  color: #eeeaf9;
  font-family: 'Manrope', sans-serif;
}

button, input, a {
  font: inherit;
}

button, a {
  cursor: pointer;
}

.astra-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 10%, #34215c55, transparent 45%),
    radial-gradient(ellipse at 30% 90%, #172b5a35, transparent 45%),
    #080914;
}

.astra-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  top: -300px;
  right: 5%;
  border-radius: 50%;
  background: #8060e5;
  filter: blur(180px);
  opacity: .12;
}

.astra-stars {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    radial-gradient(1px 1px at 20% 30%, white 50%, transparent),
    radial-gradient(1px 1px at 70% 60%, white 50%, transparent),
    radial-gradient(2px 2px at 40% 80%, white 50%, transparent),
    radial-gradient(1px 1px at 85% 15%, white 50%, transparent);
  background-size: 220px 220px;
}

/* APP LAYOUT */

.astra-app {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* SIDEBAR */

.astra-sidebar {
  width: 270px;
  flex-shrink: 0;
  min-height: 100vh;
  padding: 27px 19px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ffffff12;
  background: #0b0c19dd;
  backdrop-filter: blur(20px);
}

.astra-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f4efff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  text-decoration: none;
}

.astra-logo > span:first-child {
  color: #b89cff;
  font-size: 25px;
}

.logo-muted {
  color: #9c8ac8;
}

.back-home {
  margin-top: 42px;
  padding: 12px;
  border: 1px solid #ffffff15;
  color: #aaa2c4;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1px;
  text-decoration: none;
  transition: .2s;
}

.back-home:hover {
  border-color: #9e81e9;
  color: white;
}

.back-home span {
  margin-right: 7px;
}

.new-chat-button {
  margin-top: 17px;
  padding: 14px;
  border: 1px solid #a88bea55;
  background: linear-gradient(120deg, #7555bb30, #5366b52b);
  color: #e6dcff;
  text-align: left;
  font-size: 13px;
  transition: .2s;
}

.new-chat-button:hover {
  background: #8867d833;
  border-color: #b99aff;
}

.new-chat-button span {
  margin-right: 8px;
  font-size: 19px;
}

.sidebar-section-label {
  margin: 38px 0 12px;
  color: #77708f;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1.5px;
}

.sidebar-item {
  padding: 13px;
  border: 1px solid #9b7cdd30;
  background: #8060c51a;
  color: #d9cefa;
  font-size: 13px;
}

.sidebar-item span {
  margin-right: 8px;
  color: #bd9fff;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #ffffff15;
}

.sidebar-orb {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid #a88bea77;
  border-radius: 50%;
  color: #d8c6ff;
  background: #7655c533;
  font-size: 20px;
}

.sidebar-bottom strong,
.sidebar-bottom span {
  display: block;
}

.sidebar-bottom strong {
  color: #c9b9ed;
  font: 9px 'DM Mono', monospace;
  letter-spacing: .5px;
}

.sidebar-bottom span {
  margin-top: 5px;
  color: #77728b;
  font-size: 11px;
}

/* MAIN */

.astra-main {
  min-width: 0;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 88px;
  padding: 20px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff12;
  background: #0c0d1b55;
}

.topbar-kicker {
  color: #9684c1;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 2px;
}

.topbar h1 {
  margin: 5px 0 0;
  font-size: 23px;
  letter-spacing: 3px;
}

.topbar h1 span {
  color: #a98be8;
  font-weight: 500;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #aaa1c3;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1px;
}

.connection-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a98aff;
  box-shadow: 0 0 12px #a98aff;
}

/* CONVERSATION */

.conversation {
  width: 100%;
  max-width: 1050px;
  flex: 1;
  margin: 0 auto;
  padding: 35px 6% 45px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #57477f transparent;
}

.welcome-screen {
  max-width: 760px;
  margin: 7vh auto 30px;
  text-align: center;
}

.welcome-symbol {
  width: 75px;
  height: 75px;
  margin: 0 auto 23px;
  display: grid;
  place-items: center;
  border: 1px solid #b69aff77;
  border-radius: 50%;
  color: #e0d2ff;
  background: radial-gradient(circle, #a080e533, #171329);
  box-shadow: 0 0 55px #8763d833;
  font-size: 38px;
}

.welcome-kicker {
  color: #a68de4;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 2px;
}

.welcome-screen h2 {
  margin: 19px 0;
  color: #f4efff;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.2;
  letter-spacing: -2px;
}

.welcome-screen h2 span {
  color: #a88bea;
}

.welcome-screen > p {
  max-width: 570px;
  margin: 0 auto;
  color: #aaa4bd;
  font-size: 15px;
  line-height: 1.9;
}

/* SUGGESTIONS */

.suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 38px;
  text-align: left;
}

.suggestion-grid button {
  position: relative;
  min-height: 100px;
  padding: 18px;
  border: 1px solid #ffffff1b;
  background: #ffffff08;
  color: #e1d9f5;
  text-align: left;
  font-size: 14px;
  transition: .2s;
}

.suggestion-grid button:hover {
  transform: translateY(-3px);
  border-color: #a88bea;
  background: #9874e51a;
}

.suggestion-grid button span {
  display: block;
  margin-bottom: 12px;
  color: #9884c6;
  font: 9px 'DM Mono', monospace;
  letter-spacing: 1.4px;
}

.suggestion-grid button b {
  position: absolute;
  right: 16px;
  bottom: 15px;
  color: #bda4f5;
}

/* MESSAGES */

.astra-message {
  max-width: 88%;
  margin: 0 0 22px;
  padding: 19px 22px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.astra-message-user {
  margin-left: auto;
  border: 1px solid #b8a3ff44;
  background: linear-gradient(120deg, #654bb2, #4554a2);
  color: white;
}

.astra-message-bot {
  margin-right: auto;
  border: 1px solid #ffffff1c;
  background: #ffffff0b;
  color: #e2dced;
}

.astra-message-label {
  display: block;
  margin-bottom: 9px;
  color: #bda5f3;
  font: 10px 'DM Mono', monospace;
  letter-spacing: 1.5px;
}

.astra-message-content {
  overflow-wrap: anywhere;
  cursor: text;
}

.astra-message-content p {
  margin: 0 0 12px;
}

.astra-message-content p:last-child {
  margin-bottom: 0;
}

.astra-message-content h4 {
  margin: 18px 0 9px;
  color: #eee5ff;
  font-size: 19px;
}

.astra-message-content strong {
  color: #fff;
  font-weight: 800;
}

.astra-message-content em {
  color: #e0d0ff;
}

.astra-message-content ul,
.astra-message-content ol {
  padding-left: 25px;
  margin: 10px 0 15px;
}

.astra-message-content li {
  margin-bottom: 7px;
}

.astra-message-content a {
  color: #c5a8ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.astra-message-content code {
  padding: 3px 7px;
  border-radius: 5px;
  background: #ffffff12;
  color: #d7c3ff;
  font-family: monospace;
}

.astra-message-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 14px;
}

.astra-message-content td {
  padding: 10px 13px;
  border: 1px solid #ffffff25;
}

.astra-message-content tr:first-child td {
  background: #7555a52b;
  color: white;
  font-weight: bold;
}

.astra-message-loading {
  opacity: .7;
  animation: astra-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes astra-pulse {
  to { opacity: .4; }
}

/* COMPOSER */

.composer-area {
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 6% 20px;
}

.astra-composer {
  display: flex;
  gap: 12px;
  padding: 9px;
  border: 1px solid #9b7cdd55;
  border-radius: 12px;
  background: #151326;
  box-shadow: 0 10px 50px #0005, 0 0 25px #8060c51c;
}

.astra-composer:focus-within {
  border-color: #b49aff;
  box-shadow: 0 0 30px #8a65e533;
}

.astra-composer input {
  min-width: 0;
  flex: 1;
  height: 55px;
  padding: 0 17px;
  border: 0;
  outline: none;
  background: transparent;
  color: white;
  font-size: 16px;
  cursor: text;
}

.astra-composer input::placeholder {
  color: #89829e;
}

.astra-composer button {
  width: 53px;
  height: 53px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #8966df, #5267d9);
  color: white;
  font-size: 26px;
  cursor: pointer;
  transition: .2s;
}

.astra-composer button:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
}

.astra-composer button:disabled,
.astra-composer input:disabled {
  opacity: .5;
  cursor: wait;
}

.composer-note {
  margin: 12px 0 0;
  color: #77718b;
  text-align: center;
  font: 9px 'DM Mono', monospace;
  letter-spacing: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* RESPONSIVE */

@media (max-width: 760px) {
  .astra-sidebar {
    width: 205px;
    padding: 20px 13px;
  }

  .conversation {
    padding: 25px 4%;
  }

  .composer-area {
    padding: 0 4% 16px;
  }

  .astra-message {
    max-width: 95%;
  }
}

@media (max-width: 560px) {
  .astra-app {
    display: block;
  }

  .astra-sidebar {
    width: 100%;
    min-height: auto;
    padding: 12px 16px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid #ffffff15;
  }

  .astra-logo {
    font-size: 15px;
  }

  .astra-logo > span:first-child {
    font-size: 20px;
  }

  .back-home {
    margin: 0;
    padding: 9px;
    font-size: 8px;
  }

  .new-chat-button,
  .sidebar-section-label,
  .sidebar-item,
  .sidebar-bottom {
    display: none;
  }

  .astra-main {
    min-height: calc(100dvh - 58px);
  }

  .topbar {
    min-height: 68px;
    padding: 13px 17px;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .topbar-kicker {
    font-size: 8px;
  }

  .connection-status {
    font-size: 8px;
  }

  .welcome-screen {
    margin-top: 5vh;
  }

  .welcome-screen h2 {
    font-size: 34px;
  }

  .welcome-screen > p {
    font-size: 13px;
  }

  .welcome-symbol {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }

  .suggestion-grid {
    gap: 9px;
    margin-top: 27px;
  }

  .suggestion-grid button {
    min-height: 95px;
    padding: 12px;
    font-size: 12px;
  }

  .astra-message {
    max-width: 100%;
    padding: 15px;
    font-size: 14px;
  }

  .astra-composer input {
    height: 48px;
    font-size: 14px;
  }

  .astra-composer button {
    width: 47px;
    height: 47px;
  }

  .composer-note {
    font-size: 8px;
  }
}

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