@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #f3f3f3;
  --bg-soft: #e9edef;
  --card: #ffffff;
  --accent: #47717b;
  --accent-2: #396a77;
  --text: #0f1b1d;
  --muted: #5c6b70;
  --border: rgba(57, 106, 119, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, rgba(71, 113, 123, 0.15), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(57, 106, 119, 0.18), transparent 40%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(57, 106, 119, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 106, 119, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  opacity: 0.35;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 8vw 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.order-btn {
  text-decoration: none;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.order-btn:hover {
  background: var(--accent-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand img {
  width: 72px;
  height: 72px;
}

.brand-link {
  display: inline-flex;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.status-pill {
  background: rgba(71, 113, 123, 0.12);
  color: var(--accent-2);
  border: 1px solid rgba(57, 106, 119, 0.35);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 60px 8vw 50px;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 16px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.server-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.server-meta div {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.server-meta span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.server-meta strong {
  font-size: 1rem;
}

.locations {
  margin-top: 26px;
}

.locations span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.location-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.location-links a {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  transition: border 0.2s ease, transform 0.2s ease;
}

.location-links a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(233, 237, 239, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(15, 27, 29, 0.18);
}

.panel-header h2 {
  margin: 0 0 6px;
}

.panel-header p {
  margin: 0 0 24px;
  color: var(--muted);
}

.lg-form label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--muted);
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-row input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-size: 1rem;
}


.test-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.test-buttons button {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  padding: 8px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease;
}

.test-buttons button:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.results {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.result-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#result-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(57, 106, 119, 0.25);
  border-top-color: var(--accent);
  opacity: 0;
  animation: spin 0.9s linear infinite;
}

#result-spinner.is-active {
  opacity: 1;
}

.result-progress {
  height: 3px;
  width: 100%;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.result-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%);
  animation: progressSweep 1.2s ease-in-out infinite;
  opacity: 0;
}

.result-progress.is-active::after {
  opacity: 1;
}

.results-actions button {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  cursor: pointer;
}

.output {
  margin: 0;
  padding: 16px;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9rem;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
}

.output.is-loading {
  opacity: 0.7;
}

.output.is-updated {
  animation: outputSlide 0.35s ease;
}

.footer {
  padding: 30px 8vw 40px;
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  border-bottom-color: var(--accent);
}

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

@keyframes pulseIn {
  from {
    opacity: 0.2;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes progressSweep {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(100%);
  }
}

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

.hero, .panel, .brand, .server-meta div {
  animation: floatIn 0.8s ease both;
}

@media (max-width: 800px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .input-row {
    flex-direction: column;
  }
  .input-row button.primary {
    width: 100%;
  }
}
