/* ─────────────────────────────────────────
   Design Tokens
───────────────────────────────────────── */
:root {
  --clr-bg:          #050812;
  --clr-surface:     rgba(255, 255, 255, 0.04);
  --clr-border:      rgba(255, 255, 255, 0.08);
  --clr-border-glow: rgba(99, 102, 241, 0.5);
  --clr-primary:     #6366f1;
  --clr-primary-2:   #818cf8;
  --clr-accent:      #22d3ee;
  --clr-text:        #f1f5f9;
  --clr-muted:       #94a3b8;
  --clr-green:       #34d399;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* ─────────────────────────────────────────
   Reset & Base
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
}

/* ─────────────────────────────────────────
   Animated Background Blobs
───────────────────────────────────────── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: drift 20s ease-in-out infinite alternate;
}

.blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
  top: -100px; left: -150px;
  animation-duration: 22s;
}

.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(34,211,238,0.18) 0%, transparent 70%);
  bottom: -80px; right: -100px;
  animation-duration: 18s;
  animation-delay: -6s;
}

.blob-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,0.15) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 25s;
  animation-delay: -12s;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 30px) scale(0.97); }
}

/* ─────────────────────────────────────────
   Container
───────────────────────────────────────── */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: fadeUp 0.7s ease both;
}

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

/* ─────────────────────────────────────────
   Badge
───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--clr-primary-2);
  text-transform: uppercase;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--clr-primary);
  box-shadow: 0 0 8px var(--clr-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--clr-primary); }
  50%       { opacity: 0.6; box-shadow: 0 0 16px var(--clr-primary); }
}

/* ─────────────────────────────────────────
   Title
───────────────────────────────────────── */
.title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.03em;
}

.title-accent {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 0.95rem;
  color: var(--clr-muted);
  text-align: center;
  max-width: 480px;
  line-height: 1.7;
}

/* ─────────────────────────────────────────
   Hostname Card
───────────────────────────────────────── */
.card {
  width: 100%;
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.2s ease, border-color 0.3s ease;
  cursor: default;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(34,211,238,0.08));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .card-glow { opacity: 1; }

.card-inner {
  position: relative;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--clr-muted);
}

.hostname {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3.5vw, 1.75rem);
  font-weight: 600;
  color: var(--clr-text);
  letter-spacing: -0.01em;
  min-height: 2.2rem;
  opacity: 0;
  word-break: break-all;
  background: linear-gradient(90deg, var(--clr-text) 70%, var(--clr-primary-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.4em;
  background: var(--clr-primary);
  vertical-align: middle;
  margin-left: 2px;
  border-radius: 2px;
  animation: blink 0.9s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--clr-green);
  font-weight: 500;
  border-top: 1px solid var(--clr-border);
  padding-top: 1rem;
  margin-top: 0.25rem;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-green);
  box-shadow: 0 0 10px var(--clr-green);
  animation: pulse-dot 2s ease-in-out infinite;
  animation-delay: 0.5s;
}

/* ─────────────────────────────────────────
   Info Grid
───────────────────────────────────────── */
.info-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.info-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.06);
}

.info-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.info-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-text);
}

.info-desc {
  font-size: 0.78rem;
  color: var(--clr-muted);
  line-height: 1.6;
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--clr-muted);
}

.footer-tech {
  color: var(--clr-primary-2);
  font-weight: 600;
}

/* ─────────────────────────────────────────
   Stress Panel
───────────────────────────────────────── */
.stress-panel {
  width: 100%;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}

.stress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid var(--clr-border);
}

.stress-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-text);
}

.stress-icon { font-size: 1.1rem; }

/* Badge de status */
.stress-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--clr-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.stress-badge--running {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
  border-color: rgba(234, 179, 8, 0.35);
  animation: pulse-dot 1s ease-in-out infinite;
}

.stress-badge--done {
  background: rgba(52, 211, 153, 0.12);
  color: var(--clr-green);
  border-color: rgba(52, 211, 153, 0.35);
}

.stress-badge--error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Body do painel */
.stress-body {
  padding: 1.5rem 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.slider-group {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-group label {
  font-size: 0.82rem;
  color: var(--clr-muted);
}

.slider-group strong {
  color: var(--clr-primary-2);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--clr-primary);
  box-shadow: 0 0 8px var(--clr-primary);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px var(--clr-primary);
}

/* Botão de stress */
.stress-btn {
  padding: 0.7rem 1.4rem;
  background: linear-gradient(135deg, var(--clr-primary), #4f46e5);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
  white-space: nowrap;
}

.stress-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
}

.stress-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Result rows */
.stress-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--clr-border);
  animation: fadeUp 0.3s ease both;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.8rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--clr-border);
}

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

.result-row span:first-child { color: var(--clr-muted); }

.result-row span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--clr-text);
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 480px) {
  .card-inner  { padding: 1.5rem; }
  .info-grid   { grid-template-columns: 1fr; }
  .stress-body { flex-direction: column; }
}
