:root {
  --zone: #8a8a8a;
  --zone-rgb: 138, 138, 138;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --grid: #e6e6e6;
  --band: rgba(0, 194, 68, 0.18);
  --card-radius: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Roboto, "Segoe UI", sans-serif;
  background: #0e1114;
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.phone {
  width: min(100%, 390px);
}

.glu-card {
  background: #161a1f;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.glu-head {
  position: relative;
  background: var(--zone);
  color: #fff;
  padding: 1rem 1.15rem 1.35rem;
  min-height: 7.5rem;
  transition: background-color 0.55s ease, color 0.35s ease;
}

.glu-card[data-zone="out"] .glu-head {
  color: #1a1a1a;
}

.glu-card[data-zone="out"] .glu-alarm-icon {
  color: #1a1a1a;
}

.glu-alarm {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: alarmIn 0.45s ease both;
}

.glu-alarm[hidden] {
  display: none !important;
}

.glu-alarm-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.glu-reading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.glu-value {
  font-size: clamp(3.6rem, 18vw, 4.6rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.glu-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  padding-bottom: 0.35rem;
}

.glu-arrow-wrap {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
}

.glu-arrow {
  width: 2.15rem;
  height: 2.15rem;
  transform: rotate(0deg);
  transition: transform 0.6s cubic-bezier(0.34, 1.3, 0.64, 1);
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.12));
}

.glu-unit {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.95;
}

.glu-notch {
  position: absolute;
  right: 1.55rem;
  bottom: -0.55rem;
  width: 0;
  height: 0;
  border-left: 0.55rem solid transparent;
  border-right: 0.55rem solid transparent;
  border-top: 0.55rem solid var(--zone);
  transition: border-top-color 0.55s ease;
  z-index: 2;
}

.glu-chart {
  position: relative;
  height: 260px;
  padding: 0.65rem 0.4rem 0.4rem 0.15rem;
  background: #161a1f;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes alarmIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulseDot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glu-card,
  .glu-alarm,
  .glu-arrow {
    animation: none !important;
    transition: none !important;
  }
}
