@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-main: radial-gradient(circle at top, #020617, #0f172a);
  --glass: rgba(15, 23, 42, 0.75);
  --border-glass: rgba(255,255,255,0.08);

  --primary: #38bdf8;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #facc15;

  --text-main: #e5e7eb;
  --text-soft: #cbd5f5;
  --text-dim: #94a3b8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ================= GRADIENT TEXT (FIXED) ================= */
.gradient-text {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  background-clip: text;               /* ✅ standard */
  -webkit-background-clip: text;       /* ✅ webkit */
  -webkit-text-fill-color: transparent;
}

/* ================= HEADER ================= */
.header {
  padding: 22px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ================= HERO ================= */
.hero {
  max-width: 760px;
  margin: 90px auto 60px;
  padding: 26px;
  text-align: center;
  animation: fadeUp .7s ease;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 44px);
  margin-bottom: 14px;
  font-weight: 800;
}

.hero p {
  font-size: 18px;
  color: var(--text-soft);
  margin-bottom: 30px;
  line-height: 1.6;
}

/* ================= BUTTON ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  font-weight: 800;
  border-radius: 16px;
  text-decoration: none;
  box-shadow: 0 14px 35px rgba(34,197,94,.45);
  transition: all .25s ease;
}

.btn:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 22px 45px rgba(34,197,94,.6);
}

/* ================= FEATURES ================= */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
  gap: 22px;
  max-width: 960px;
  margin: 80px auto;
  padding: 0 20px;
}

.feature {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border-radius: 22px;
  padding: 26px;
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 45px rgba(0,0,0,.6);
  transition: transform .25s ease, box-shadow .25s ease;
}

.feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 65px rgba(0,0,0,.8);
}

.feature h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary);
}

/* ================= CARD / SCAN ================= */
.container {
  max-width: 420px;
  margin: 90px auto;
  padding: 20px;
}

.card {
  background: var(--glass);
  backdrop-filter: blur(18px);
  border-radius: 26px;
  padding: 28px;
  border: 1px solid var(--border-glass);
  box-shadow:
    0 30px 60px rgba(0,0,0,.7),
    inset 0 0 0 1px rgba(255,255,255,.04);
  animation: fadeUp .6s ease;
}

.tag {
  text-align: center;
  color: var(--primary);
  font-size: 13px;
  margin-bottom: 20px;
  letter-spacing: .5px;
}

/* ================= ALERTS ================= */
.alert {
  background: linear-gradient(135deg, #7f1d1d, #450a0a);
  color: #fee2e2;
  padding: 16px;
  border-radius: 18px;
  font-weight: 800;
  margin-bottom: 18px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(127,29,29,.6);
}

.alert.success {
  background: linear-gradient(135deg, #14532d, #052e16);
  color: #dcfce7;
}

.alert.warning {
  background: linear-gradient(135deg, #78350f, #422006);
  color: #fef3c7;
}

/* ================= INFO ROW ================= */
.row {
  margin-bottom: 14px;
}

.label {
  font-size: 13px;
  color: var(--text-dim);
}

.value {
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
}

/* ================= EXTRA ================= */
.medical {
  margin-top: 20px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(239,68,68,.12);
  border: 1px dashed rgba(239,68,68,.4);
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
}

.badge.emergency {
  background: rgba(239,68,68,.2);
  color: #fecaca;
}

.loader {
  text-align: center;
  color: var(--text-soft);
  animation: pulse 1.2s infinite;
}

/* ================= FOOTER ================= */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin: 60px 0 24px;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { opacity: .35; }
  50% { opacity: 1; }
  100% { opacity: .35; }
}

/* ================= MOBILE ================= */
@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
}
