:root {
  /* Light Theme Variables */
  --bg-primary-light: #ffffff;
  --bg-secondary-light: #f7f7f8;
  --text-primary-light: #343541;
  --text-secondary-light: #6e6e80;
  --border-light: #e5e5e6;
  --accent-light: #e25b00;
  --error-light: #ff4a4a;
  --success-light: #28a745;

  /* Dark Theme Variables */
  --bg-primary-dark: #000000;
  --bg-secondary-dark: #121212;
  --text-primary-dark: #cccccc;
  --text-secondary-dark: #999999;
  --border-dark: #333333;
  --accent-dark: #ff6200;
  --error-dark: #ff6b6b;
  --success-dark: #30c85a;

  /* Default to light theme */
  --bg-primary: var(--bg-primary-light);
  --bg-secondary: var(--bg-secondary-light);
  --text-primary: var(--text-primary-light);
  --text-secondary: var(--text-secondary-light);
  --border: var(--border-light);
  --accent: var(--accent-light);
  --error: var(--error-light);
  --success: var(--success-light);
}

[data-theme="dark"] {
  --bg-primary: var(--bg-primary-dark);
  --bg-secondary: var(--bg-secondary-dark);
  --text-primary: var(--text-primary-dark);
  --text-secondary: var(--text-secondary-dark);
  --border: var(--border-dark);
  --accent: var(--accent-dark);
  --error: var(--error-dark);
  --success: var(--success-dark);
  --accent-rgb: var(--accent-rgb-dark);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s, color 0.3s;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6,
.header-title,
.modal-title,
button,
.new-chat-btn span,
.footer-links {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
}

.message-content {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  white-space: pre-line;
}

.message-content p {
  margin-bottom: 0.75em;
}

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

/* header {
  padding: 1rem;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
} */

.header-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.sidebar {
  width: 220px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.sidebar.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
  border-right: none;
}

.new-chat-btn {
  margin: 1rem;
  padding: 0.6rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.new-chat-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.5s ease;
}

.new-chat-btn:hover::before {
  left: 100%;
}

.new-chat-btn span {
  white-space: nowrap;
  font-size: 0.9rem;
}

.new-chat-btn:hover {
  background-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.new-chat-btn svg {
  width: 14px;
  height: 14px;
}

.sidebar-toggle {
  position: absolute;
  right: -16px;
  top: 14px;
  width: 32px;
  height: 32px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

.conversation-item {
  padding: 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  position: relative;
}

.conversation-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.conversation-item-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-delete {
  opacity: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--error);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  margin-left: 4px;
  font-size: 14px;
}

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

.conversation-item:hover .conversation-delete {
  opacity: 1;
}

.conversation-item.active {
  background-color: var(--accent);
  color: white;
}

.conversation-item.active .conversation-icon {
  color: white;
}

.footer-links {
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background-color: var(--bg-secondary);
  align-items: center;
  text-align: center;
}

.app-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.app-info .header-title {
  font-size: 1rem;
}

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

.footer-links a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.social-icon:hover {
  transform: scale(1.1);
  color: var(--accent);
  background-color: var(--bg-primary);
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  position: relative;
}

.messages-container {
  height: calc(100% - 120px);
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.message {
  display: flex;
  margin-bottom: 1.5rem;
  animation: fade-in 0.3s ease-in-out;
  position: relative;
  padding: 0.5rem;
  border-radius: 8px;
}

.message:hover {
  background-color: var(--bg-secondary);
}

.message-actions {
  position: relative;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.message:hover .message-actions {
  opacity: 1;
}

.message-menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-menu-btn:hover {
  background-color: var(--bg-primary);
}

.message-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  min-width: 200px;
  padding: 0;
  margin: 0;
}

.message-menu.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.message-menu-item {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: background-color 0.2s;
}

.message-menu-item:hover {
  background-color: var(--bg-secondary);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.user-avatar {
  background-color: var(--accent);
  color: white;
}

.ai-avatar {
  background-color: var(--success);
  color: white;
}

.message-content {
  flex: 1;
  line-height: 1.5;
  white-space: pre-line;
}

.input-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  padding: 1rem;
  border-top: 1px solid var(--border);
  z-index: 10;
  height: auto;
  max-height: 120px;
}

.input-wrapper {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.3rem 0.3rem;;
  background-color: var(--bg-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.message-input {
  flex: 1;
  border: none;
  resize: none;
  background-color: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  min-height: 24px;
  max-height: 200px;
  outline: none;
  padding: 0.25rem;
  line-height: 1.5;
}

.send-btn {
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  margin-left: 0.5rem;
  position: relative;
  overflow: hidden;
}

.send-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.5s ease;
}

.send-btn:hover:not(:disabled)::before {
  left: 100%;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

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

.disclaimer-text {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Confirmation Modal */
.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

.confirm-content {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.confirm-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.confirm-message {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.confirm-cancel {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.confirm-ok {
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Login Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.limit-reached-modal.active {
  display: flex;
}

.limit-reached-content {
  background-color: var(--bg-primary);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.limit-reached-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--error);
}

.limit-reached-message {
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.get-tokens-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 1rem;
}

.limit-close-btn {
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

.modal-content {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.modal-logo {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.modal-title {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}

.modal-description {
  margin-bottom: 2rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.connect-btn {
  padding: 0.75rem 1.5rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.connect-btn:hover {
  background-color: var(--accent-dark);
}

.guest-btn {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.guest-btn:hover {
  background-color: var(--bg-secondary);
}

.learn-more-btn {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  color: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: underline;
}

.learn-more-btn:hover {
  color: var(--accent-dark);
}

.learn-more-content {
  text-align: left;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 10px;
}

.learn-more-content h3 {
  margin: 1.5rem 0 0.5rem;
  color: var(--accent);
}

.learn-more-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.learn-more-content ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.learn-more-content li {
  margin-bottom: 0.5rem;
}

.learn-more-content a {
  color: var(--accent);
  text-decoration: none;
}

.learn-more-content a:hover {
  text-decoration: underline;
}

.token-info {
  display: flex;
  align-items: center;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.5rem;
}

.token-logo {
  font-size: 2rem;
  margin-right: 1rem;
}

.token-details {
  flex: 1;
}

.token-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.token-address {
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
}

/* Privacy Policy Modal */
.policy-modal .modal-content {
  text-align: left;
  max-width: 700px;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.policy-content {
  overflow-y: auto;
  flex: 1;
  padding-right: 1rem;
}

.policy-content h2 {
  margin: 1.5rem 0 1rem;
}

.policy-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  margin-bottom: 1rem;
}

/* Mobile Styles */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar {
    position: absolute;
    top: 60px;
    bottom: 0;
    left: 0;
    z-index: 100;
    transform: translateX(-100%);
    width: 80%;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: block;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .input-container {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  
  /* Quantum Mobile CSS Fixes */
  
  /* Réduire la hauteur du conteneur de messages pour libérer de l'espace */
  .messages-container {
    height: calc(100% - 210px) !important;
    padding-bottom: 10px !important;
    max-height: calc(100vh - 210px) !important;
  }

  /* Ajuster le conteneur d'entrée pour qu'il soit toujours visible */
  .input-container {
    max-height: 180px !important;
    padding: 8px 12px 12px !important;
    position: fixed !important;
    bottom: 0 !important;
    background-color: var(--bg-primary) !important;
    border-top: 1px solid var(--border) !important;
  }

  /* Ajuster le conteneur de suggestions pour éviter le défilement */
  .suggestions-container {
    padding: 0px;
    margin-bottom: 4px;
    white-space: normal;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
    align-items: center;
    border: none;
  }
  
  .suggestion-chip {
    padding: 5px 10px;
    margin-right: 0;
    margin-bottom: 2px;
    font-size: 0.75rem;
    border-radius: 15px;
    display: inline-block;
    width: calc(33.333% - 6px);
    max-width: calc(33.333% - 6px);
    text-align: center;
    box-sizing: border-box;
    flex: 0 0 auto;
  }
  
  /* S'assurer que le disclaimer est visible */
  .disclaimer-text {
    font-size: 0.7rem !important;
    margin-top: 4px !important;
    padding-bottom: 2px !important;
    line-height: 1.2 !important;
  }

  /* Ajuster l'input wrapper pour qu'il soit toujours visible */
  .input-wrapper {
    margin-top: 4px !important;
    padding: 8px 12px !important;
  }

  /* Pour s'assurer que le texte de l'input est visible */
  .message-input {
    min-height: 20px !important;
    padding: 4px !important;
    font-size: 0.9rem !important;
  }

  /* Ajuster le bouton d'envoi */
  .send-btn {
    width: 32px !important;
    height: 32px !important;
  }

  /* Pour les très petits écrans */
  @media (max-width: 375px) {
    .messages-container {
      height: calc(100% - 200px) !important;
    }
    
    .suggestions-container {
      max-height: 70px !important;
    }
    
    .suggestion-chip {
      font-size: 0.65rem !important;
      padding: 3px 6px !important;
    }
    
    .disclaimer-text {
      font-size: 0.65rem !important;
    }
  }
  
  /* Pour éviter les problèmes de débordement sur certains appareils */
  body, html {
    height: 100% !important;
    overflow: hidden !important;
  }
  
  #appContainer {
    height: 100% !important;
    overflow: hidden !important;
  }
  
  .chat-container {
    height: 100% !important;
    overflow: hidden !important;
  }
}

.token-logo img {
  max-width: 50px;
  max-height: 50px;
  width: auto;
  height: auto;
}

.wallet-adapter-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-adapter-modal-wrapper {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  padding: 24px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.wallet-adapter-modal-title {
  margin: 0 0 16px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.wallet-adapter-modal-button-close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 20px;
}

.wallet-adapter-modal-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-adapter-modal-list-item {
  box-sizing: border-box;
}

.wallet-adapter-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 16px;
  border-radius: 6px;
  border: none;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
}

.wallet-adapter-button:hover {
  background-color: var(--accent);
  color: white;
}

.wallet-adapter-button-icon {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
}
.wallet-option {
  transition: all 0.2s ease;
}

.wallet-option:hover {
  background-color: var(--bg-hover) !important;
  transform: translateY(-2px) !important;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Style pour les notifications améliorées */
.alaric-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  color: white;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 280px;
  max-width: 400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: fade-in 0.3s ease-out;
  margin-bottom: 10px;
}

.alaric-notification.fade-out {
  animation: fade-out 0.5s ease-out forwards;
}

.alaric-notification .icon {
  margin-right: 12px;
  font-size: 18px;
}

.alaric-notification .message {
  flex-grow: 1;
}

.alaric-notification .close {
  margin-left: 12px;
  cursor: pointer;
  font-size: 18px;
}

/* Types de notifications */
.alaric-notification[data-type="success"] {
  background-color: var(--success, #4caf50);
}

.alaric-notification[data-type="error"] {
  background-color: var(--error, #f44336);
}

.alaric-notification[data-type="warning"] {
  background-color: var(--warning, #ff9800);
}

.alaric-notification[data-type="info"] {
  background-color: var(--accent, #2196f3);
}

/* Style pour l'animation des points de suspension ("thinking...") */
.typing-dots {
  display: inline-block;
  width: 20px;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Animation pour le badge insuffisance de tokens */
.token-warning {
  animation: pulse 2s infinite;
  background-color: var(--warning);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
  display: inline-block;
}

/* Styles améliorés pour le modal wallet */
.wallet-modal-content {
  max-width: 420px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  animation: wallet-modal-appear 0.3s ease-out;
}

@keyframes wallet-modal-appear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wallet-list {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding: 4px;
}

.wallet-option {
  display: flex !important;
  align-items: center !important;
  padding: 16px !important;
  border-radius: 12px !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-secondary) !important;
  cursor: pointer !important;
  width: 100% !important;
  justify-content: space-between !important;
  transition: all 0.2s ease-out !important;
}

.wallet-option:hover {
  background-color: var(--bg-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--accent) !important;
}

.wallet-option-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wallet-option img {
  width: 42px !important;
  height: 42px !important;
  border-radius: 8px !important;
  object-fit: contain;
  background-color: transparent;
  padding: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.wallet-option-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
}

.wallet-option-status {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.wallet-option-status.installed {
  background-color: var(--success);
  color: white;
}

.wallet-option-status.not-installed {
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* Pour les effets de survol */
.wallet-list::-webkit-scrollbar {
  width: 6px;
}

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

.wallet-list::-webkit-scrollbar-track {
  background-color: var(--bg-secondary);
  border-radius: 3px;
}

/* Définissez la variable --bg-hover si elle n'existe pas déjà */
:root {
  --bg-hover: rgba(230, 230, 230, 0.3);
}

[data-theme="dark"] {
  --bg-hover: rgba(70, 70, 70, 0.3);
}

.connected-devices-list {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.device-item:last-child {
  border-bottom: none;
}

.revoke-device-btn:hover {
  background-color: #d32f2f;
}

.danger-btn {
  background-color: var(--error);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.danger-btn:hover {
  background-color: #d32f2f;
}

.loading-devices, .no-devices, .error-message {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
}

.qr-scanner-container {
  width: 100%;
  height: 60vh;
  margin: 20px 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.qr-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
@media (max-width: 768px) {
  .qr-scanner-container {
    height: 50vh;
  }
}

/* Base button styling */
.add-credits-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  width: 100%;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-top: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-credits-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.add-credits-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(var(--accent-rgb), 0.4);
}

.add-credits-btn:hover::before {
  transform: translateX(100%);
}

.add-credits-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(var(--accent-rgb), 0.3);
}

.add-credits-btn svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2.5;
  transition: transform 0.3s ease;
}

.add-credits-btn:hover svg {
  transform: rotate(90deg);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .add-credits-btn {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 10px;
  }
}
#logoutModal {
  pointer-events: auto !important;
  z-index: 10000 !important;
}

#logoutModal .modal-content,
#logoutModal button {
  pointer-events: auto !important;
}

/* Suggestions Component Styles */
.suggestions-container {
  padding: 0px;
  margin-bottom: 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  border-radius: 12px;
  background-color: var(--bg-secondary);
  border: none;
}

.suggestions-container::-webkit-scrollbar {
  height: 4px;
}

.suggestions-container::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 4px;
}

.suggestions-container::-webkit-scrollbar-track {
  background-color: transparent;
}

.suggestion-chip {
  display: inline-block;
  padding: 8px 16px;
  margin-right: 10px;
  background-color: var(--bg-primary);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-chip:hover {
  background-color: var(--accent);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.suggestion-chip:active {
  transform: translateY(0);
}

/* Adjust input container for the new component */
.input-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
  z-index: 10;
  height: auto;
  max-height: 160px;
}

/* Add fade effects to suggest horizontal scrolling */
.suggestions-container::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-secondary));
  pointer-events: none;
}

.suggestions-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 10px;
  background: linear-gradient(to left, transparent, var(--bg-secondary));
  pointer-events: none;
  z-index: 1;
}

/* Mobile adjustments for suggestions and input container */
@media (max-width: 768px) {
  .suggestions-container {
    padding: 0px;
    margin-bottom: 4px;
    white-space: normal;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
    align-items: center;
    border: none;
  }
  
  .suggestion-chip {
    padding: 5px 10px;
    margin-right: 0;
    margin-bottom: 2px;
    font-size: 0.75rem;
    border-radius: 15px;
    display: inline-block;
    width: calc(33.333% - 6px);
    max-width: calc(33.333% - 6px);
    text-align: center;
    box-sizing: border-box;
    flex: 0 0 auto;
  }
  
  /* Pour les très petits écrans, réduire la taille de la police */
  @media (max-width: 375px) {
    .suggestion-chip {
      font-size: 0.7rem;
      padding: 4px 8px;
    }
  }
  
  .input-container {
    max-height: 180px;
  }
  
  .disclaimer-text {
    font-size: 0.7rem;
    margin-top: 2px;
    padding-bottom: 4px;
  }
  
  .messages-container {
    height: calc(100% - 180px);
    padding-bottom: 15px;
  }
  
  .suggestions-container::before,
  .suggestions-container::after {
    display: none;
  }
}

/* Styles pour le lien "More details" dans les messages */
.message-content a.learn-more-link {
  color: #000000; /* Noir par défaut (mode clair) */
  text-decoration: underline;
  cursor: pointer;
}

/* Styles spécifiques pour le mode sombre */
[data-theme="dark"] .message-content a.learn-more-link {
  color: #FFFFFF; /* Blanc en mode sombre */
}

/* Optionnel: Changer la couleur au survol */
.message-content a.learn-more-link:hover {
  opacity: 0.8;
}

/* Feature Suggestions */
.feature-suggestions {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-bottom: 8px;
}

.feature-suggestion {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
  position: relative;
  font-size: 0.9rem;
}

.feature-suggestion:last-child {
  border-bottom: none;
}

.feature-suggestion:hover {
  background-color: var(--bg-hover);
}

.feature-suggestion.selected {
  background-color: var(--bg-hover);
}

/* .feature-suggestion::before {
  content: '⚡';
  margin-right: 8px;
  font-size: 0.8rem;
  color: var(--accent);
} */

/* Wallet scan result styling */
.wallet-scan-result {
  background-color: var(--bg-secondary);
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  border-left: 3px solid var(--accent);
}

.wallet-scan-result .wallet-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: bold;
}

.wallet-scan-result .wallet-address {
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.wallet-scan-result .wallet-data {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.wallet-scan-result .data-item {
  padding: 8px;
  background-color: var(--bg-primary);
  border-radius: 4px;
}

.wallet-scan-result .data-item .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.wallet-scan-result .data-item .value {
  font-size: 1rem;
  font-weight: bold;
  margin-top: 5px;
}

/* Multiple wallet scan results */
.multiple-wallets-result {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Animation for feature suggestions */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-suggestions {
  animation: slideIn 0.2s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .feature-suggestions {
    max-height: 150px;
  }
  
  .wallet-scan-result .wallet-data {
    grid-template-columns: 1fr;
  }
}

/* Typing indicator */
.typing-indicator {
  margin-bottom: 10px;
}

.typing-indicator .message-content {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  max-width: fit-content;
}

.typing-indicator .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  margin-right: 4px;
  animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

@keyframes typingAnimation {
  0% {
    transform: translateY(0px);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
  100% {
    transform: translateY(0px);
    opacity: 0.3;
  }
}

/* Error and success message styles */
.message.error .message-content {
  color: var(--error);
}

.message.success .message-content {
  color: var(--success);
}

/* Custom message content styles */
.message-content .wallet-scan-result {
  margin: 0;
}

/* Feature suggestion improvements */
.feature-suggestions {
  border: 1px solid var(--accent); 
  box-shadow: 0 -2px 15px rgba(var(--accent-rgb), 0.15);
}

.wallet-scan-result.error {
  border-left: 3px solid var(--error);
}

.wallet-scan-result .error-message {
  color: var(--error);
  padding: 8px;
  font-size: 0.9rem;
}

/* Styles pour le menu déroulant des réseaux */
.network-dropdown {
  position: absolute;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  min-width: 180px;
}

.network-option {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
  font-size: 0.9rem;
}

.network-option:last-child {
  border-bottom: none;
}

.network-option:hover {
  background-color: var(--bg-hover);
}

/* Styles pour le template de saisie assistée */
.message-input[data-feature-command="true"] {
  font-family: "Courier New", monospace;
  letter-spacing: 0.5px;
}

/* Styles responsifs pour le menu déroulant */
@media (max-width: 768px) {
  .network-dropdown {
    min-width: 150px;
    max-height: 150px;
  }
  
  .network-option {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
} 

/* Add styles for message avatars */
.message .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%; /* Makes the avatar round */
  margin-right: 10px;
  flex-shrink: 0; /* Prevent shrinking */
}

.message .user-avatar {
  background-color: #555; /* Example background */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
}

.message .ai-avatar {
  object-fit: cover; /* Scale the image nicely */
  background-color: #eee; /* Optional: background for transparency */
}

/* Mobile styles for wallet scan tokens */
@media (max-width: 768px) {
  /* The empty ruleset below was removed */

  /* Only make price and value spans stack vertically on mobile */
  .wallet-scan-compact .token .token-price,
  .wallet-scan-compact .token .token-value,
  .multiple-wallets-result .token .token-price,
  .multiple-wallets-result .token .token-value {
    display: block; /* Stack price and value spans vertically */
    font-size: 0.85rem; /* Slightly smaller font on mobile */
    line-height: 1.4;
    margin-top: 3px; /* Add spacing above price/value lines */
  }
  
  /* Keep token name inline (default) */
  .wallet-scan-compact .token .token-name,
  .multiple-wallets-result .token .token-name {
     font-weight: bold; /* Make ticker/qty bold */
     font-size: 0.9rem; /* Slightly larger font for ticker/qty */
  }

  /* Remove bottom margin from the last span (token-value) */
  .wallet-scan-compact .token .token-name,
  .multiple-wallets-result .token .token-name {
    margin-bottom: 0;
  }
  
  /* Ensure wallet address wraps properly */
  .wallet-scan-compact .wallet-address,
  .multiple-wallets-result .wallet-address {
    word-break: break-all;
  }
  
  /* Remove left padding inside wallet scans on mobile */
  .wallet-scan-compact .wallet-content,
  .multiple-wallets-result .wallets-container,
  .multiple-wallets-result .wallet-content {
      padding-left: 0;
      padding-right: 0; /* Also remove right padding for consistency */
  }
  
  .wallet-scan-compact .tokens-list,
  .multiple-wallets-result .tokens-list {
      padding-left: 0 !important; /* Override inline style */
  }
} 