:root {
  --bg-color: #0e1621;
  --sidebar-bg: #17212b;
  --chat-bg: #0e1621;
  --text-primary: #f5f5f5;
  --text-secondary: #7d8b99;
  --accent-color: #2ca5e0;
  --accent-hover: #35b3ee;
  --success-color: #4dcd5e;
  --danger-color: #e53935;
  --bubble-out: #2b5278;
  --bubble-in: #182533;
  --bubble-restored: #4a2a2a;
  --bubble-restored-border: #6d3a3a;
  --border-color: #2b2b2b;
  --hover-bg: #202b36;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition-speed: 0.2s;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(125, 139, 153, 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 139, 153, 0.5);
}

/* Base Buttons */
.btn {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-speed) ease;
  text-align: center;
}
.btn:hover {
  background: var(--accent-hover);
}
.btn.danger {
  background: var(--danger-color);
}
.btn.danger:hover {
  background: #f44336;
}

/* Inputs */
.input {
  width: 100%;
  padding: 12px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition-speed) ease;
}
.input:focus {
  border-color: var(--accent-color);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: rgba(23, 33, 43, 0.95);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(20px);
  opacity: 0;
  animation: toast-in 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.success { border-left: 4px solid var(--success-color); }
.toast.error { border-left: 4px solid var(--danger-color); }

@keyframes toast-in {
  to { transform: translateY(0); opacity: 1; }
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--sidebar-bg);
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal {
  transform: scale(1);
}
.modal-title {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 600;
}
.modal-footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, var(--hover-bg) 25%, #2a3845 50%, var(--hover-bg) 75%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
