GigaProjects

← Back to nostr-relay-speedtest

App.css

:root {
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --primary: #bb86fc;
  --secondary: #03dac6;
  --accent: #cf6679;
  --background: #0f0f0f;
  --text: #e0e0e0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(187, 134, 252, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(3, 218, 198, 0.05) 0%, transparent 40%);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.header {
  text-align: center;
  margin-bottom: 50px;
}

.header h1 {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.header p {
  color: #888;
  font-size: 1.1rem;
}

.controls {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9965f4);
  color: #000;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(187, 134, 252, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(187, 134, 252, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, #666, #555);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.leaderboard {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.relay-item {
  display: grid;
  grid-template-columns: 50px 1fr 100px 120px;
  align-items: center;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.relay-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--glass-border);
}

.rank {
  font-weight: 800;
  font-size: 1.2rem;
  color: #555;
}

.relay-item.top-3 .rank {
  color: var(--primary);
}

.url {
  font-weight: 500;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latency {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  text-align: right;
}

.latency.fast {
  color: #4caf50;
}

.latency.medium {
  color: #ffeb3b;
}

.latency.slow {
  color: #f44336;
}

.reported {
  font-size: 0.8rem;
  color: #666;
  text-align: right;
}

.status-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
}

.status-pending {
  background: #555;
}

.status-measuring {
  background: var(--secondary);
  box-shadow: 0 0 10px var(--secondary);
  animation: pulse 1.5s infinite;
}

.status-done {
  background: #4caf50;
}

.status-error {
  background: var(--accent);
}

@keyframes pulse {
  0% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.4;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

.footer {
  text-align: center;
  margin-top: 60px;
  color: #555;
  font-size: 0.9rem;
}