/* EdgePulse Design System - Modern Glassmorphism & Edge Aesthetics */
:root {
  --bg-dark: #090d16;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(246, 130, 31, 0.3);
  
  --color-primary: #f6821f; /* Cloudflare Orange */
  --color-primary-glow: rgba(246, 130, 31, 0.4);
  --color-cyan: #00d2ff;
  --color-emerald: #10b981;
  --color-purple: #8b5cf6;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(246, 130, 31, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(0, 210, 255, 0.06) 0%, transparent 45%);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Navbar */
header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.8);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-primary), #faad14);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--color-primary-glow);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.badge-edge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-emerald);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Section */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 30%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title span {
  background: linear-gradient(135deg, #f6821f 0%, #ff5252 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 32px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

/* Glass Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(246, 130, 31, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(246, 130, 31, 0.05);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

/* Info Rows */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  font-weight: 600;
  font-family: var(--font-mono);
  color: #fff;
}

.tag {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(246, 130, 31, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(246, 130, 31, 0.3);
}

/* Latency Tester */
.latency-box {
  margin-top: 16px;
}

.latency-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.region-name {
  width: 110px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.progress-bar-bg {
  flex-grow: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-emerald), var(--color-cyan));
  border-radius: 4px;
  transition: width 0.6s ease-out;
}

.latency-ms {
  width: 60px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-emerald);
}

/* Buttons */
.btn {
  background: linear-gradient(135deg, var(--color-primary), #e65100);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--color-primary-glow);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--color-primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Code Snippet Box */
.code-block {
  background: #0d1117;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #c9d1d9;
  position: relative;
  overflow-x: auto;
  margin-top: 12px;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

footer {
  margin-top: 80px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--color-primary);
}
