.connection-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.connection-modal.show {
  display: flex;
}

.connection-modal-content {
  position: relative;
  width: 680px;
  max-width: 90vw;
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: modalFadeIn 0.3s ease-out;
}

.connection-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    90deg,
    rgba(97, 44, 198, 0.15) 0%,
    rgba(23, 130, 255, 0.15) 100%
  );
}

.connection-modal-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  background: linear-gradient(90deg, #612cc6 0%, #1782ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.connection-modal-close {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.connection-modal-close:hover {
  background: rgba(97, 44, 198, 0.15);
  color: #ffffff;
}

.connection-modal-body {
  padding: 36px;
}

.connection-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
}

.connection-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(97, 44, 198, 0.1);
  border-left-color: #612cc6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 24px;
}

.connection-status {
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 16px;
}

.connection-error {
  color: #ff4d4d;
  font-size: 18px;
}

.connection-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.connection-tab {
  flex: 1;
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 18px;
  color: #ffffff;
}

.connection-tab.active {
  background: rgba(97, 44, 198, 0.15);
  border-color: #612cc6;
}

.connection-input {
  width: 100%;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 24px;
  transition: all 0.3s ease;
}

.connection-input:focus {
  outline: none;
  border-color: #612cc6;
  background: rgba(97, 44, 198, 0.05);
}

.connection-button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #612cc6 0%, #1782ff 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.connection-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(97, 44, 198, 0.2);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
