:root {
  --bg-main: #131314;
  --bg-sidebar: #1e1f20;
  --bg-hover: #2d2f31;
  --bg-active: #37393b;
  --bg-input: #1e1f20;
  --bg-input-focus: #282a2c;
  --bg-user-bubble: #282a2c;
  --text-main: #e3e3e3;
  --text-muted: #8e918f;
  --text-dim: #5e6062;
  --border-color: #333538;
  --accent-blue: #7cacf8;
  --accent-purple: #c58af9;
  --accent-kiwi: #81c995;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Google Sans", Helvetica, Arial, sans-serif;
}

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

html, body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  height: 100%;
  height: 100dvh;
  display: flex;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* App Container */
.app-container {
  display: flex;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

/* Backdrop for mobile drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

.mobile-close-btn {
  display: none;
}

/* Left Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  transition: width 0.25s ease, transform 0.25s ease;
  z-index: 10;
  height: 100%;
}

.sidebar.collapsed {
  width: 72px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px 18px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-sparkle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 19px;
  font-weight: 500;
  color: #fff;
  letter-spacing: -0.3px;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

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

/* New Chat Pill Button */
.new-chat-container {
  padding: 8px 14px 12px 14px;
}

.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background-color: #1a1a1c;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.new-chat-btn:hover {
  background-color: var(--bg-hover);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border-radius: 20px;
  color: #c4c7c5;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-item:hover {
  background-color: var(--bg-hover);
}

.nav-item.active {
  background-color: #2b2c2f;
  color: #fff;
}

.sidebar-section {
  padding: 18px 14px 6px 14px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 6px 4px;
}

.section-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chat-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 13.5px;
  color: var(--text-main);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s;
}

.chat-history-item:hover {
  background-color: var(--bg-hover);
}

.chat-history-item.active {
  background-color: #2b2c2f;
  color: #fff;
  font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 13px;
  border-radius: 12px;
  cursor: pointer;
}

.footer-nav-item:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.location-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 4px 10px;
}

.user-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 14px;
  cursor: pointer;
}

.user-profile:hover {
  background: var(--bg-hover);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a6e3a1 0%, #40a02b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #111;
  font-size: 14px;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.user-tag {
  font-size: 11px;
  color: var(--accent-kiwi);
}

/* Main Chat Container */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--bg-main);
  overflow: hidden;
}

/* Ambient Blue Glow on initial state (from Screenshot 1) */
.ambient-glow {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 550px;
  background: radial-gradient(circle, rgba(29, 65, 128, 0.45) 0%, rgba(19, 19, 20, 0) 70%);
  pointer-events: none;
  filter: blur(60px);
  z-index: 1;
  transition: opacity 0.5s ease;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 20px;
  z-index: 5;
  gap: 8px;
}

.chat-scroll-area {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  padding-bottom: 160px;
}

/* Greeting Hero (Screenshot 1) */
.hero-greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 15vh;
  margin-bottom: 30px;
  text-align: center;
}

.hero-title {
  font-size: 44px;
  font-weight: 500;
  color: #e3e3e3;
  letter-spacing: -0.5px;
}

/* Conversation Flow (Screenshot 2) */
.messages-container {
  width: 100%;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 20px;
}

.message-row {
  display: flex;
  width: 100%;
}

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

.user-bubble {
  background-color: var(--bg-user-bubble);
  color: #fff;
  padding: 12px 22px;
  border-radius: 24px;
  max-width: 75%;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  user-select: text;
}

.message-row.assistant {
  justify-content: flex-start;
  flex-direction: column;
}

.assistant-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  user-select: text;
  overflow: hidden;
}

.assistant-text {
  font-size: 15px;
  line-height: 1.6;
  color: #e3e3e3;
  margin-bottom: 14px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.assistant-text p {
  margin-bottom: 12px;
}

.assistant-text pre {
  background: #1e1f20;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  max-width: 100%;
  margin: 12px 0;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 13.5px;
}

.assistant-text code {
  font-family: "JetBrains Mono", Consolas, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13.5px;
}

/* Tool execution card */
.tool-card {
  background: #18191a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 10px 0;
  font-size: 13px;
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-blue);
  font-weight: 500;
  margin-bottom: 6px;
}

.tool-content {
  color: var(--text-muted);
  font-family: monospace;
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.tool-preview-img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Actions below assistant response (Screenshot 2) */
.message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.action-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

/* Pinned Bottom Input Bar (Screenshots 1 & 2) */
.bottom-input-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 14px 20px;
  background: linear-gradient(180deg, rgba(19, 19, 20, 0) 0%, rgba(19, 19, 20, 0.85) 25%, #131314 100%);
  z-index: 10;
}

.input-pill-wrapper {
  width: 100%;
  max-width: 820px;
  background-color: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  display: flex;
  align-items: center;
  padding: 6px 14px 6px 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
}

.input-pill-wrapper:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  background-color: var(--bg-input-focus);
}

.input-add-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.input-add-btn:hover {
  background: var(--bg-hover);
}

.prompt-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 15px;
  padding: 8px 12px;
  font-family: inherit;
}

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

/* Model Dropdown Pill */
.model-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  color: #e3e3e3;
  cursor: pointer;
  margin-right: 6px;
  transition: background 0.15s;
}

.model-selector:hover {
  background: rgba(255, 255, 255, 0.1);
}

.send-btn {
  background: transparent;
  border: none;
  color: var(--accent-blue);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.send-btn:hover {
  background: var(--bg-hover);
}

.send-btn:disabled {
  color: var(--text-dim);
  cursor: not-allowed;
}

/* Bottom Disclaimer (Screenshots 1 & 2) */
.disclaimer-text {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 10px;
  text-align: center;
}

.disclaimer-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Slash Autocomplete Popover */
.slash-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 20px;
  right: 20px;
  background: #1e1f20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  z-index: 50;
}

.slash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.slash-item:hover, .slash-item.selected {
  background: var(--bg-hover);
}

.slash-name {
  color: var(--accent-kiwi);
  font-weight: 500;
  font-size: 14px;
}

.slash-desc {
  color: var(--text-muted);
  font-size: 12px;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Settings Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #1e1f20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 560px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

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

.modal-title {
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  background: #131314;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--accent-blue);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 18px;
  border-radius: 18px;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #7cacf8 0%, #c58af9 100%);
  border: none;
  color: #111;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 18px;
  cursor: pointer;
}


/* --- SASISKA AI ENHANCEMENTS --- */

/* Quota Card */
.quota-card {
  margin: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}
.sidebar.collapsed .quota-card {
  display: none;
}
.quota-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}
.quota-badge {
  background: rgba(124, 172, 248, 0.15);
  color: #7cacf8;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 10px;
}
.quota-badge.unlimited {
  background: rgba(166, 227, 161, 0.15);
  color: #a6e3a1;
}
.quota-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8e918f;
  margin-bottom: 4px;
}
.quota-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.quota-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7cacf8, #a6e3a1);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.quota-progress-fill.warning {
  background: #ff7b72;
}

/* Top Model Pill */
.top-model-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 12.5px;
  color: #e3e3e3;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.top-model-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Model Dropdown Menu */
.model-dropdown-menu {
  position: fixed;
  background: #1e1f21;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  width: 280px;
  max-height: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 1000;
  overflow-y: auto;
}
.dropdown-header {
  padding: 10px 14px;
  font-size: 11px;
  text-transform: uppercase;
  color: #8e918f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.model-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13.5px;
  color: #e3e3e3;
  transition: background 0.15s;
}
.model-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.model-dropdown-item.active {
  background: rgba(124, 172, 248, 0.12);
  color: #7cacf8;
  font-weight: 600;
}
.vision-tag {
  font-size: 10px;
  background: rgba(166, 227, 161, 0.15);
  color: #a6e3a1;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Photo Attachment Bar */
.photo-preview-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #252628;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
  max-width: 760px;
  width: 100%;
}
.photo-thumb-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.photo-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-remove-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-meta {
  display: flex;
  flex-direction: column;
}

/* Photo in Chat Bubbles */
.chat-attached-image {
  max-width: 260px;
  max-height: 260px;
  border-radius: 10px;
  margin-bottom: 8px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

/* Voice Button Animated Recording State */
.voice-btn.recording {
  background: rgba(255, 123, 114, 0.2) !important;
  color: #ff7b72 !important;
  animation: pulse-glow 1.2s infinite alternate;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 2px #ff7b72; transform: scale(1); }
  100% { box-shadow: 0 0 14px #ff7b72; transform: scale(1.08); }
}

/* Quick prompt pills */
.quick-prompt-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e3e3e3;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.quick-prompt-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

/* Auth Modal Tabs & Error Box */
.auth-tab-btn {
  background: transparent;
  color: #8e918f;
  border: none;
}
.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}
.auth-error-box {
  background: rgba(255, 123, 114, 0.15);
  border: 1px solid rgba(255, 123, 114, 0.3);
  color: #ff7b72;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #252628;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   MOBILE & TABLET ADAPTIVE STYLES
   ========================================================================== */

.sheet-handle-bar {
  display: none;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  margin: 8px auto 4px auto;
}

@media (max-width: 768px) {
  /* Sidebar Drawer on Mobile */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82%;
    max-width: 310px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
    box-shadow: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sidebar.collapsed {
    width: 82% !important;
    max-width: 310px !important;
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 6px 0 35px rgba(0, 0, 0, 0.85);
  }

  .sidebar.mobile-open .quota-card {
    display: block !important;
  }

  .mobile-close-btn {
    display: flex !important;
  }

  .desktop-collapse-btn {
    display: none !important;
  }

  /* Top Bar */
  .top-bar {
    padding: 8px 12px;
    height: 52px;
  }

  .top-model-pill {
    max-width: 145px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .top-model-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Ambient Glow */
  .ambient-glow {
    width: 320px;
    height: 320px;
    filter: blur(45px);
  }

  /* Hero Greeting */
  .hero-greeting {
    margin-top: 4vh;
    margin-bottom: 20px;
    padding: 0 14px;
  }

  .hero-title {
    font-size: 26px;
    line-height: 1.25;
  }

  .hero-greeting p {
    font-size: 13px !important;
    padding: 0 8px;
  }

  .quick-prompt-btn {
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 14px;
  }

  /* Chat Scroll Area & Messages */
  .chat-scroll-area {
    padding-bottom: 125px;
    -webkit-overflow-scrolling: touch;
  }

  .messages-container {
    padding: 12px 10px;
    gap: 16px;
    max-width: 100%;
  }

  .message-row.user .user-bubble {
    max-width: 88%;
    padding: 10px 14px;
    font-size: 14.5px;
    border-radius: 18px 18px 4px 18px;
    line-height: 1.45;
  }

  .assistant-body {
    max-width: 100%;
  }

  .assistant-text {
    font-size: 14px;
    line-height: 1.55;
  }

  .assistant-text pre {
    font-size: 12px;
    padding: 10px 12px;
    margin: 8px 0;
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .assistant-text code {
    font-size: 12.5px;
  }

  .chat-attached-image {
    max-width: 100%;
    max-height: 220px;
  }

  .assistant-meta-footer {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
  }

  /* Bottom Input Pill */
  .bottom-input-container {
    padding: 0 8px 10px 8px;
  }

  .input-pill-wrapper {
    padding: 4px 8px 4px 4px;
    border-radius: 26px;
  }

  /* Hide model selector inside pill on mobile — top-bar already has it! */
  .input-pill-wrapper .model-selector {
    display: none !important;
  }

  /* 16px font-size prevents iOS Safari from auto-zooming on focus */
  .prompt-input {
    font-size: 16px;
    padding: 8px 6px;
  }

  .input-add-btn, .voice-btn, .send-btn {
    width: 36px;
    height: 36px;
  }

  .disclaimer-text {
    font-size: 10px;
    margin-top: 4px;
    text-align: center;
    padding: 0 10px;
  }

  /* Modal */
  .modal-content {
    width: 92% !important;
    max-width: 380px !important;
    margin: 16px auto;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .form-input {
    font-size: 16px;
  }

  /* Toast */
  .toast-notification {
    left: 16px;
    right: 16px;
    bottom: 80px;
    text-align: center;
    font-size: 13px;
  }
}

/* Navigation Tabs in Header */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-tab.active {
  color: #fff;
  background: #2a2b2d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Action Bar Buttons */
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.top-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.top-action-btn.active {
  background: var(--accent-blue);
  color: #111;
  border-color: var(--accent-blue);
}

/* Views Container */
.view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Landing Page Styles */
.landing-wrapper {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.landing-hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0 16px 0;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(124, 172, 248, 0.1);
  border: 1px solid rgba(124, 172, 248, 0.25);
  color: var(--accent-blue);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

.landing-title {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: -0.6px;
  max-width: 720px;
}

.landing-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: #9da0a4;
  max-width: 600px;
  margin-top: 16px;
}

.landing-cta-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.landing-btn-primary {
  padding: 10px 24px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.landing-btn-primary:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
}

.landing-btn-secondary {
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.15s ease;
}

.landing-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Features Section */
.features-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-headline {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feature-box {
  background: #191a1b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.feature-box:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.feature-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 0.5px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: #f1f2f4;
}

.feature-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #8c9094;
}

/* Tariffs Section / View */
.tariffs-wrapper {
  max-width: 1020px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.tariffs-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tariffs-title {
  font-size: 32px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.4px;
}

.tariffs-subtitle {
  font-size: 14.5px;
  color: #9da0a4;
  margin-top: 8px;
  max-width: 520px;
  line-height: 1.5;
}

.tariffs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.tariff-card {
  background: #191a1b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.tariff-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.tariff-card.featured {
  border-color: var(--accent-blue);
  background: linear-gradient(180deg, rgba(124, 172, 248, 0.04) 0%, #191a1b 100%);
}

.tariff-card.active-plan {
  border-color: var(--accent-kiwi);
}

.tariff-badge-top {
  position: absolute;
  top: -11px;
  right: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--accent-blue);
  color: #111;
  letter-spacing: 0.3px;
}

.tariff-badge-top.current {
  background: var(--accent-kiwi);
}

.tariff-name {
  font-size: 19px;
  font-weight: 600;
  color: #ffffff;
}

.tariff-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 14px 0 6px 0;
}

.tariff-price {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.tariff-period {
  font-size: 13px;
  color: #8c9094;
}

.tariff-quota-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #c4c7c5;
}

.tariff-quota-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tariff-quota-item span:last-child {
  font-weight: 500;
  color: #ffffff;
}

.tariff-features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: #9da0a4;
  flex: 1;
  margin-bottom: 24px;
}

.tariff-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.tariff-check-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-kiwi);
  flex-shrink: 0;
  margin-top: 1px;
}

.tariff-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tariff-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.tariff-btn.btn-current {
  background: rgba(129, 201, 149, 0.15);
  border-color: var(--accent-kiwi);
  color: var(--accent-kiwi);
  cursor: default;
}

.tariff-btn.btn-choose {
  background: #ffffff;
  color: #111111;
  font-weight: 600;
  border: none;
}

.tariff-btn.btn-choose:hover {
  background: #e4e4e7;
}

/* User Settings Modal styling */
.settings-hint {
  font-size: 11.5px;
  color: #8c9094;
  margin-top: 4px;
  line-height: 1.4;
}

.settings-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: #131314;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
}

.settings-textarea:focus {
  border-color: var(--accent-blue);
}

@media (max-width: 768px) {
  .landing-title {
    font-size: 28px;
  }
  .landing-wrapper, .tariffs-wrapper {
    padding: 24px 16px 60px 16px;
  }
  .top-actions {
    gap: 4px;
  }
  .top-action-btn {
    padding: 5px 8px;
    font-size: 11.5px;
  }
}

/* Bottom-Sheet Model Dropdown on small screens */
@media (max-width: 640px) {
  .sheet-handle-bar {
    display: block;
  }

  .model-dropdown-menu {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
    animation: slideUp 0.22s ease-out;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .model-dropdown-item {
    padding: 12px 18px;
    font-size: 14px;
  }
}
