
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #09090f;
  --panel: #101019;
  --panel-2: #151521;
  --border: rgba(255,255,255,.075);
  --text: #f5f3ff;
  --muted: #9291a5;
  --purple: #9b7bff;
  --purple-bright: #b29aff;
  --sidebar-width: 270px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

button, textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

.app {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* SIDEBAR */

.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 25px 17px 16px;
  background: #0d0d15;
  border-right: 1px solid var(--border);
  z-index: 20;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 7px 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, #b79aff, #7250db);
  color: white;
  box-shadow: 0 0 25px rgba(139,92,246,.3);
}

.brand-version {
  color: #9990b7;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  align-self: flex-start;
  margin-top: 3px;
}

.icon-button {
  width: 37px;
  height: 37px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: #aaa8bc;
  font-size: 19px;
  display: grid;
  place-items: center;
  transition: .2s ease;
}

.icon-button:hover {
  background: #20202d;
  color: white;
}

.close-sidebar, .menu-button, .mobile-brand {
  display: none;
}

.new-chat-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(164,132,255,.3);
  border-radius: 12px;
  background: linear-gradient(110deg, rgba(132,94,226,.18), rgba(132,94,226,.06));
  color: #e5dcff;
  font-size: 13px;
  font-weight: 600;
  transition: .2s ease;
}

.new-chat-button:hover {
  background: rgba(132,94,226,.24);
  border-color: rgba(164,132,255,.55);
  transform: translateY(-1px);
}

.new-chat-button > span:first-child {
  font-size: 19px;
}

.shortcut {
  margin-left: auto;
  color: #817b9c;
  font-size: 10px;
}

.sidebar-section {
  margin-top: 36px;
}

.section-label {
  padding: 0 10px;
  margin-bottom: 12px;
  color: #69687d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  margin-bottom: 5px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #a3a1b4;
  text-align: left;
  font-size: 13px;
}

.nav-item:hover, .nav-item.active {
  background: #1a1927;
  color: #eee8ff;
}

.nav-item.active {
  border: 1px solid rgba(157,124,255,.12);
}

.nav-icon {
  width: 19px;
  text-align: center;
  font-size: 17px;
}

.coming-label {
  margin-left: auto;
  color: #77748b;
  font-size: 10px;
}

.recent-section {
  flex: 1;
  min-height: 80px;
  overflow: hidden;
}

.recent-list {
  overflow-y: auto;
  max-height: 100%;
}

.empty-recent {
  padding: 9px 10px;
  color: #656477;
  font-size: 12px;
  line-height: 1.6;
}

.recent-chat {
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a6a4b7;
  text-align: left;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-chat:hover {
  background: #1a1927;
  color: white;
}

.sidebar-bottom {
  margin-top: auto;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 8px;
  border-top: 1px solid var(--border);
}

.profile-avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #a98aff, #6141b6);
  font-weight: 700;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-info strong {
  font-size: 12px;
  font-weight: 600;
}

.profile-info span {
  color: #777589;
  font-size: 10px;
}

.profile-menu {
  margin-left: auto;
  color: #777589;
  letter-spacing: 2px;
}

.sidebar-footer {
  padding: 5px 8px;
  color: #555468;
  font-size: 10px;
}

/* MAIN */

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 100vh;
  background:
    radial-gradient(ellipse at 50% 5%, rgba(106,75,180,.075), transparent 40%),
    var(--bg);
}

.topbar {
  height: 69px;
  min-height: 69px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 13px;
}

.model-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #dedbea;
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 10px #9872ff;
}

.preview-label {
  padding: 6px 9px;
  border: 1px solid rgba(167,139,250,.2);
  border-radius: 6px;
  color: #a995dc;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* WELCOME */

.welcome-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 35px 22px;
}

.welcome-content {
  width: 100%;
  max-width: 680px;
  margin: auto;
  text-align: center;
  animation: fade-up .6s ease both;
}

.welcome-symbol {
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  margin: 0 auto 25px;
  border: 1px solid rgba(185,157,255,.25);
  border-radius: 22px;
  background: linear-gradient(145deg, #29203f, #151320);
  color: #c5adff;
  font-size: 32px;
  box-shadow: 0 0 55px rgba(130,91,230,.14);
}

.eyebrow {
  margin-bottom: 16px;
  color: #a58cde;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
}

.welcome-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(35px, 5vw, 54px);
  font-weight: 600;
  letter-spacing: -2px;
  line-height: 1.13;
}

.welcome-content h1 span {
  color: #a98bff;
}

.welcome-description {
  max-width: 450px;
  margin: 17px auto 35px;
  color: #9290a5;
  font-size: 14px;
  line-height: 1.7;
}

.suggestion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  text-align: left;
}

.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(23,22,34,.8);
  text-align: left;
  transition: .22s ease;
}

.suggestion-card:hover {
  border-color: rgba(171,143,255,.45);
  background: #1c192b;
  transform: translateY(-3px);
}

.suggestion-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 19px;
}

.suggestion-icon.purple { background: #34254f; color: #c2a8ff; }
.suggestion-icon.blue { background: #1e3048; color: #89baff; }
.suggestion-icon.orange { background: #493023; color: #ffb98a; }
.suggestion-icon.green { background: #1f3b32; color: #83d5b0; }

.suggestion-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.suggestion-text strong {
  color: #e9e5f5;
  font-size: 12px;
  font-weight: 600;
}

.suggestion-text small {
  color: #858397;
  font-size: 10px;
}

.suggestion-arrow {
  margin-left: auto;
  color: #777187;
  font-size: 16px;
}

/* CHAT */

.chat-area {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 20px;
  scroll-behavior: smooth;
}

.messages-container {
  width: 100%;
  max-width: 790px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 88%;
  animation: fade-up .25s ease both;
}

.message.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, #a78bfa, #6343b2);
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.user-message .message-avatar {
  background: #292838;
  color: #c4b4ff;
}

.message-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.message-name {
  color: #aaa5c0;
  font-size: 11px;
  font-weight: 700;
}

.user-message .message-name {
  text-align: right;
}

.message-bubble {
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 4px 15px 15px 15px;
  background: #171622;
  color: #e7e4ef;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.user-message .message-bubble {
  border-color: rgba(160,130,255,.15);
  border-radius: 15px 4px 15px 15px;
  background: #28213b;
  color: #f0eaff;
}

/* COMPOSER */

.composer-area {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  padding: 12px 25px 17px;
}

.composer {
  padding: 14px 15px 10px;
  border: 1px solid rgba(174,146,255,.2);
  border-radius: 17px;
  background: #14131e;
  box-shadow: 0 10px 50px rgba(0,0,0,.18);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.composer:focus-within {
  border-color: rgba(174,146,255,.55);
  box-shadow: 0 0 0 3px rgba(153,119,255,.07);
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 35px;
  max-height: 160px;
  resize: none;
  outline: none;
  border: 0;
  background: transparent;
  color: #f5f1ff;
  font-size: 14px;
  line-height: 1.6;
}

.composer textarea::placeholder {
  color: #777487;
}

.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.composer-hint {
  color: #a58de0;
  font-size: 13px;
}

.composer-hint span {
  margin-left: 4px;
  color: #777487;
  font-size: 10px;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enter-hint {
  color: #6f6d80;
  font-size: 10px;
}

.send-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(140deg, #b39aff, #7955d5);
  color: white;
  font-size: 22px;
  font-weight: 700;
  transition: .2s ease;
}

.send-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(139,92,246,.35);
}

.send-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.disclaimer {
  margin-top: 11px;
  color: #626174;
  text-align: center;
  font-size: 10px;
}

/* ANIMATIONS */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */

.mobile-overlay {
  display: none;
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(290px, 85vw);
    min-width: 0;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 15px 0 50px rgba(0,0,0,.35);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(0,0,0,.6);
  }

  .close-sidebar, .menu-button, .mobile-brand {
    display: grid;
  }

  .mobile-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #eee8ff;
  }

  .model-label {
    display: none;
  }

  .topbar {
    height: 61px;
    min-height: 61px;
    padding: 0 15px;
  }

  .welcome-screen {
    padding: 25px 17px;
  }

  .welcome-content h1 {
    font-size: 38px;
  }

  .suggestion-grid {
    gap: 9px;
  }

  .suggestion-card {
    padding: 11px;
    min-height: 76px;
    gap: 9px;
  }

  .suggestion-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 16px;
  }

  .suggestion-text strong {
    font-size: 11px;
  }

  .suggestion-text small {
    font-size: 9px;
  }

  .composer-area {
    padding: 10px 12px 13px;
  }

  .chat-area {
    padding: 20px 13px;
  }

  .message {
    max-width: 96%;
  }
}

@media (max-width: 420px) {
  .suggestion-grid {
    grid-template-columns: 1fr;
  }

  .welcome-content h1 {
    font-size: 34px;
  }

  .welcome-description {
    font-size: 12px;
  }

  .preview-label {
    display: none;
  }

  .enter-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* NEXORA ACCOUNT SCREEN */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 20%, #30205c 0%, transparent 45%),
    #09090f;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 38px;
  border: 1px solid #302747;
  border-radius: 22px;
  background: #11101a;
  box-shadow: 0 25px 80px #0008;
  text-align: center;
}

.auth-logo {
  color: #b69aff;
  font-size: 25px;
  font-weight: 800;
  margin-bottom: 30px;
}

.auth-card h1 {
  color: #fff;
  font-size: 30px;
  margin-bottom: 8px;
}

.auth-card p {
  color: #aaa3bb;
}

.google-btn,
.auth-submit {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
}

.google-btn {
  background: white;
  color: #222;
  border: none;
}

.google-icon {
  margin-right: 12px;
  font-weight: 900;
  color: #4285f4;
}

.auth-divider {
  color: #827b91;
  font-size: 11px;
  margin: 25px 0;
}

.auth-field {
  text-align: left;
  margin-bottom: 17px;
}

.auth-field label {
  display: block;
  color: #ddd5ee;
  margin-bottom: 8px;
  font-size: 13px;
}

.auth-field input {
  width: 100%;
  padding: 14px;
  color: white;
  background: #191724;
  border: 1px solid #393149;
  border-radius: 9px;
  outline: none;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #9b7bff;
}

.auth-submit {
  background: #9065ed;
  color: white;
  border: none;
}

.auth-switch {
  margin-top: 23px;
  font-size: 13px;
}

.auth-switch button {
  color: #b69aff;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

.auth-terms {
  font-size: 11px;
  margin-top: 25px;
}

.auth-message {
  font-size: 13px;
  margin-top: 12px;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 25px 20px;
  }
}

/* PREMIUM GUEST BUTTON */
.guest-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px;
  margin: 0 0 20px;
  border: 1px solid rgba(166, 130, 255, 0.35);
  border-radius: 13px;
  background: linear-gradient(110deg, #302052, #191426);
  color: white;
  text-align: left;
  cursor: pointer;
  transition: 0.25s ease;
}

.guest-btn:hover {
  transform: translateY(-2px);
  border-color: #a98aff;
  box-shadow: 0 8px 28px rgba(145, 94, 255, 0.22);
  background: linear-gradient(110deg, #49306f, #211932);
}

.guest-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #9065ed;
  color: white;
  font-size: 22px;
  box-shadow: 0 0 20px #9065ed55;
  flex-shrink: 0;
}

.guest-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.guest-content strong {
  font-size: 14px;
  font-weight: 700;
}

.guest-content small {
  color: #aaa0c0;
  font-size: 11px;
}

.guest-arrow {
  color: #c6adff;
  font-size: 23px;
  transition: transform 0.2s ease;
}

.guest-btn:hover .guest-arrow {
  transform: translateX(4px);
}

.guest-signout {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 10000;
  padding: 11px 17px;
  border: 1px solid #49376b;
  border-radius: 10px;
  background: #171322;
  color: #c6adff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.guest-signout:hover {
  background: #302052;
  border-color: #a98aff;
}

