: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;
}

/* 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: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.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 {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
}

.message-menu.active {
  display: block;
  animation: fade-in 0.2s ease-in-out;
}

.message-menu-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.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;
}

.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.75rem 1rem;
  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;
  }

  .messages-container {
    height: calc(100% - 140px);
  }
  
  .input-container {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

.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;
}