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

:root {
  --bg:           #0a0a0a;
  --surface:      #1a1a1a;
  --primary:      #e31837;
  --primary-hover:#c01530;
  --text:         #ffffff;
  --text-2:       #999999;
  --border:       #2a2a2a;
  --radius:       16px;
}

html { min-height: 100%; }

body {
  background: var(--bg); color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh; margin: 0; position: relative;
}

/* ── Background layers (image / gradient) ── */
.bg-layer {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  pointer-events: none;
}
.bg-overlay {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none;
}

/* ── Page wrapper ── */
.page {
  position: relative; z-index: 2;
  max-width: 520px; margin: 0 auto;
  padding: 0 20px 48px;
  min-height: calc(100vh - 48px);
  display: flex; flex-direction: column; align-items: center;
}

/* ── Header ── */
.biz-header { width: 100%; text-align: center; padding: 40px 0 28px; }
.biz-logo { max-height: 60px; max-width: 240px; object-fit: contain; }

/* ── Steps bar ── */
.steps-bar {
  display: flex; align-items: center;
  margin-bottom: 36px; width: 100%; max-width: 200px;
}
.step-dot {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.06); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: var(--text-2);
  transition: all 0.35s ease;
}
.step-dot.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-dot.done   { background: transparent; border-color: var(--primary); color: var(--primary); }
.step-line { flex: 1; height: 2px; background: var(--border); transition: background 0.35s ease; }
.step-line.done  { background: var(--primary); }

/* ── Step panels ── */
.step-panel {
  width: 100%; display: flex; flex-direction: column; align-items: center;
  animation: fadeUp 0.35s ease;
}
.step-panel.hidden { display: none; }
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }

.step-title {
  font-size: 1.55rem; font-weight: 800; text-align: center;
  margin-bottom: 8px; letter-spacing: -0.4px; line-height: 1.2;
}
.step-hint { color: var(--text-2); font-size: 0.9rem; text-align: center; margin-bottom: 40px; line-height: 1.5; }

/* ── Review hint ── */
.review-hint {
  color: var(--text-2); font-size: 0.85rem; text-align: center;
  line-height: 1.7; margin-bottom: 24px;
  white-space: pre-line;
}
.review-hint em { font-style: italic; color: var(--text-1); }

/* ── Mic ── */
.mic-wrapper { position: relative; display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }

.mic-btn {
  width: 116px; height: 116px; border-radius: 50%;
  background: var(--primary); border: none; cursor: pointer;
  color: #fff; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: transform 0.15s ease, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mic-btn:hover  { transform: scale(1.05); background: var(--primary-hover); }
.mic-btn:active { transform: scale(0.96); }

.mic-icon { width: 42px; height: 42px; }

/* Pulse rings */
.mic-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 2px solid var(--primary); opacity: 0;
  transform: scale(1); pointer-events: none;
}
.mic-ring-2 { inset: -28px; }

.mic-btn.recording .mic-ring   { animation: ring 1.8s ease-out infinite; }
.mic-btn.recording .mic-ring-2 { animation: ring 1.8s ease-out 0.6s infinite; }

@keyframes ring {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── Live transcript ── */
.live-transcript-wrap {
  width: 100%; background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 16px 18px;
  min-height: 80px; max-height: 220px; overflow-y: auto;
  margin-bottom: 20px;
}
.live-transcript {
  font-size: 1rem; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.live-transcript .interim { color: var(--text-2); }

/* ── Stop / re-record ── */
.stop-btn {
  background: transparent; border: 2px solid rgba(255,255,255,0.15);
  border-radius: 100px; padding: 10px 26px;
  color: var(--text-2); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.stop-btn:hover { border-color: rgba(255,255,255,0.35); color: var(--text); }

/* ── No speech ── */
.no-speech-note {
  text-align: center; color: var(--text-2); font-size: 0.88rem;
  line-height: 1.65; margin-top: 12px;
}

/* ── Review textarea ── */
.review-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 16px 18px;
  color: var(--text); font-size: 1rem; line-height: 1.75;
  font-family: inherit; resize: vertical; outline: none;
  margin-bottom: 16px; transition: border-color 0.2s; min-height: 160px;
}
.review-textarea:focus { border-color: var(--primary); }

/* ── Action row ── */
.action-row { width: 100%; display: flex; justify-content: flex-start; margin-bottom: 20px; }
.rerecord-btn {
  background: transparent; border: none; color: var(--text-2);
  font-size: 0.85rem; font-weight: 500; cursor: pointer; font-family: inherit;
  padding: 6px 0; transition: color 0.2s;
}
.rerecord-btn:hover { color: var(--text); }

/* ── Copy button ── */
.copy-btn {
  width: 100%; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius); padding: 18px;
  font-size: 1.1rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: all 0.2s; letter-spacing: 0.2px;
  -webkit-tap-highlight-color: transparent;
}
.copy-btn:hover   { background: var(--primary-hover); }
.copy-btn.copied  { background: #16a34a; }
.copy-btn.copied::before { content: '✓ '; }

/* ── Review platform links ── */
.review-links {
  width: 100%; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px;
}
.review-link-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 16px 20px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  transition: all 0.2s; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.review-link-btn:hover { border-color: var(--primary); background: rgba(255,255,255,0.1); transform: translateX(3px); }

.platform-icon-wrap {
  width: 40px; height: 40px; border-radius: 10px;
  overflow: hidden; flex-shrink: 0; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.platform-icon-wrap img { width: 28px; height: 28px; object-fit: contain; display: block; }
.platform-icon-emoji { font-size: 1.5rem; line-height: 1; }

.review-link-text { flex: 1; }
.review-link-name { font-weight: 700; display: block; font-size: 1rem; }
.review-link-sub  { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; display: block; }
.review-link-arrow { color: var(--text-2); font-size: 1rem; }

/* ── Start over ── */
.start-over-btn {
  background: transparent; border: none; color: var(--text-2);
  font-size: 0.85rem; cursor: pointer; font-family: inherit;
  padding: 6px 0; transition: color 0.2s;
}
.start-over-btn:hover { color: var(--text); }

/* ── Powered by ── */
.powered-by {
  position: relative; z-index: 2; text-align: center;
  padding: 14px; color: var(--text-2); font-size: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.powered-by a { color: var(--text-2); text-decoration: none; }
.powered-by a:hover { color: var(--text); }
