:root {
  color-scheme: dark;
  --bg-a: #141311;
  --bg-b: rgba(225, 213, 190, 0.06);
  --bg-c: rgba(255, 255, 255, 0.03);
  --panel: rgba(30, 28, 25, 0.92);
  --panel-strong: rgba(34, 31, 28, 0.98);
  --panel-soft: rgba(29, 27, 24, 0.94);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3eee4;
  --muted: rgba(243, 238, 228, 0.62);
  --primary: #faf4e8;
  --primary-2: #f3eee4;
  --user-bubble: rgba(35, 33, 30, 0.96);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.2);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, var(--bg-b), transparent 34%),
    linear-gradient(180deg, #161412, var(--bg-a) 58%, #13110f);
  animation: page-settle 0.55s ease;
  overflow: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
}

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

.hidden {
  display: none !important;
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  overflow: hidden;
}

.main-panel {
  display: flex;
  min-height: 0;
  min-width: 0;
  height: 100%;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.topbar {
  position: relative;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(20, 19, 17, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  animation: surface-in 0.34s ease;
  flex: 0 0 auto;
}

.topbar-content,
.footer-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark,
.empty-state-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.empty-state-mark {
  width: 64px;
  height: 64px;
  border-radius: 22px;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-button,
.attach-button,
.send-button,
.scroll-bottom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: background-color 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}

.icon-button,
.attach-button {
  width: 40px;
  height: 40px;
}

.icon-button:hover,
.attach-button:hover,
.model-button:hover,
.send-button:hover,
.chat-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.icon-button:hover,
.attach-button:hover,
.send-button:hover {
  transform: translateY(-1px);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  height: 100vh;
  height: 100dvh;
  width: 320px;
  max-width: calc(100vw - 28px);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}

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

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-inner {
  height: 100%;
  background: rgba(20, 18, 16, 0.97);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding-top: 48px;
  overflow: hidden;
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-new-chat {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px 18px;
}

.chat-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  position: relative;
  transition: background-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.chat-item-icon {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  color: rgba(15, 23, 42, 0.72);
}

.chat-item.active {
  background: rgba(255, 255, 255, 0.06);
}

.chat-item:hover {
  transform: none;
}

.chat-item-copy {
  min-width: 0;
  flex: 1;
}

.chat-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.chat-item-title {
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-preview,
.chat-item-time,
.footer,
.empty-state p,
.message-bubble.ai {
  color: var(--muted);
}

.chat-item-time {
  flex: 0 0 auto;
  font-size: 0.7rem;
  white-space: nowrap;
}

.chat-delete {
  opacity: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-item:hover .chat-delete,
.chat-item.active .chat-delete {
  opacity: 1;
}

.chat-delete:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f3eee4;
}

.list-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.chat-layout {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.chat-frame {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.messages-scroll {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  display: flex;
  justify-content: center;
  padding: 24px 24px 28px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  gap: 30px;
  min-height: auto;
  margin: 0 auto;
  padding-bottom: 16px;
}

.empty-state {
  margin: auto;
  display: flex;
  max-width: 600px;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 48px 16px 96px;
  animation: rise-in 0.42s ease;
}

.empty-state h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

.message-row {
  display: flex;
  width: 100%;
  max-width: none;
  gap: 0;
  align-items: flex-start;
  animation: rise-in 0.28s ease both;
}

.message-row.user {
  margin-left: auto;
  flex-direction: row-reverse;
  align-self: flex-end;
  width: fit-content;
  max-width: min(100%, 420px);
}

.message-row.ai {
  margin-right: auto;
  width: 100%;
  max-width: 100%;
}

.avatar {
  display: none;
}

.robot-avatar-icon {
  width: 18px;
  height: 18px;
  display: block;
  color: var(--text);
}

.message-bubble {
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  line-height: 1.72;
  white-space: normal;
  word-break: break-word;
  box-shadow: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.message-bubble.user {
  background: var(--user-bubble);
  color: #fff;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  white-space: pre-wrap;
}

.message-bubble.ai {
  background: transparent;
  border: none;
  color: var(--text);
  width: 100%;
  max-width: 100%;
}

.message-bubble.loading {
  min-width: 68px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.message-rich {
  white-space: normal;
  font-size: 1rem;
  line-height: 1.78;
  letter-spacing: -0.002em;
  color: var(--text);
}

.message-rich > :first-child {
  margin-top: 0;
}

.message-rich > :last-child {
  margin-bottom: 0;
}

.message-rich p,
.message-rich ul,
.message-rich ol,
.message-rich pre,
.message-rich blockquote,
.message-rich table {
  margin: 0 0 1em;
}

.message-rich ul,
.message-rich ol {
  padding-left: 1.2em;
}

.message-rich li + li {
  margin-top: 0.3em;
}

.message-rich code {
  padding: 0.12em 0.38em;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  color: #f5d9a7;
}

.message-rich pre {
  overflow-x: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-block {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.code-block + .code-block {
  margin-top: 10px;
}

.code-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.code-block-lang {
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(243, 238, 228, 0.5);
}

.code-copy-button {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.code-copy-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.code-block pre {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.message-rich pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.9em;
}

.message-rich blockquote {
  padding-left: 12px;
  border-left: 3px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
}

.message-rich a {
  color: #83b9ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-response-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
}

.message-response-model {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
}

.message-response-model::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(243, 238, 228, 0.42);
}

.message-copy-button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.message-copy-button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.message-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.message-documents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.message-document {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.message-document-ext {
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(243, 238, 228, 0.76);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-align: center;
}

.message-document-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

.message-image-link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.message-image {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.typing-dots {
  display: flex;
  gap: 6px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  animation: bounce 1s infinite ease-in-out;
}

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

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

.scroll-bottom {
  position: absolute;
  right: 24px;
  bottom: 20px;
  left: auto;
  width: 40px;
  height: 40px;
  margin: 0;
  background: rgba(30, 28, 25, 0.95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  z-index: 5;
}

.composer-wrap {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  padding: 12px 24px 24px;
  display: flex;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(20, 19, 17, 0) 0%, rgba(20, 19, 17, 0.78) 24%, rgba(20, 19, 17, 0.97) 100%);
}

.composer {
  width: min(100%, 720px);
  background: var(--panel-soft);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  animation: surface-in 0.4s ease;
}

.composer-body {
  padding: 8px;
}

.attachment-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 8px 4px;
}

.attachment-card {
  position: relative;
  width: 84px;
  min-width: 84px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  animation: rise-in 0.26s ease;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.attachment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
}

.attachment-thumb {
  display: block;
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.attachment-doc {
  width: 100%;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.attachment-doc-ext {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(243, 238, 228, 0.82);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.attachment-meta {
  padding: 6px 8px 8px;
}

.attachment-name {
  display: block;
  font-size: 0.7rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.attachment-progress {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 32px;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.attachment-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.42));
  border-radius: inherit;
  animation: progress-shimmer 1.2s linear infinite;
}

.attachment-progress-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
}

.attachment-error {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.chat-input {
  width: 100%;
  min-height: 64px;
  max-height: 240px;
  padding: 16px 18px 14px;
  border: none;
  background: transparent;
  resize: none;
  color: var(--text);
  outline: none;
  font-size: 0.98rem;
  line-height: 1.55;
}

.chat-input::placeholder {
  color: rgba(243, 238, 228, 0.42);
}

.composer-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px;
  gap: 10px;
  min-width: 0;
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.composer-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.model-dropdown {
  position: relative;
  min-width: 0;
  flex: 0 1 auto;
  z-index: 5;
}

.model-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 36px;
  width: auto;
  max-width: min(54vw, 240px);
  padding: 0 10px 0 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.model-button-content {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.model-button-content > span:not(.icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.model-menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 240px;
  max-width: min(80vw, 320px);
  max-height: min(420px, calc(100vh - 180px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
  border-radius: 16px;
  background: var(--panel-strong);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 20;
  animation: menu-rise 0.16s ease;
}

.model-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
}

.model-option-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
}

.model-option-copy {
  min-width: 0;
}

.model-option-name {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-option.selected {
  background: rgba(255, 255, 255, 0.06);
}

.send-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.send-button:disabled {
  opacity: 0.35;
}

.footer {
  border-top: 1px solid var(--border);
  backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.75rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
}

.footer-content p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 16px;
}

.footer-nav a:hover {
  color: var(--primary);
}

.status-note {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #f0a873;
}

.attach-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 12px;
  color: rgba(243, 238, 228, 0.74);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.attach-button input[type="file"] {
  display: none;
}

.attach-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
}

.icon.small {
  width: 14px;
  height: 14px;
}

.icon::before,
.icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
}

.icon-menu::before {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.icon-plus::before,
.icon-plus::after {
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.icon-plus::after {
  transform: rotate(90deg);
}

.icon-paperclip::before {
  width: 11px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  clip-path: inset(0 0 3px 0);
  transform: rotate(-35deg);
}

.icon-arrow-right::before {
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.icon-arrow-right::after {
  width: 12px;
  height: 2px;
  background: currentColor;
}

.icon-arrow-down::before {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
}

.icon-chevron-down::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
}

.icon-bot::before {
  width: 12px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
  transform: translateY(2px);
}

.icon-bot::after {
  width: 2px;
  height: 4px;
  background: currentColor;
  top: -9px;
  box-shadow: -3px 10px 0 currentColor, 3px 10px 0 currentColor;
}

.icon-message::before {
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.icon-message::after {
  width: 6px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  bottom: -4px;
  left: 3px;
  transform: skew(-20deg);
}

.icon-trash::before {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: none;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  top: 3px;
}

.icon-trash::after {
  width: 14px;
  height: 2px;
  background: currentColor;
  top: -8px;
  box-shadow: 0 4px 0 currentColor;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@keyframes page-settle {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

@keyframes progress-shimmer {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.08);
  }
  100% {
    filter: brightness(1);
  }
}

@media (min-width: 1024px) {
  .sidebar {
    position: relative;
    transform: none;
    height: 100%;
    width: 320px;
    max-width: 320px;
    z-index: 1;
    flex: 0 0 320px;
    transition: width 0.22s ease, max-width 0.22s ease, flex-basis 0.22s ease, opacity 0.22s ease;
  }

  .sidebar-inner {
    padding-top: 0;
  }

  .sidebar.desktop-collapsed {
    width: 0;
    max-width: 0;
    flex-basis: 0;
    overflow: hidden;
  }

  .sidebar.desktop-collapsed .sidebar-inner {
    opacity: 0;
    pointer-events: none;
  }

  .sidebar-backdrop {
    display: none;
  }

  .topbar-content,
  .footer-content {
    width: min(960px, calc(100% - 32px));
  }

  .topbar-content {
    width: calc(100% - 32px);
    max-width: none;
  }
}

@media (max-width: 767px) {
  .message-row {
    max-width: 92%;
  }

  .messages-scroll {
    padding: 18px 14px 20px;
  }

  .messages-list {
    gap: 10px;
  }

  .composer-wrap {
    padding: 10px 12px 12px;
  }

  .composer-footer {
    gap: 8px;
  }

  .composer-actions {
    gap: 8px;
    overflow: visible;
  }

  .model-button {
    max-width: none;
    min-width: 0;
  }

  .model-menu {
    max-width: min(88vw, 320px);
    max-height: min(50vh, 360px);
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
