* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f5f7fa;
  color: #333;
  margin: 0;
  padding: 1rem;
}
.container {
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 400px;
  width: min(400px, calc(100vw - 2rem));
  margin: 0;
}
#loading-state,
#button-container,
.error,
.timeout-notice {
  width: 100%;
}
#loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.interstitial-spinner {
  display: block;
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #00b67a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
h1 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.status {
  color: #666;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.error-text {
  color: #dc2626;
  font-size: 0.875rem;
  text-align: center;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}
.btn-primary {
  background: #00b67a;
  color: #fff;
}
.btn-primary:hover {
  background: #00a06d;
}
.hidden {
  display: none !important;
}
.timeout-notice {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #92400e;
}
.logo {
  margin-bottom: 1.5rem;
}
.logo svg {
  height: 32px;
  width: auto;
}
@media (max-width: 480px) {
  h1 {
    font-size: 1.1rem;
  }
  .btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}
