* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --gov-blue: #003da5;
  --gov-dark-blue: #0c326f;
  --gov-light-blue: #e8f0fe;
  --gov-track: #e5edf7;
  --gov-green: #009639;
  --gov-yellow: #f59e0b;
  --gov-text-dark: #07132b;
  --gov-text-muted: #5e6b7d;
  --gov-bg: #003da5;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--gov-bg);
  background: linear-gradient(180deg, #003da5 0%, #00225d 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  color: var(--gov-text-dark);
}

.app-viewport {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #003da5;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 14px;
  color: #ffffff;
}

.topbar-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: opacity 0.2s;
}

.topbar-btn:hover {
  opacity: 0.8;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-card {
  flex: 1;
  background: #ffffff;
  border-radius: 30px 30px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 24px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.logos-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.govbr-logo-text {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  user-select: none;
}

.govbr-blue {
  color: #0c326f;
}

.govbr-yellow {
  color: #ffcc00;
}

.govbr-br {
  color: #ffcc00;
  background: linear-gradient(135deg, #ffcc00 40%, #009639 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bf-sub-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.card-title {
  font-size: 23px;
  font-weight: 800;
  color: var(--gov-dark-blue);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.card-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gov-text-muted);
  text-align: center;
  max-width: 330px;
  margin-bottom: 24px;
}

.queue-timer-wrapper {
  position: relative;
  width: 270px;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 20px;
}

.timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-track {
  fill: none;
  stroke: #e0edfd;
  stroke-width: 8;
}

.circle-progress {
  fill: none;
  stroke: #0c326f;
  stroke-width: 8.5;
  stroke-linecap: round;
  stroke-dasharray: 691.15;
  stroke-dashoffset: 691.15;
  transition: stroke 0.4s ease;
}

.circle-progress.completed {
  stroke: #16a34a;
}

.timer-inner-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 20px;
}

.timer-prompt {
  font-size: 14px;
  font-weight: 700;
  color: var(--gov-dark-blue);
  line-height: 1.35;
  max-width: 160px;
  margin-bottom: 8px;
}

.timer-countdown {
  font-size: 56px;
  font-weight: 900;
  color: #0c326f;
  letter-spacing: -2px;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  transition: transform 0.15s ease, color 0.3s ease;
}

.timer-countdown.pulse {
  transform: scale(1.05);
}

.timer-countdown.completed {
  color: var(--gov-green);
  font-size: 38px;
}

.queue-instructions {
  font-size: 13px;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 24px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 12.5px;
  color: #475569;
  font-weight: 500;
  margin-top: auto;
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0ea5e9;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

.official-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 440px) {
  body {
    background: #003da5;
  }
  .app-viewport {
    box-shadow: none;
  }
  .queue-timer-wrapper {
    width: 235px;
    height: 235px;
  }
  .timer-countdown {
    font-size: 48px;
  }
}
