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

html, body {
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: radial-gradient(ellipse at 20% 50%, #0f172a 0%, #020617 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #e2e8f0;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 80% 30%, rgba(6,182,212,0.08) 0%, transparent 60%),
    radial-gradient(circle at 20% 80%, rgba(168,85,247,0.06) 0%, transparent 60%);
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 28px;
  padding: 40px 32px 36px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
}

/* ─── Logo ─────────────────────────────────────────── */

.logo {
  text-align: center;
  margin-bottom: 28px;
}

.logo-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.logo h1 {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #f0b429, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo p {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ─── Input ────────────────────────────────────────── */

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.input-group input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #f1f5f9;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.input-group input::placeholder {
  color: #475569;
  font-weight: 400;
}

.input-group input:focus {
  border-color: rgba(240,180,41,0.4);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.08);
}

.btn {
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #f0b429, #d97706);
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(240,180,41,0.25);
}

.btn:active {
  transform: scale(0.97);
}

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

.hint {
  font-size: 12px;
  color: #475569;
  margin-top: 8px;
  padding-left: 4px;
}

/* ─── Spinner ──────────────────────────────────────── */

.spinner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 0 8px;
}

.spinner.show {
  display: flex;
}

.spinner-ring {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(240,180,41,0.1);
  border-top-color: #f0b429;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.spinner span {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 500;
}

/* ─── Error ────────────────────────────────────────── */

.error-msg {
  display: none;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 20px;
  font-size: 14px;
  color: #fca5a5;
  font-weight: 500;
  text-align: center;
}

.error-msg.show {
  display: block;
}

/* ─── Results ──────────────────────────────────────── */

.results {
  display: none;
  margin-top: 24px;
}

.results.show {
  display: block;
  animation: fadeUp 0.5s ease;
}

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

.results-header {
  text-align: center;
  margin-bottom: 20px;
  font-size: 15px;
  font-weight: 600;
  color: #f0b429;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: center;
  transition: background 0.2s;
}

.stat-card:hover {
  background: rgba(255,255,255,0.06);
}

.stat-card.full {
  grid-column: 1 / -1;
}

.stat-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
}

.stat-value.total  { color: #38bdf8; }
.stat-value.used   { color: #f59e0b; }
.stat-value.left   { color: #22c55e; }
.stat-value.down   { color: #818cf8; }
.stat-value.up     { color: #fb923c; }

.updated {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: #475569;
  font-weight: 500;
}

/* ─── Responsive ───────────────────────────────────── */

@media (max-width: 480px) {
  .card {
    padding: 28px 18px 24px;
    border-radius: 20px;
  }

  .input-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    padding: 14px;
  }

  .logo-icon {
    font-size: 40px;
  }

  .logo h1 {
    font-size: 20px;
  }
}
