body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #2D3748;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
#content {
  width: 100%;
  max-width: 700px;
  padding: 0 1rem;
}
.swap-container {
  max-width: 600px;
  margin: 1rem auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.swap-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.swap-row select {
  flex: 1;
}
.swap-container label,
.swap-container input,
.swap-container select,
.swap-container button {
  width: 100%;
  margin-bottom: 0.75rem; /* Reducido de 1rem a 0.75rem */
}
.donate {
  display: none !important;
}
.swap-container input,
.swap-container select {
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FF 100%);
  color: #2D3748;
  border: 2px solid rgba(139, 127, 255, 0.3);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(139, 127, 255, 0.1);
}

.swap-container input:focus,
.swap-container select:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2),
              0 4px 16px rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
}
.swap-container button {
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.swap-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.swap-container button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
.swap-container label {
  color: #1F2937;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  display: block;
}

.swap-container code {
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  padding: 8px 12px;
  display: inline-block;
  word-break: break-all;
  border-radius: 8px;
  color: #1F2937;
  font-weight: 500;
  border: 1px solid rgba(139, 127, 255, 0.2);
}
#firoNote {
  font-size: 0.85rem;
  color: #e89d32;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  display: none;
}
.tor-url code {
  word-break: break-word;
}
/* Ocultar flechas del input number */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loader {
  border: 3px solid #ccc;
  border-top: 3px solid #999;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: inline-block;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

/* Animación de pulse para status activo */
@keyframes statusPulse {
  0%, 100% {
    box-shadow: 0 0 12px rgba(139, 127, 255, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 25px rgba(139, 127, 255, 1);
    transform: scale(1.08);
  }
}

/* Animación de spinner dentro del círculo */
@keyframes spinnerRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Barra de estado del swap */
.swap-status-bar {
  margin: 1.5rem 0 1rem 0;
  padding: 0;
}

.status-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.status-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.status-step-label {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.5rem;
  font-weight: 500;
}

.status-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F5F7FA;
  border: 3px solid #E2E8F0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  color: #A0AEC0;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
}

.status-step.active .status-step-circle {
  background: #8B7FFF;
  border-color: #8B7FFF;
  color: #FFFFFF;
  animation: statusPulse 1.5s ease-in-out infinite;
  font-weight: 900;
}

.status-step.active .status-step-label {
  color: #8B7FFF;
  font-weight: 600;
}

.status-step.completed .status-step-circle {
  background: #4caf50 !important;
  border-color: #4caf50 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.7) !important;
  animation: none !important;
  font-weight: 900;
}

.status-step.completed .status-step-label {
  color: #4caf50 !important;
  font-weight: 600;
}

.status-progress-line {
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #E2E8F0;
  z-index: 1;
  border-radius: 3px;
}

.status-progress-fill {
  height: 100%;
  background: #8B7FFF;
  transition: width 0.5s ease;
  width: 0%;
  box-shadow: 0 0 8px rgba(139, 127, 255, 0.5);
}

.swap-exchange-id {
  font-size: 0.75rem;
  color: #718096;
  text-align: center;
  margin-top: 1rem;
  padding: 0;
}

.swap-exchange-id strong {
  color: #8B7FFF;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.swap-status-warning {
  font-size: 0.65rem;
  color: #888;
  text-align: center;
  margin-top: 0.5rem;
  padding: 0;
  font-style: italic;
}

.swap-error-message {
  background: rgba(255, 87, 51, 0.15);
  border: 1px solid rgba(255, 87, 51, 0.4);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  color: #ff5733;
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
}

/* Swap button styles */
#swapCoinsBtn {
  width: 36px !important;
  margin-bottom: 0 !important;
}

/* Currency Selector Modal */
.currency-selector-btn {
  padding: 14px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FF 100%);
  color: #1F2937;
  border: 2px solid rgba(124, 58, 237, 0.3);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

.currency-selector-btn:hover {
  border-color: #7C3AED;
  background: linear-gradient(135deg, #FFFFFF 0%, #F3F0FF 100%);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.25);
  transform: translateY(-2px);
}

.currency-selector-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.currency-selector-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease-out;
}

.currency-selector-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.currency-selector-content {
  background: linear-gradient(145deg, #FFFFFF 0%, #FAF5FF 100%);
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 680px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(124, 58, 237, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(124, 58, 237, 0.3);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.currency-selector-header {
  padding: 1.75rem 2rem;
  border-bottom: 2px solid rgba(139, 127, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(139, 127, 255, 0.03) 0%, transparent 100%);
}

.currency-selector-header h3 {
  margin: 0;
  color: #1A202C;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.currency-selector-close {
  background: transparent;
  border: none;
  color: #718096;
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.currency-selector-close:hover {
  background: #F5F7FA;
  color: #2D3748;
}

.currency-selector-search {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(139, 127, 255, 0.1);
}

.currency-selector-search input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 2px solid rgba(139, 127, 255, 0.2);
  border-radius: 10px;
  font-size: 1rem;
  background: linear-gradient(135deg, #FAFBFF 0%, #F5F7FF 100%);
  color: #2D3748;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(139, 127, 255, 0.05);
}

.currency-selector-search input::placeholder {
  color: #A0AEC0;
}

.currency-selector-search input:focus {
  outline: none;
  border-color: #7C3AED;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2),
              inset 0 2px 4px rgba(124, 58, 237, 0.1),
              0 4px 12px rgba(124, 58, 237, 0.2);
  transform: translateY(-2px);
}

.currency-selector-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;

  /* Firefox scrollbar styling */
  scrollbar-width: auto;
  scrollbar-color: #8B7FFF #E5E7EB;
}

/* Custom scrollbar for currency list - más visible y funcional */
.currency-selector-list::-webkit-scrollbar {
  width: 12px;
}

.currency-selector-list::-webkit-scrollbar-track {
  background: #E5E7EB;
  border-radius: 6px;
  margin: 4px 0;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
}

.currency-selector-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #8B7FFF 0%, #6B5FE8 100%);
  border-radius: 6px;
  border: 2px solid #E5E7EB;
  min-height: 40px;
  box-shadow: 0 2px 6px rgba(139, 127, 255, 0.3);
}

.currency-selector-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7A6EEE 0%, #5A4ED7 100%);
  border-color: #D1D5DB;
  box-shadow: 0 3px 8px rgba(139, 127, 255, 0.4);
}

.currency-selector-list::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #6B5FE8 0%, #5A4ED7 100%);
}

.currency-category-separator {
  padding: 0.75rem 1.25rem 0.5rem;
  margin: 0.5rem 0.5rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6B5FE8;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(139, 127, 255, 0.15);
  background: linear-gradient(90deg, rgba(139, 127, 255, 0.05) 0%, transparent 100%);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.currency-selector-item {
  padding: 0.75rem 1.25rem;
  margin: 0.2rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.currency-selector-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 127, 255, 0.1), transparent);
  transition: left 0.5s;
}

.currency-selector-item:hover::before {
  left: 100%;
}

.currency-selector-item:hover {
  background: linear-gradient(135deg, #F3F0FF 0%, #E9E3FF 100%);
  border-color: rgba(124, 58, 237, 0.5);
  transform: translateX(6px);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

.currency-selector-item.selected {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 2px solid #7C3AED;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.currency-symbol {
  font-weight: 700;
  color: #1A202C;
  font-size: 1rem;
  min-width: 60px;
  letter-spacing: 0.3px;
}

.currency-name {
  color: #4A5568;
  font-size: 0.95rem;
  flex: 1;
  font-weight: 500;
  text-align: right;
}

.currency-network {
  font-size: 0.75rem;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.currency-selector-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #A0AEC0;
}

/* Grupos expandibles de monedas */
.currency-group {
  margin: 0.25rem 0;
}

.currency-group-header {
  padding: 0.75rem 1.25rem;
  margin: 0.2rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: 1px solid transparent;
}

.currency-group-header:hover {
  background: linear-gradient(135deg, #F3F0FF 0%, #E9E3FF 100%);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.currency-expand-icon {
  font-size: 0.7rem;
  color: #7C3AED;
  min-width: 12px;
  transition: transform 0.2s;
}

.currency-group-items {
  padding-left: 1rem;
  border-left: 2px solid rgba(124, 58, 237, 0.15);
  margin-left: 1.75rem;
}

.currency-child-item {
  padding-left: 0.75rem !important;
}

@media (max-width: 600px) {
  .swap-row {
    flex-direction: column;
    gap: 8px;
  }

  #swapCoinsBtn {
    align-self: center;
    margin: 4px 0 !important;
  }

  .currency-selector-content {
    max-height: 80vh;
  }
}
