@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Theme variables - applied via data-theme on <html> */
:root {
  --bg: #0a0a0a;
  --card-bg: #141414;
  --text: #f0f0f0;
  --text-dim: #666;
  --text-mid: #999;
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.15);
  --track-bg: #333;
}

html[data-theme="light"],
html[data-theme="light"] * {
  --bg: #f5f5f0;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-dim: #aaa;
  --text-mid: #777;
  --accent: #e85d26;
  --accent-glow: rgba(232, 93, 38, 0.1);
  --track-bg: #ddd;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.3s ease, color 0.3s ease;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  padding-top: env(safe-area-inset-top, 24px);
  padding-bottom: env(safe-area-inset-bottom, 24px);
}

.card {
  text-align: center;
  padding: 48px 32px;
  max-width: 420px;
  width: 100%;
}

/* "in 3 min" / "2 min ago" / "right now" */
.context {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

/* The big name */
.name {
  font-size: clamp(32px, 10vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.name.exact {
  text-shadow: 0 0 40px var(--accent-glow), 0 0 80px var(--accent-glow);
  color: var(--accent);
}

/* Explanation line */
.explanation {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  margin-top: 16px;
  line-height: 1.5;
}

/* Progress bar between prev <-> next */
.progress-track {
  width: 100%;
  max-width: 200px;
  height: 4px;
  background: var(--track-bg);
  border-radius: 2px;
  margin: 32px auto 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: calc(var(--progress, 0) * 100%);
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Toolbar (top-right buttons) */
.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px;
  margin: 0;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .toolbar-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.toolbar-btn.active {
  color: var(--accent);
}

.toolbar-btn.denied {
  opacity: 0.3;
  pointer-events: none;
}

/* Small real clock at the bottom */
.clock {
  position: fixed;
  bottom: 32px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
