:root {
  --primary-bg: #0f172a;
  --secondary-bg: #1e293b;
  --accent-blue: #3b82f6;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: #334155;
  --border-hi: #3a4453;
  --input-bg: #1e293b;
  --scrollbar-width: 8px;
  --content-max: 800px;
  --sidebar-w: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button, .btn, .icon-btn, .send-btn { outline: none; }
button:focus, button:focus-visible { outline: none; }

html, body {
  height: 100%;
  height: 100dvh;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-primary);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a { color: white; }

.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--primary-bg);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 1rem;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}
.header-left {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--text-primary);
}
.header-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--accent-blue);
  object-fit: cover;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dropdown-btn, .notification-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  padding: 0.5rem;
  cursor: pointer;
}
.notification-btn { position: relative; }
.notification-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 50px; right: 10px;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-width: 200px;
  z-index: 1000;
  overflow: hidden;
}
.dropdown-content.show { display: block; }
.model-item {
  padding: 12px;
  cursor: pointer;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}
.model-item:last-child { border-bottom: none; }
.model-item:hover { background: var(--secondary-bg); }
.model-item.active { background: var(--accent-blue); color: white; }

.menu-toggle {
  position: fixed;
  left: 0;
  top: 8px;
  background: #0f172a;
  border: none;
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menu-toggle .blue-dot {
  width: 8px; height: 8px;
  background: #4cff00;
  border-radius: 50%;
  margin-left: 8px;
  display: none;
}
.menu-toggle.has-new-message .blue-dot { display: block; }

.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  position: fixed;
  left: calc(-1 * var(--sidebar-w));
  top: 0;
  background: var(--primary-bg);
  border-right: 1px solid var(--border-color);
  transition: left 0.28s ease;
  z-index: 1001;
  overflow-y: auto;
  padding-top: 60px;
}
.sidebar.active { left: 0; }

.sidebar-header {
  padding: 1rem;
  background: var(--primary-bg);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.new-chat-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-bottom: 1rem;
  font-weight: 500;
}
.logout-btn {
  width: 100%;
  padding: 0.75rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.logout-btn:hover { background: #dc2626; }

.conversation-list { padding: 0.5rem; }
.conversation-item {
  position: relative;
  padding: 0.75rem;
  margin: 0.25rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: 0.2s;
  padding-right: 2rem;
  font-size: 0.85rem;
}
.conversation-item:hover { background: var(--secondary-bg); }
.active-conversation {
  background-color: var(--secondary-bg);
  border-left: 4px solid var(--accent-blue);
}
.delete-btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.delete-btn:hover { color: #dc2626; }

.app-shell {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  transition: left 0.28s ease;
  min-width: 0;
  will-change: height, top;
}
.app-shell.sidebar-active {
  left: var(--sidebar-w);
}

.chat-container {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem 0 3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-blue) var(--primary-bg);
  scroll-behavior: smooth;
  position: relative;
  clip-path: inset(0 0 0 0);
  overscroll-behavior: contain;
}
.chat-container::-webkit-scrollbar { width: var(--scrollbar-width); }
.chat-container::-webkit-scrollbar-track { background: var(--primary-bg); }
.chat-container::-webkit-scrollbar-thumb { background-color: var(--accent-blue); border-radius: 4px; }

.chat-container:has(.initial-container) {
  overflow-y: hidden;
}

.message-wrapper {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-wrapper:has(.initial-container) {
  gap: 0;
  padding-bottom: 0;
  justify-content: center;
  min-height: 100%;
}

.message-wrapper:has(.initial-container) .initial-container {
  margin: auto;
}

.message {
  padding: 0.35rem 0.25rem;
  max-width: 100%;
  border-radius: 1rem;
  line-height: 1.7;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message.user {
  margin-left: auto;
  background: var(--accent-blue);
  color: white;
  border-radius: 18px 18px 4px 18px;
  padding: 10px 14px;
  max-width: min(85%, 620px);
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  width: fit-content;
}

.message.user .message-content {
  padding: 0;
  background: transparent;
  color: inherit;
  line-height: 1.55;
  word-break: break-word;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: none;
  overflow: visible;
}

.message.user .message-content img {
  max-width: min(100%, 360px);
  border-radius: 10px;
  margin: 0 0 8px 0;
  display: block;
}

.message.user .message-content p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.ai {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-right: auto;
  color: var(--text-primary);
  padding: 0.35rem 0.25rem;
  max-width: 100%;
}

.message.ai .message-content {
  line-height: 1.75;
  font-size: 15px;
}

.message img {
  max-width: min(100%, 380px);
  border-radius: 10px;
  margin: 0.5rem 0;
  border: 1px solid var(--border-color);
  background: var(--primary-bg);
  padding: 3px;
  display: block;
}

.message-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.message-container.user { align-items: flex-end; }
.message-container.ai { align-items: flex-start; overflow: hidden; }

.message-container.ai:has(.typing-indicator) {
  scroll-margin-bottom: 4rem;
}

.initial-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  margin: 0 auto;
  max-width: var(--content-max);
  width: 100%;
}
.initial-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--accent-blue);
  object-fit: cover;
}
.message.ai.initial-message {
  margin: 0;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  max-width: 520px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
}

#imagePreviews {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem;
  max-width: var(--content-max);
  margin: 0 auto 0.5rem;
  width: 100%;
  justify-content: flex-start;
}
#imagePreviews:empty {
  display: none;
  padding: 0;
  margin: 0;
}

.preview-item {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-hi);
  background: var(--secondary-bg);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.preview-item:hover { transform: translateY(-2px); }
.preview-item img.upload-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  padding: 0;
  border-radius: 0;
  margin: 0;
  max-width: none;
}
.preview-item .remove-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 2;
  opacity: 0.9;
  transition: background 0.15s;
}
.preview-item .remove-btn:hover { background: #ef4444; }

.upload-loader {
  width: 26px;
  height: 26px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  align-self: center;
  flex-shrink: 0;
}

footer.composer-footer {
  flex: 0 0 auto;
  padding: 0 1rem 0.9rem;
  padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0));
  background: var(--primary-bg);
  position: relative;
}

.tagline {
  text-align: center;
  padding: 0.35rem 1rem 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  background: linear-gradient(90deg, #64748b, #3b82f6, #8b5cf6, #64748b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
  max-width: var(--content-max);
  margin: 0 auto;
}
@keyframes shine {
  to { background-position: 200% center; }
}

.editing-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-max);
  margin: 0 auto 0.5rem;
  padding: 0.5rem 0.7rem;
  background: var(--secondary-bg);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.editing-banner.active {
  display: flex;
}
.editing-banner-text {
  font-weight: 500;
  color: var(--text-primary);
}
.editing-banner-close {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.editing-banner-close:hover {
  background: var(--primary-bg);
  color: var(--text-primary);
}

#composer {
  max-width: var(--content-max);
  margin: 0 auto;
  background: var(--secondary-bg);
  border: 1px solid var(--border-hi);
  border-radius: 18px;
  padding: 0.5rem 0.55rem 0.4rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#composer:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

#userInput {
  width: 100%;
  resize: none;
  max-height: 200px;
  min-height: 22px;
  padding: 0.4rem 0.5rem;
  background: transparent;
  color: var(--text-primary);
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  overflow-y: hidden;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#userInput::-webkit-scrollbar { display: none; }
#userInput::placeholder { color: var(--text-secondary); }

.composer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.composer-left, .composer-right {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.icon-btn {
  width: 2rem; height: 2rem;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  font-size: 0.85rem;
}
.icon-btn:hover { background: var(--primary-bg); color: var(--text-primary); }

#send, .send-btn {
  width: 2.05rem; height: 2.05rem;
  padding: 0;
  border-radius: 50%;
  background: var(--accent-blue);
  border: none;
  color: white;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}
#send:hover:not(:disabled), .send-btn:hover:not(:disabled) { background: #2563eb; }
#send:active:not(:disabled), .send-btn:active:not(:disabled) { transform: scale(0.95); }
#send:disabled, .send-btn:disabled { opacity: 0.55; cursor: not-allowed; }

#send.saving, .send-btn.saving {
  background: #22c55e;
}
#send.saving:hover, .send-btn.saving:hover {
  background: #16a34a;
}

.disclaimer {
  color: var(--text-secondary);
  font-size: 11px;
  text-align: center;
  padding: 0.5rem 0.5rem 0;
  max-width: var(--content-max);
  margin: 0 auto;
  opacity: 0.7;
}
.disclaimer a { color: var(--accent-blue); text-decoration: none; }
.disclaimer a:hover { text-decoration: underline; }

.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.72);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.modal.open, .modal[style*="flex"] { display: flex; }
.modal-content {
  background: var(--primary-bg);
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 600px;
  border: 1px solid var(--border-color);
}
.modal-content h3 { margin-bottom: 1rem; color: var(--text-primary); }
.close {
  color: var(--text-secondary);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover { color: var(--text-primary); }
.modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}
.modal-buttons button {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.modal-buttons button:first-child {
  background: var(--accent-blue);
  color: white;
  border: none;
}
.modal-buttons button:last-child {
  background: var(--secondary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
#promptInput {
  flex: 1;
  padding: 0.75rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  width: 100%;
}
#generateButton {
  padding: 0.75rem 1.5rem;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
#generatedImage {
  max-width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}
#downloadButton {
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}
.loader {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--accent-blue);
  border-radius: 50%;
  width: 40px; height: 40px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.error-message {
  color: #ef4444;
  margin-top: 1rem;
  display: none;
}

.mic-button {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: none;
  color: white;
  cursor: pointer;
  margin: 1rem 0;
  transition: all 0.3s ease;
}
.mic-button.listening {
  background: #ef4444;
  animation: pulse 1.5s infinite;
}
.mic-button.shaking { animation: shake 0.5s infinite; }
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes shake {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}
.status-indicator {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 1rem 0;
}

.notification-panel {
  position: fixed;
  top: 120px;
  right: -320px;
  width: 300px;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  transform: translateY(-50%);
  transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.notification-panel.active { right: 20px; }
.notification-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.notification-panel-header .close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 20px;
}
.notification-list { max-height: 400px; overflow-y: auto; }
.notification-content p {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 15px;
}
.notification-content button {
  width: 100%;
  padding: 0.5rem;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.notification-item { padding: 0.5rem 0; }

#overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 22, 42, 0.57);
  display: none;
  z-index: 999;
}

pre {
  background: var(--primary-bg) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  margin: 1rem 0 !important;
  position: relative;
  overflow-x: auto;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.typing-indicator::before {
  content: "Thinking";
  background: linear-gradient(
    90deg,
    #475569 0%,
    #94a3b8 20%,
    #f8fafc 40%,
    #3b82f6 50%,
    #f8fafc 60%,
    #94a3b8 80%,
    #475569 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s linear infinite;
}

.typing-indicator .typing-dot {
  display: none;
}

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-blue);
  animation: typingBlink 1s infinite;
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 2px;
}
@keyframes typingBlink {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.message.ai .message-content > .typing-cursor:only-child {
  display: none;
}

.message-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}
.message-action-btn {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.message-action-btn:hover { background: var(--accent-blue); color: white; }
.ai-tools { display: flex; gap: 8px; margin-top: 6px; }
.copy-all-btn {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin: 7px;
}
.copy-all-btn:hover { background: var(--accent-blue); color: white; }
.retry-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
  margin-right: 0.5rem;
  font-size: 16px;
}
.retry-btn:hover { color: var(--accent-blue); }

.code-editor {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
  background: var(--primary-bg);
}
.code-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--secondary-bg);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.code-editor-actions { display: flex; gap: 6px; }
.code-editor-btn {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}
.code-editor-btn:hover { background: var(--accent-blue); color: white; }
.code-editor-body pre {
  border: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 1rem !important;
}

.message-editable {
  background: var(--secondary-bg) !important;
  border: 1px solid var(--accent-blue) !important;
  padding: 12px !important;
  border-radius: 8px !important;
}
.edit-textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 12px;
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  min-height: 100px;
  margin-bottom: 8px;
}
.edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.edit-actions button {
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.edit-save {
  background: var(--accent-blue);
  color: white;
  border: none;
}
.edit-cancel {
  background: var(--secondary-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .header-left {
    position: relative;
    left: 0;
    transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: 60px;
  }
  .logo-container { gap: 6px; font-size: 16px; }
  .header-avatar { width: 24px; height: 24px; }

  .app-shell { left: 0 !important; right: 0 !important; }

  footer.composer-footer {
    padding: 0 0.7rem 0.7rem;
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0));
  }
  #composer { padding: 0.45rem 0.5rem 0.35rem; border-radius: 16px; }
  #userInput { font-size: 0.88rem; }
  #send, .send-btn { width: 1.9rem; height: 1.9rem; }
  .icon-btn { width: 1.85rem; height: 1.85rem; font-size: 0.78rem; }

  .preview-item { width: 56px; height: 56px; }

  .message { max-width: 100%; font-size: 14.5px; }
  .message.user { max-width: 88%; padding: 9px 13px; font-size: 14.5px; }
  .message.ai .message-content { font-size: 14.5px; }

  .initial-avatar { width: 54px; height: 54px; }
  .message.ai.initial-message { font-size: 14px; padding: 0.5rem 0.75rem; }

  .notification-panel { width: 90%; right: -100%; top: 90px; }
  .notification-panel.active { right: 5%; }
}

@media (max-width: 480px) {
  #userInput { font-size: 0.85rem; }
  .tagline { font-size: 0.62rem; letter-spacing: 0.14em; }
  .preview-item { width: 50px; height: 50px; }
  .message { font-size: 14px; }
  .message.ai .message-content { font-size: 14px; }
}

@media (min-width: 769px) {
  .sidebar { left: 0; }
  .sidebar:not(.active) { left: calc(-1 * var(--sidebar-w)); }
  .app-shell { left: 0; }
  .app-shell.sidebar-active { left: var(--sidebar-w); }
  }
