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

html,
body {
  height: 100%;
  overflow: hidden;
  background: #0f1320;
  color: #e7eaf3;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

#topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 4px;
}

.tb-spacer {
  flex: 1;
}

.tb-btn {
  background: #1c2340;
  border: 1px solid #2a3358;
  color: #e7eaf3;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.tb-btn:active {
  transform: scale(0.95);
}

.ib-label {
  margin-left: 2px;
}

@media (max-width: 359px) {
  .ib-label {
    display: none;
  }
}

.btn {
  background: #232a49;
  border: 1px solid #33406e;
  color: #e7eaf3;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: block;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, #4da3ff, #7c5cff);
  border: none;
}

.btn:active {
  transform: scale(0.97);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 20, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  backdrop-filter: blur(3px);
}

.panel {
  background: #171c30;
  border: 1px solid #2a3358;
  border-radius: 20px;
  padding: 26px 24px;
  width: min(320px, 86vw);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel h1 {
  font-size: 24px;
}

.record {
  color: #ffe066;
  font-weight: 700;
}

.go-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin: 6px 0;
}

.go-stats span {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

.go-stats small {
  color: #8b93b8;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ios-step {
  font-size: 14px;
  line-height: 1.5;
  color: #c6cbe0;
}

.ad-overlay {
  position: fixed;
  inset: 0;
  background: #05060d;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.ad-label {
  color: #8b93b8;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #232a49;
  border: 1px solid #33406e;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 40;
}

.hidden {
  display: none;
}
