:root {
  --safe-area-top: 0px;
  --safe-area-bottom: 0px;
}

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

body {
  font-family: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  font-weight: 200;
  background-color: #f8fafc;
  color: #1f2937;
  line-height: 1.6;
  height: 100vh;
  overflow: hidden;
  padding-top: var(--safe-area-top);
  padding-bottom: var(--safe-area-bottom);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input,
textarea,
.message-content {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  background: #1f2937;
  color: white;
  padding: 0.7rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 100;
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.header-actions {
  display: flex;
  gap: 0.5rem;
}

.app-title {
  font-size: 1.5rem;
  font-weight: 500;
}

.icon-btn {
  background: none;
  border: none;
  color: white;
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
}
.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.icon-btn i {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

button,
.chat-item,
.project-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background: white;
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 200;
  padding-top: 56px;
}
.sidebar.open {
  left: 0;
}
.sidebar-content {
  padding: 1rem;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.sidebar-section {
  margin-bottom: 2rem;
}
.sidebar-section h3 {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #374151;
}

.chat-list,
.project-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-item,
.project-item {
  padding: 0.75rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.chat-item:hover,
.project-item:hover {
  background: #e5e7eb;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.project-name {
  font-weight: 400;
  color: #1f2937;
}

.project-count {
  background: #3b82f6;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  min-width: 1.5rem;
  text-align: center;
}

.project-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.chat-container {
  flex: 1;
  overflow: hidden;
}

.chat-messages {
  height: 100%;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.welcome-message {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}
.welcome-message h2 {
  margin-bottom: 0.5rem;
  color: #1f2937;
  font-weight: 400;
}

.message {
  max-width: 80%;
  padding: 1rem;
  border-radius: 1rem;
  word-wrap: break-word;
}
.message.user {
  align-self: flex-end;
  background: #3b82f6;
  color: white;
  border-bottom-right-radius: 0.25rem;
}
.message.assistant {
  align-self: flex-start;
  background: white;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 0.25rem;
}
.message-content {
  white-space: pre-wrap;
}
.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.5rem;
}

.chat-input-container {
  padding: 1rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  padding-bottom: calc(1rem + var(--safe-area-bottom));
}

.chat-input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

#messageInput {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 1rem;
  resize: none;
  font-family: inherit;
  font-size: 1rem;
  max-height: 120px;
  min-height: 44px;
}
#messageInput:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.send-btn {
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}
.send-btn:hover:not(:disabled) {
  background: #2563eb;
}
.send-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}
.send-btn i {
  font-size: 16px;
}

.input-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.action-btn {
  background: none;
  border: 1px solid #d1d5db;
  color: #6b7280;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 300;
  transition: all 0.2s;
}
.action-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.btn-primary {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 350;
  transition: background-color 0.2s;
}
.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 350;
  transition: all 0.2s;
  width: 100%;
}
.btn-secondary:hover {
  background: #f3f4f6;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 350;
  transition: background-color 0.2s;
}
.btn-danger:hover {
  background: #b91c1c;
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.storage-stats {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.storage-stats h4 {
  margin: 0 0 0.5rem 0;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 350;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.open {
  display: flex;
}
.modal-content {
  background: white;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 400;
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 350;
  color: #374151;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-family: inherit;
}
.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.loading-indicator {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  align-items: center;
  gap: 0.75rem;
  z-index: 500;
}
.loading-indicator.show {
  display: flex;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@media (min-width: 768px) {
  .sidebar {
    position: static;
    left: 0;
    width: 300px;
    padding-top: 0;
  }
  #app {
    flex-direction: row;
  }
  .header {
    display: none;
  }
  .main-content {
    flex: 1;
    border-left: 1px solid #e5e7eb;
  }
  .message {
    max-width: 70%;
  }
}
@media (min-width: 1024px) {
  .message {
    max-width: 60%;
  }
}

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