/* [project]/src/app/globals.css [app-client] (css) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg-primary: #0a0a0f;
  --color-bg-secondary: #13131a;
  --color-bg-tertiary: #1c1c24;
  --color-text-primary: #f0f0f5;
  --color-text-secondary: #a0a0b0;
  --color-text-muted: #666675;
  --color-ai-start: #7c3aed;
  --color-ai-end: #06b6d4;
  --color-ai-glow: #7c3aed26;
  --color-border-subtle: #ffffff14;
  --shadow-layer-1: 0 1px 2px #0000004d;
  --shadow-layer-2: 0 4px 12px #0006;
}

[data-theme="light"] {
  --color-bg-primary: #fafafa;
  --color-bg-secondary: #fff;
  --color-bg-tertiary: #f3f4f6;
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #9ca3af;
  --color-border-subtle: #00000014;
  --shadow-layer-1: 0 1px 2px #0000001a;
  --shadow-layer-2: 0 4px 12px #00000026;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
  transition: background .3s, color .3s;
}

#fallback {
  width: 100%;
  height: 100%;
  background-image: url("https://i.pinimg.com/originals/f7/e5/02/f7e502a96a628e356919ede599adbe0b.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  transition: opacity .4s, visibility .4s;
}

#fallback.hidden {
  opacity: 0;
  visibility: hidden;
  display: none;
}

.search-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 60px;
}

.search-box {
  display: flex;
  background: #fffffff2;
  border-radius: 50px;
  box-shadow: 0 4px 20px #0000004d;
}

#search-input {
  flex: 1;
  padding: 18px 25px;
  border: none;
  outline: none;
  font-size: 16px;
  background: none;
}

#search-google {
  color: #fff;
  background: #667eea;
  font-size: 20px;
  line-height: 42px;
  width: 65px;
  text-align: center;
  border-radius: 50%;
  border: 5px solid #667eea;
  margin: -5px -15px;
  cursor: pointer;
  box-shadow: 0 0 16px -2px #223691;
  display: flex;
  align-items: center;
  justify-content: center;
}

#search-yandex {
  cursor: pointer;
  font-size: 16px;
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffd600;
  border-width: 0;
  border-style: none;
  border-color: currentColor;
  border-image: initial;
  padding: 0 50px;
  margin: 0 -17px 0 0;
}

.time-container {
  color: #fff;
  text-shadow: 0 2px 10px #00000080;
  margin-bottom: auto;
}

#time {
  font-size: 120px;
  font-weight: 300;
  margin-bottom: 20px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}

#date {
  font-size: 32px;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}

.chat-mode {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  background: var(--color-bg-primary);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s;
}

.chat-mode--visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.chat-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100%;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 12px #7c3aed4d;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -.3px;
}

.sidebar-actions {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  box-shadow: 0 2px 12px #7c3aed4d;
}

.sidebar-btn-primary:hover {
  opacity: .9;
  transform: translateY(-1px);
}

.sidebar-btn-secondary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}

.sidebar-btn-secondary:hover:not(:disabled) {
  border-color: var(--color-ai-start);
  color: var(--color-text-primary);
}

.sidebar-btn-secondary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.sidebar-search-wrap {
  position: relative;
  padding: 8px 12px;
}

.sidebar-search-icon {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.sidebar-search {
  width: 100%;
  padding: 7px 28px 7px 32px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.sidebar-search:focus {
  border-color: var(--color-ai-start);
}

.sidebar-search::placeholder {
  color: var(--color-text-muted);
}

.sidebar-search-clear {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
}

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

.sidebar-list::-webkit-scrollbar {
  width: 3px;
}

.sidebar-list::-webkit-scrollbar-thumb {
  background: var(--color-border-subtle);
  border-radius: 3px;
}

.sidebar-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 10px;
  color: var(--color-text-muted);
  text-align: center;
}

.sidebar-empty p {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.sidebar-empty span {
  font-size: 12px;
}

.sidebar-group {
  margin-bottom: 4px;
}

.sidebar-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.sidebar-group-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: color .2s;
}

.sidebar-group-toggle:hover {
  color: var(--color-text-secondary);
}

.sidebar-chat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
  position: relative;
}

.sidebar-chat-item:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.sidebar-chat-item.active {
  background: #7c3aed1f;
  color: var(--color-text-primary);
}

.sidebar-chat-item.active .sidebar-item-icon {
  color: var(--color-ai-start);
}

.sidebar-item-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.sidebar-item-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-item-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  opacity: 0;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: opacity .15s, color .15s;
  flex-shrink: 0;
}

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

.sidebar-item-delete:hover {
  color: #ef4444;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13px;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: all .2s;
}

.sidebar-logout:hover {
  color: #ef4444;
  background: #ef444414;
}

.standalone-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--color-bg-primary);
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  align-self: stretch;
}

.standalone-messages {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.standalone-messages::-webkit-scrollbar {
  width: 4px;
}

.standalone-messages::-webkit-scrollbar-thumb {
  background: var(--color-border-subtle);
  border-radius: 4px;
}

.standalone-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 60px 24px;
}

.standalone-welcome-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 24px;
  box-shadow: 0 0 32px #7c3aed4d;
  animation: 3s infinite pulse-ai;
}

.standalone-welcome h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 10px;
  letter-spacing: -.5px;
}

.standalone-welcome p {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
}

.standalone-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 560px;
  width: 100%;
}

.standalone-suggestion {
  padding: 12px 16px;
  text-align: left;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  line-height: 1.4;
}

.standalone-suggestion:hover {
  border-color: var(--color-ai-start);
  color: var(--color-text-primary);
  background: #7c3aed0f;
}

.standalone-msg {
  display: flex;
  gap: 14px;
  animation: .2s slide-up;
}

.standalone-msg.user {
  flex-direction: row-reverse;
}

.standalone-msg.user .standalone-msg-bubble {
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  color: #fff;
  border-bottom-right-radius: 4px;
  max-width: 70%;
}

.standalone-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-top: 2px;
}

.standalone-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--color-bg-secondary);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-primary);
  max-width: 75%;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-layer-1);
}

.standalone-input-area {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-bg-primary);
}

.standalone-input-box {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 14px;
  padding: 12px 14px 8px;
  transition: border-color .2s, box-shadow .2s;
}

.standalone-input-box:focus-within {
  border-color: #7c3aed80;
  box-shadow: 0 0 0 3px #7c3aed1a;
}

.standalone-textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  min-height: 24px;
  max-height: 160px;
  font-family: inherit;
}

.standalone-textarea::placeholder {
  color: var(--color-text-muted);
}

.standalone-input-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.standalone-model-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.standalone-model-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 12px;
  padding: 5px 24px 5px 10px;
  cursor: pointer;
  outline: none;
  max-width: 160px;
  transition: border-color .2s;
}

.standalone-model-select:hover {
  border-color: var(--color-ai-start);
}

.standalone-model-select option {
  background: #1c1c24;
  color: #f0f0f5;
}

.standalone-model-chevron {
  position: absolute;
  right: 7px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.standalone-send-btn {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .2s, transform .1s;
  flex-shrink: 0;
}

.standalone-send-btn:hover:not(:disabled) {
  opacity: .9;
  transform: scale(1.05);
}

.standalone-send-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.standalone-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 8px;
}

.project-workspace {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--color-bg-primary);
}

.project-sidebar {
  width: 240px;
  min-width: 240px;
  height: 100%;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.project-back-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all .2s;
  flex-shrink: 0;
}

.project-back-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
}

.project-sidebar-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
}

.project-sidebar-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-sidebar-actions {
  display: flex;
  gap: 4px;
}

.project-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: all .2s;
}

.project-icon-btn:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
}

.project-sidebar-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.project-chats-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.project-sidebar-empty {
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 12px 8px;
  text-align: center;
}

.project-chat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 8px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all .15s;
  position: relative;
}

.project-chat-item:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.project-chat-item.active {
  background: #7c3aed1f;
  color: var(--color-text-primary);
}

.project-chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-chat-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  opacity: 0;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: opacity .15s, color .15s;
  flex-shrink: 0;
}

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

.project-chat-delete:hover {
  color: #ef4444;
}

.project-new-chat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px;
  padding: 8px 12px;
  background: none;
  border: 1px dashed var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}

.project-new-chat-btn:hover {
  border-color: var(--color-ai-start);
  color: var(--color-ai-start);
  background: #7c3aed0d;
}

.project-chat-col {
  width: 380px;
  min-width: 320px;
  height: 100%;
  border-right: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
}

.project-editor-col {
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.project-no-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  font-size: 14px;
}

.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: #0009;
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-modal {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 16px;
  padding: 24px;
  width: 380px;
  box-shadow: 0 8px 40px #00000080;
  animation: .15s scale-in;
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.share-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.share-modal-header button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color .2s;
}

.share-modal-header button:hover {
  color: var(--color-text-primary);
}

.share-copy-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 16px;
}

.share-copy-link:hover {
  border-color: var(--color-ai-start);
  color: var(--color-ai-start);
}

.share-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.share-invite-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.share-email-input {
  flex: 1;
  padding: 9px 12px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.share-email-input:focus {
  border-color: var(--color-ai-start);
}

.share-email-input::placeholder {
  color: var(--color-text-muted);
}

.share-role-select {
  padding: 9px 10px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-size: 13px;
  outline: none;
}

.share-error {
  font-size: 12px;
  color: #ef4444;
  margin-bottom: 8px;
}

.share-invite-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

.share-invite-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.share-invite-btn:hover:not(:disabled) {
  opacity: .9;
}

.chat-panel-sidebar {
  width: 350px;
  height: 100%;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-layer-2);
}

.editor-panel {
  flex: 1;
  height: 100%;
  background: var(--color-bg-primary);
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--color-ai-start) 0%, var(--color-ai-end) 100%);
  color: #fff;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-selector-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.model-selector {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff26;
  border: 1px solid #ffffff40;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 26px 5px 10px;
  cursor: pointer;
  outline: none;
  max-width: 140px;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-selector:hover {
  background: #ffffff40;
  border-color: #fff6;
}

.model-selector option {
  background: #1c1c24;
  color: #f0f0f5;
  font-size: 13px;
}

.model-selector-chevron {
  position: absolute;
  right: 7px;
  color: #fffc;
  pointer-events: none;
  flex-shrink: 0;
}

.chat-logo {
  width: 35px;
  height: 35px;
  background: #fff3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--color-bg-primary);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-message {
  display: flex;
  max-width: 90%;
  gap: 10px;
}

.chat-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message.bot {
  align-self: flex-start;
}

.message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-ai-start) 0%, var(--color-ai-end) 100%);
  color: #fff;
}

.chat-message.bot .message-avatar {
  background: linear-gradient(135deg, var(--color-ai-start) 0%, var(--color-ai-end) 100%);
}

.message-content {
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.chat-message.user .message-content {
  background: linear-gradient(135deg, var(--color-ai-start) 0%, var(--color-ai-end) 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-message.bot .message-content {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-layer-1);
}

.chat-welcome {
  text-align: center;
  padding: 40px 20px;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-ai-start) 0%, var(--color-ai-end) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px var(--color-ai-glow);
  animation: 2s infinite pulse-ai;
}

.quick-prompts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.quick-prompt {
  padding: 10px 20px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 20px;
  color: var(--color-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.quick-prompt:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-ai-start);
  box-shadow: var(--shadow-glow);
}

.chat-input-wrapper {
  padding: 15px;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-subtle);
}

.chat-input-container {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#chat-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 100px;
  min-height: 40px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  transition: border-color .2s, box-shadow .2s;
}

#chat-input:focus {
  border-color: var(--color-ai-start);
  box-shadow: var(--shadow-glow);
}

#chat-input::placeholder {
  color: var(--color-text-muted);
}

.chat-send {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-ai-start) 0%, var(--color-ai-end) 100%);
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
}

.chat-send:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.editor-header {
  padding: 15px 25px;
  border-bottom: 1px solid var(--color-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg-secondary);
}

.editor-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.editor-tools {
  display: flex;
  gap: 10px;
}

.tool-btn {
  padding: 8px 15px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tool-btn:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-ai-start);
  color: var(--color-text-primary);
}

.editor-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.document-page {
  width: 100%;
  max-width: 800px;
  background: var(--color-bg-secondary);
  min-height: 100%;
  padding: 60px 80px;
  box-shadow: var(--shadow-layer-2);
  outline: none;
  font-family: Inter, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-primary);
  white-space: pre-wrap;
  border-radius: 12px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-ai {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--color-ai-glow);
  }

  50% {
    box-shadow: 0 0 0 8px #0000;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(.98);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hidden {
  display: none !important;
}

.login {
  position: fixed;
  z-index: 100;
  color: #fff;
  width: 40px;
  height: 40px;
  right: 15px;
  top: 13px;
  border: 1px solid #ffffff80;
  border-radius: 10px;
  opacity: .3;
  cursor: pointer;
  transition: all .4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login:hover {
  opacity: .9;
}

.change-bg {
  position: fixed;
  z-index: 100;
  color: #fff;
  width: 40px;
  height: 40px;
  right: 15px;
  top: 63px;
  border: 1px solid #ffffff80;
  border-radius: 10px;
  opacity: .3;
  cursor: pointer;
  transition: all .4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.change-bg:hover {
  opacity: .9;
}

.theme-toggle-landing {
  position: fixed;
  z-index: 100;
  color: #fff;
  width: 40px;
  height: 40px;
  right: 15px;
  top: 113px;
  border: 1px solid #ffffff80;
  border-radius: 10px;
  opacity: .3;
  cursor: pointer;
  transition: all .4s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-landing:hover {
  opacity: .9;
}

.tool-btn.active {
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  color: #fff;
  border-color: #0000;
}

.tool-btn.export-btn {
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 12px;
}

.tool-btn.export-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  color: #fff;
  border-color: #0000;
}

.tool-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.chat-input-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.chat-send:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

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

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-ai-start);
  animation: 1.2s ease-in-out infinite typing-bounce;
}

.typing-dots span:first-child {
  animation-delay: 0s;
}

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

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

@keyframes typing-bounce {
  0%, 80%, 100% {
    transform: scale(.8);
    opacity: .5;
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.markdown-content {
  font-size: 14px;
  line-height: 1.6;
}

.markdown-content p {
  margin: 0 0 8px;
}

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

.markdown-content h1, .markdown-content h2, .markdown-content h3 {
  font-weight: 600;
  margin: 12px 0 6px;
  color: var(--color-text-primary);
}

.markdown-content h1 {
  font-size: 18px;
}

.markdown-content h2 {
  font-size: 16px;
}

.markdown-content h3 {
  font-size: 14px;
}

.markdown-content ul, .markdown-content ol {
  padding-left: 20px;
  margin: 6px 0;
}

.markdown-content li {
  margin: 3px 0;
}

.markdown-content strong {
  font-weight: 600;
  color: var(--color-text-primary);
}

.markdown-content em {
  font-style: italic;
  color: var(--color-text-secondary);
}

.md-code-inline {
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: JetBrains Mono, Courier New, monospace;
  font-size: 12px;
  color: #06b6d4;
}

.md-code-block {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: JetBrains Mono, Courier New, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.md-code-block code {
  color: #a5f3fc;
  background: none;
  border: none;
  padding: 0;
}

.md-link {
  color: var(--color-ai-end);
  text-decoration: underline;
  text-decoration-color: #06b6d466;
  text-underline-offset: 2px;
  transition: color .2s;
}

.md-link:hover {
  color: var(--color-ai-start);
}

.markdown-content blockquote {
  border-left: 3px solid var(--color-ai-start);
  padding-left: 12px;
  margin: 8px 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
}

.markdown-content th, .markdown-content td {
  border: 1px solid var(--color-border-subtle);
  padding: 6px 10px;
}

.markdown-content th {
  background: var(--color-bg-tertiary);
  font-weight: 600;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: 12px 0;
}

.bg-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000b3;
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
}

.bg-modal.active {
  display: flex;
}

.bg-content {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  padding: 30px;
  border-radius: 16px;
  max-width: 480px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px #00000080;
  animation: .15s ease-out scale-in;
}

.bg-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  transition: all .2s;
}

.bg-close-btn:hover {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
}

.bg-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.bg-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  transition: border-color .2s;
}

.bg-input:focus {
  border-color: var(--color-ai-start);
}

.bg-input::placeholder {
  color: var(--color-text-muted);
}

.bg-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.bg-button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 8px;
  transition: opacity .2s;
}

.bg-button:hover {
  opacity: .9;
}

.bg-button.bg-reset {
  background: #ef444426;
  color: #ef4444;
  border: 1px solid #ef44444d;
}

.bg-button.bg-reset:hover {
  background: #ef444440;
}

.ProseMirror {
  outline: none;
}

.ProseMirror h1 {
  font-size: 2em;
  font-weight: 700;
  margin: .8em 0 .4em;
}

.ProseMirror h2 {
  font-size: 1.5em;
  font-weight: 600;
  margin: .7em 0 .35em;
}

.ProseMirror h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin: .6em 0 .3em;
}

.ProseMirror p {
  margin: 0 0 .8em;
}

.ProseMirror p:last-child {
  margin-bottom: 0;
}

.ProseMirror strong {
  font-weight: 700;
}

.ProseMirror em {
  font-style: italic;
}

.ProseMirror ul {
  list-style-type: disc;
  padding-left: 1.5em;
  margin: .5em 0;
}

.ProseMirror ol {
  list-style-type: decimal;
  padding-left: 1.5em;
  margin: .5em 0;
}

.ProseMirror li {
  margin: .2em 0;
}

.ProseMirror blockquote {
  border-left: 4px solid var(--color-ai-start);
  padding-left: 1em;
  margin: 1em 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.ProseMirror code {
  background: var(--color-bg-tertiary);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: JetBrains Mono, Courier New, monospace;
  font-size: .875em;
  color: #06b6d4;
}

.ProseMirror pre {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  padding: 1em;
  overflow-x: auto;
  margin: 1em 0;
}

.ProseMirror pre code {
  background: none;
  padding: 0;
  color: #a5f3fc;
}

.drag-overlay {
  position: absolute;
  inset: 0;
  background: #7c3aede6;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 100;
  pointer-events: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.animate-spin {
  animation: 1s linear infinite spin;
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (width <= 768px) {
  .chat-panel-sidebar {
    width: 100%;
    position: absolute;
    z-index: 50;
  }
}

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--color-bg-primary);
}

.auth-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 20% 30%, #7c3aed26 0%, #0000 70%), radial-gradient(50% 40% at 80% 70%, #06b6d41a 0%, #0000 70%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 20px;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px #0006;
  animation: .2s ease-out scale-in;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.auth-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 20px var(--color-ai-glow);
  flex-shrink: 0;
}

.auth-logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -.5px;
}

.auth-subtitle {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-toggle {
  display: flex;
  background: var(--color-bg-tertiary);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 24px;
}

.auth-toggle-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--color-text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}

.auth-toggle-btn.active {
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px #7c3aed4d;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border-subtle);
  border-radius: 10px;
  transition: border-color .2s, box-shadow .2s;
}

.auth-field:focus-within {
  border-color: var(--color-ai-start);
  box-shadow: 0 0 0 3px var(--color-ai-glow);
}

.auth-field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 14px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  pointer-events: none;
}

.auth-field:focus-within .auth-field-icon {
  color: var(--color-ai-start);
}

.auth-input {
  flex: 1;
  padding: 12px 12px 12px 10px;
  background: none;
  border: none;
  outline: none;
  color: var(--color-text-primary);
  font-size: 14px;
  min-width: 0;
}

.auth-input::placeholder {
  color: var(--color-text-muted);
}

.auth-eye-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0 12px;
  display: flex;
  align-items: center;
  height: 100%;
  transition: color .2s;
}

.auth-eye-btn:hover {
  color: var(--color-text-secondary);
}

.auth-error {
  padding: 10px 14px;
  background: #ef44441a;
  border: 1px solid #ef44444d;
  border-radius: 8px;
  color: #ef4444;
  font-size: 13px;
  text-align: center;
}

.auth-submit {
  padding: 13px;
  background: linear-gradient(135deg, var(--color-ai-start), var(--color-ai-end));
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.auth-submit:hover:not(:disabled) {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px #7c3aed66;
}

.auth-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.auth-link {
  background: none;
  border: none;
  color: var(--color-ai-start);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}

.auth-link:hover {
  color: var(--color-ai-end);
}


/*# sourceMappingURL=src_app_globals_b80590.css.map*/
