@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500&display=swap");

:root {
  --bg: #020405;
  --card: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --soft: rgba(255, 255, 255, 0.48);
  --brand: #0bb8c4;
  --brand-green: #72dfa8;
  --warning: #d98b13;
  --danger: #d93b45;
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(11, 184, 196, 0.28) 0,
      rgba(11, 184, 196, 0.10) 28%,
      rgba(2, 4, 5, 0) 56%
    ),
    radial-gradient(
      circle at 85% 18%,
      rgba(114, 223, 168, 0.13) 0,
      rgba(114, 223, 168, 0) 36%
    ),
    var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.page-shell {
  width: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(22px, env(safe-area-inset-top))
    16px
    max(22px, env(safe-area-inset-bottom));
}

.tracker-card {
  width: min(100%, 520px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.12),
      rgba(255, 255, 255, 0.055)
    );
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-green));
  color: #ffffff;
  font-family: Fredoka, Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 14px 34px rgba(11, 184, 196, 0.24);
}

.brand-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: Fredoka, Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

h1 {
  margin: 0;
  color: var(--text);
  font-family: Fredoka, Arial, Helvetica, sans-serif;
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.status-panel,
.location-panel,
.safety-note,
.info-grid {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}

.status-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(11, 184, 196, 0.36);
  animation: pulse 1.8s infinite;
}

.status-title {
  margin: 0 0 4px;
  color: var(--text);
  font-family: Fredoka, Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.status-body {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.status-active .pulse-dot {
  background: var(--brand-green);
  box-shadow: 0 0 0 0 rgba(114, 223, 168, 0.36);
}

.status-warning .pulse-dot {
  background: var(--warning);
  box-shadow: 0 0 0 0 rgba(217, 139, 19, 0.36);
}

.status-error .pulse-dot,
.status-expired .pulse-dot {
  background: var(--danger);
  box-shadow: none;
  animation: none;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--line);
}

.info-grid > div {
  padding: 14px;
  background: rgba(2, 4, 5, 0.34);
}

.field-label {
  margin: 0 0 5px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.field-value {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.location-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  margin-bottom: 14px;
}

.location-main {
  min-width: 0;
}

.coordinates {
  margin: 0 0 5px;
  color: var(--text);
  font-family: Fredoka, Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-green));
  color: #ffffff;
  font-family: Fredoka, Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(11, 184, 196, 0.20);
}

.map-panel {
  width: 100%;
  height: 280px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 4, 5, 0.42);
}

.map-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: rgba(2, 4, 5, 0.42);
}

.safety-note {
  padding: 15px 16px;
}

.safety-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(11, 184, 196, 0.36);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(11, 184, 196, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(11, 184, 196, 0);
  }
}

@media (max-width: 480px) {
  .tracker-card {
    padding: 18px;
    border-radius: 26px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .location-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}