:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #888;
  --accent: #3b82f6;
  --accent-2: #6366f1;
  --gold: #f59e0b;
  --danger: #ef4444;
  --card: #141414;
  --border: #222;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

header {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}
header h1 {
  font-size: 22px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}

.gold-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
.gold-icon {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--gold);
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
}
.screen.active { display: flex; }

.orb-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.orb {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
  transition: transform 0.15s ease;
  font-family: inherit;
}
.orb:active { transform: scale(0.96); }
.orb-searching {
  cursor: default;
  background: var(--card);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 48px;
}
.pulsing .orb {
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
  100% { box-shadow: 0 0 0 40px rgba(59, 130, 246, 0); }
}

.status {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}
.hint {
  font-size: 13px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.5;
  margin: 0;
}
.hint.small {
  font-size: 11px;
  margin-top: 8px;
}

.stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}
.stats > div {
  text-align: center;
}
.stats span {
  display: block;
  font-size: 28px;
  font-weight: 600;
}
.stats label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.timer {
  font-size: 96px;
  font-weight: 200;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.2s ease;
}
.timer.bump {
  transform: scale(1.15);
}

.vu-wrap {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vu {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vu label {
  width: 56px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}
.vu .bar {
  flex: 1;
  height: 8px;
  background: var(--card);
  border-radius: 4px;
  overflow: hidden;
}
.vu .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.08s linear;
}

.call-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  align-items: stretch;
}
.call-actions button {
  width: 100%;
}
.extend-cost {
  display: inline-block;
  margin-left: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

button {
  font-family: inherit;
}
.primary {
  background: var(--accent);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.primary:disabled {
  background: var(--card);
  color: var(--muted);
  cursor: not-allowed;
}
.danger {
  background: var(--danger);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}
.outline {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--accent);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.plus-icon {
  font-size: 18px;
  line-height: 1;
  color: var(--accent);
}
.big {
  padding: 18px 32px;
  font-size: 22px;
}

.rate-buttons {
  display: flex;
  gap: 16px;
}

.friend-action {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--card);
  color: var(--fg);
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  z-index: 100;
  max-width: 90%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: #22c55e; }
.toast.error { border-color: var(--danger); }
.toast.gold { border-color: var(--gold); }
.toast.hidden { display: none; }

footer {
  text-align: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}
