/*
Theme Name: StackSpeak V2
Theme URI: https://stackspeak.com
Author: Robbie / Code Blue Security
Description: Voice-first AI speaking platform for tech professionals
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: stackspeak
*/

/* ============================================================
   RESET & BASE
   ============================================================ */

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

:root {
  --ss-black:      #000000;
  --ss-dark:       #0a0a0a;
  --ss-dark-2:     #111111;
  --ss-dark-3:     #1a1a1a;
  --ss-border:     rgba(255,255,255,0.08);
  --ss-border-2:   rgba(255,255,255,0.12);

  --ss-cyan:       #22d3ee;
  --ss-blue:       #3b82f6;
  --ss-purple:     #7F77DD;
  --ss-amber:      #f59e0b;
  --ss-red:        #ef4444;
  --ss-green:      #22c55e;

  --ss-text:       rgba(255,255,255,0.85);
  --ss-text-2:     rgba(255,255,255,0.5);
  --ss-text-3:     rgba(255,255,255,0.25);

  --ss-font:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ss-mono:       'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --ss-radius:     12px;
  --ss-radius-lg:  18px;
  --ss-radius-xl:  24px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--ss-font);
  background: var(--ss-black);
  color: var(--ss-text);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--ss-cyan); text-decoration: none; }
button { font-family: var(--ss-font); }

/* ============================================================
   LANDING PAGE
   ============================================================ */

.ss-landing {
  min-height: 100dvh;
  background: var(--ss-black);
  position: relative;
  overflow: hidden;
}

.ss-landing-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(34,211,238,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(127,119,221,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 70%, rgba(59,130,246,0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero section */
.ss-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  position: relative;
}

.ss-hero-orb-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2.5rem;
}

.ss-hero-orb {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%,
    rgba(34,211,238,0.45) 0%,
    rgba(59,130,246,0.25) 35%,
    rgba(127,119,221,0.1) 60%,
    rgba(0,0,0,0.6) 80%,
    #000 100%
  );
  border: 1px solid rgba(34,211,238,0.25);
  box-shadow:
    0 0 50px rgba(34,211,238,0.15),
    0 0 100px rgba(34,211,238,0.06);
  animation: heroOrbPulse 3.5s ease-in-out infinite;
  position: relative;
}

.ss-hero-orb::before {
  content: '';
  position: absolute;
  top: 16%; left: 20%;
  width: 28%; height: 18%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.3), transparent);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.ss-hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(34,211,238,0.08);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
}
.ss-hero-ring-1 { width: 140px; height: 140px; animation: heroRing 3s ease-in-out infinite; }
.ss-hero-ring-2 { width: 165px; height: 165px; animation: heroRing 3.5s ease-in-out infinite 0.5s; border-color: rgba(34,211,238,0.04); }

@keyframes heroOrbPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 50px rgba(34,211,238,0.15); }
  50% { transform: scale(1.03); box-shadow: 0 0 70px rgba(34,211,238,0.22); }
}
@keyframes heroRing {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 0.8; }
  50% { transform: translate(-50%,-50%) scale(1.06); opacity: 0.3; }
}

.ss-hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ss-cyan);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.ss-hero-h1 {
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1rem;
}
.ss-hero-h1 em { color: var(--ss-cyan); font-style: normal; }

.ss-hero-sub {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--ss-text-2);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.ss-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--ss-cyan), var(--ss-blue));
  color: #000;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.ss-hero-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(34,211,238,0.3);
  color: #000;
  text-decoration: none;
}

.ss-hero-login {
  margin-top: 1rem;
  font-size: 13px;
  color: var(--ss-text-3);
}
.ss-hero-login a { color: var(--ss-text-2); text-decoration: underline; }

/* Benefits section */
.ss-benefits {
  padding: 3rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.ss-section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ss-text-3);
  text-align: center;
  margin-bottom: 2rem;
}

.ss-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.ss-benefit-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.ss-benefit-card:hover { border-color: rgba(255,255,255,0.15); }

.ss-benefit-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 1rem;
}

.ss-benefit-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.4rem;
}
.ss-benefit-card p {
  font-size: 13.5px;
  color: var(--ss-text-2);
  line-height: 1.6;
}

/* How it works */
.ss-how {
  padding: 3rem 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}

.ss-steps { display: flex; flex-direction: column; gap: 1.5rem; }

.ss-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.ss-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(34,211,238,0.35);
  color: var(--ss-cyan);
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.ss-step h4 { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.ss-step p  { font-size: 13px; color: var(--ss-text-2); line-height: 1.55; }

/* Nav */
.ss-landing-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.ss-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.ss-nav-logo span { color: var(--ss-blue); }

.ss-nav-links { display: flex; align-items: center; gap: 1rem; }
.ss-nav-links a { font-size: 13px; color: var(--ss-text-2); text-decoration: none; }
.ss-nav-links a:hover { color: #fff; }

.ss-nav-cta {
  padding: 7px 16px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.ss-nav-cta:hover { background: rgba(255,255,255,0.14); color: #fff; }
.ss-nav-cta.primary {
  background: linear-gradient(135deg, var(--ss-cyan), var(--ss-blue));
  color: #000;
  border-color: transparent;
  font-weight: 700;
}
.ss-nav-cta.primary:hover { color: #000; opacity: 0.9; }

/* ============================================================
   ORB EXPERIENCE PAGE
   ============================================================ */

.ss-orb-page {
  min-height: 100dvh;
  background: var(--ss-black);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Ambient background glow — changes with orb state */
.ss-orb-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  transition: background 1.2s ease;
  z-index: 0;
}
.ss-orb-ambient.state-speaking {
  background: radial-gradient(ellipse at 50% 40%, rgba(34,211,238,0.06) 0%, transparent 65%);
}
.ss-orb-ambient.state-listening {
  background: radial-gradient(ellipse at 50% 40%, rgba(239,68,68,0.06) 0%, transparent 65%);
}
.ss-orb-ambient.state-thinking {
  background: radial-gradient(ellipse at 50% 40%, rgba(245,158,11,0.05) 0%, transparent 65%);
}
.ss-orb-ambient.state-idle {
  background: radial-gradient(ellipse at 50% 40%, rgba(34,211,238,0.02) 0%, transparent 65%);
}

/* Top bar */
.ss-orb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  position: relative;
  z-index: 10;
}

.ss-orb-user strong { display: block; font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.85); }
.ss-orb-user span   { font-size: 11.5px; color: rgba(245,158,11,0.7); }

.ss-settings-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ss-border);
  background: rgba(255,255,255,0.04);
  color: var(--ss-text-2);
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  position: relative;
  z-index: 10;
}
.ss-settings-btn:hover { border-color: var(--ss-border-2); background: rgba(255,255,255,0.08); }

/* Orb center stage */
.ss-orb-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
  z-index: 5;
}

/* THE ORB */
.ss-orb-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
  margin-bottom: 2.5rem;
}

.ss-orb-ring {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(34,211,238,0.06);
  transition: border-color 1s;
}
.ss-orb-ring-1 { width: 238px; height: 238px; animation: orbRingPulse 3s ease-in-out infinite; }
.ss-orb-ring-2 { width: 258px; height: 258px; animation: orbRingPulse 3.5s ease-in-out infinite 0.5s; border-color: rgba(34,211,238,0.03); }
.ss-orb-ring-3 { width: 280px; height: 280px; animation: orbRingPulse 4s ease-in-out infinite 1s; border-color: rgba(34,211,238,0.015); }

@keyframes orbRingPulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%,-50%) scale(1.04); opacity: 0.4; }
}

.ss-orb {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  position: absolute;
  top: 0; left: 0;
  cursor: pointer;
  transition: background 0.8s ease, box-shadow 0.8s ease;
  background: radial-gradient(circle at 35% 32%,
    rgba(34,211,238,0.5) 0%,
    rgba(59,130,246,0.3) 30%,
    rgba(127,119,221,0.12) 55%,
    rgba(0,0,0,0.75) 75%,
    #000 100%
  );
  box-shadow:
    0 0 70px rgba(34,211,238,0.15),
    0 0 140px rgba(34,211,238,0.07),
    inset 0 0 80px rgba(0,0,0,0.6);
  border: 1px solid rgba(34,211,238,0.2);
  animation: orbIdle 4s ease-in-out infinite;
}

.ss-orb::before {
  content: '';
  position: absolute;
  top: 16%; left: 20%;
  width: 28%; height: 18%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.28), transparent);
  border-radius: 50%;
  transform: rotate(-30deg);
  pointer-events: none;
}

/* Orb state variants */
.ss-orb.speaking {
  background: radial-gradient(circle at 35% 32%,
    rgba(34,211,238,0.72) 0%,
    rgba(59,130,246,0.42) 30%,
    rgba(127,119,221,0.18) 55%,
    rgba(0,0,0,0.6) 75%,
    #000 100%
  );
  box-shadow: 0 0 90px rgba(34,211,238,0.3), 0 0 180px rgba(34,211,238,0.12);
  animation: orbSpeak 0.9s ease-in-out infinite;
}
.ss-orb.listening {
  background: radial-gradient(circle at 35% 32%,
    rgba(239,68,68,0.65) 0%,
    rgba(239,68,68,0.32) 35%,
    rgba(127,119,221,0.12) 60%,
    rgba(0,0,0,0.7) 80%,
    #000 100%
  );
  box-shadow: 0 0 90px rgba(239,68,68,0.28), 0 0 180px rgba(239,68,68,0.1);
  animation: orbListen 0.45s ease-in-out infinite;
}
.ss-orb.thinking {
  background: radial-gradient(circle at 35% 32%,
    rgba(245,158,11,0.52) 0%,
    rgba(127,119,221,0.32) 35%,
    rgba(59,130,246,0.14) 60%,
    rgba(0,0,0,0.7) 80%,
    #000 100%
  );
  box-shadow: 0 0 90px rgba(245,158,11,0.22), 0 0 180px rgba(127,119,221,0.1);
  animation: orbThink 2.5s linear infinite;
}
.ss-orb.idle {
  background: radial-gradient(circle at 35% 32%,
    rgba(34,211,238,0.18) 0%,
    rgba(59,130,246,0.1) 40%,
    rgba(0,0,0,0.85) 70%,
    #000 100%
  );
  box-shadow: 0 0 40px rgba(34,211,238,0.05);
  animation: orbIdle 5s ease-in-out infinite;
}

@keyframes orbIdle    { 0%,100% { transform: scale(1); } 50% { transform: scale(1.015); } }
@keyframes orbSpeak   { 0%,100% { transform: scale(1); } 50% { transform: scale(1.055); } }
@keyframes orbListen  { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes orbThink   { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(50deg); } }

/* Sound wave bars at base of orb */
.ss-orb-waves {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.3s;
}
.ss-orb-waves.active { opacity: 1; }
.ss-orb-waves .wb {
  width: 3px;
  background: var(--ss-cyan);
  border-radius: 99px;
  height: 5px;
  transition: height 0.1s;
}
.ss-orb-waves.listening .wb { background: var(--ss-red); }

/* Orb speech text */
.ss-orb-speech {
  max-width: 300px;
  text-align: center;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.ss-orb-text {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: opacity 0.3s;
}
.ss-orb-text.fading { opacity: 0; }

.ss-orb-state {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ss-text-3);
  transition: color 0.6s;
}
.ss-orb-state.speaking { color: rgba(34,211,238,0.55); }
.ss-orb-state.listening { color: rgba(239,68,68,0.55); }
.ss-orb-state.thinking  { color: rgba(245,158,11,0.55); }

/* Choice cards */
.ss-choices {
  padding: 0 1.5rem 2rem;
  position: relative;
  z-index: 5;
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}
.ss-choices.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ss-choice {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-lg);
  padding: 1.1rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.ss-choice:hover, .ss-choice:active {
  background: rgba(34,211,238,0.07);
  border-color: rgba(34,211,238,0.3);
}
.ss-choice-icon  { font-size: 24px; margin-bottom: 6px; }
.ss-choice-label { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.82); margin-bottom: 3px; }
.ss-choice-sub   { font-size: 11px; color: var(--ss-text-3); }

/* ============================================================
   CHALLENGE PAGE
   ============================================================ */

.ss-challenge-page {
  min-height: 100dvh;
  background: var(--ss-black);
  display: flex;
  flex-direction: column;
  position: relative;
}

.ss-challenge-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  position: relative;
  z-index: 5;
}

.ss-challenge-orb-mini {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%,
    rgba(34,211,238,0.5),
    rgba(59,130,246,0.2) 50%,
    transparent
  );
  border: 1px solid rgba(34,211,238,0.2);
  box-shadow: 0 0 20px rgba(34,211,238,0.1);
  animation: orbIdle 3s ease-in-out infinite;
  position: relative;
  flex-shrink: 0;
}
.ss-challenge-orb-mini::before {
  content: '';
  position: absolute;
  top: 15%; left: 18%;
  width: 28%; height: 18%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.25), transparent);
  border-radius: 50%;
}
.ss-challenge-orb-mini.listening {
  background: radial-gradient(circle at 35% 32%, rgba(239,68,68,0.6), rgba(239,68,68,0.2) 50%, transparent);
  border-color: rgba(239,68,68,0.3);
  animation: orbListen 0.45s ease-in-out infinite;
}

.ss-challenge-meta {
  font-size: 12px;
  color: var(--ss-text-2);
  text-align: right;
}
.ss-challenge-meta strong { display: block; font-size: 13px; color: var(--ss-text); }

.ss-challenge-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1.5rem;
  gap: 1.25rem;
}

.ss-challenge-q-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-lg);
  padding: 1.4rem;
}
.ss-challenge-q-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(34,211,238,0.55);
  margin-bottom: 0.6rem;
  display: block;
}
.ss-challenge-q-text {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
  font-weight: 400;
}

/* Code block inside challenge */
.ss-code-block {
  background: #0d0d0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--ss-radius);
  overflow: hidden;
}
.ss-code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #111;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ss-code-lang { font-size: 11px; color: rgba(255,255,255,0.35); font-family: var(--ss-mono); }
.ss-code-tabs { display: flex; gap: 4px; }
.ss-code-tab {
  font-size: 10.5px;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-family: var(--ss-font);
}
.ss-code-tab.active { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); }
.ss-code-pre {
  padding: 1rem 1.1rem;
  font-family: var(--ss-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #e6edf3;
  overflow-x: auto;
  white-space: pre;
}
.ss-code-edit {
  display: none;
  padding: 0;
}
.ss-code-edit.active { display: block; }
.ss-code-edit div[contenteditable] {
  padding: 1rem 1.1rem;
  font-family: var(--ss-mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: #e6edf3;
  min-height: 180px;
  outline: none;
  white-space: pre;
  overflow-x: auto;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text;
}
.ss-code-edit div[contenteditable]:focus {
  box-shadow: inset 0 0 0 1px rgba(34,211,238,0.2);
}

/* Mic area */
.ss-mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.ss-mic-btn {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(239,68,68,0.12);
  border: 1.5px solid rgba(239,68,68,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.ss-mic-btn::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(239,68,68,0.12);
  transition: all 0.2s;
}
.ss-mic-btn.recording {
  background: rgba(239,68,68,0.25);
  border-color: rgba(239,68,68,0.6);
  box-shadow: 0 0 30px rgba(239,68,68,0.22);
  animation: micPulse 0.65s ease-in-out infinite;
}
.ss-mic-btn.recording::after {
  inset: -12px;
  border-color: rgba(239,68,68,0.15);
  animation: micRing 0.65s ease-in-out infinite;
}
@keyframes micPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes micRing  { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.4; } }

.ss-mic-hint { font-size: 12px; color: var(--ss-text-3); }
.ss-mic-hint.recording { color: rgba(239,68,68,0.6); }

.ss-progress-dots { display: flex; gap: 7px; align-items: center; }
.ss-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.1); transition: all 0.3s; }
.ss-dot.done { background: var(--ss-cyan); }
.ss-dot.current { background: rgba(34,211,238,0.4); animation: dotPulse 1s ease-in-out infinite; }
@keyframes dotPulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ============================================================
   REPORT / FEEDBACK PAGE
   ============================================================ */

.ss-report-page {
  min-height: 100dvh;
  background: var(--ss-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
}

.ss-report-orb {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%,
    rgba(34,211,238,0.4),
    rgba(59,130,246,0.2) 50%,
    transparent
  );
  border: 1px solid rgba(34,211,238,0.15);
  box-shadow: 0 0 25px rgba(34,211,238,0.08);
  position: relative;
  flex-shrink: 0;
}
.ss-report-orb::before {
  content: '';
  position: absolute;
  top: 15%; left: 18%;
  width: 28%; height: 18%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.25), transparent);
  border-radius: 50%;
}

.ss-report-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius-xl);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
}

.ss-report-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ss-text-3);
  margin-bottom: 1.25rem;
}

.ss-score-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 1.5rem; }
.ss-score-row { display: flex; align-items: center; gap: 12px; }
.ss-score-name { font-size: 12.5px; color: var(--ss-text-2); width: 72px; flex-shrink: 0; }
.ss-score-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.ss-score-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
}
.ss-score-val { font-size: 12.5px; font-weight: 600; color: #fff; width: 28px; text-align: right; flex-shrink: 0; }

.ss-report-divider { height: 1px; background: var(--ss-border); margin-bottom: 1.25rem; }

.ss-report-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.ss-report-xp     { font-size: 14px; font-weight: 700; color: var(--ss-amber); }
.ss-report-streak { font-size: 13px; color: var(--ss-text-2); }

.ss-senior-block {
  background: rgba(34,211,238,0.04);
  border: 1px solid rgba(34,211,238,0.1);
  border-left: 2px solid rgba(34,211,238,0.4);
  border-radius: 0 var(--ss-radius) var(--ss-radius) 0;
  padding: 12px 14px;
  margin-bottom: 1.5rem;
}
.ss-senior-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(34,211,238,0.55);
  margin-bottom: 5px;
}
.ss-senior-text {
  font-size: 12.5px;
  color: var(--ss-text-2);
  line-height: 1.6;
  font-style: italic;
}

.ss-report-cta-text {
  text-align: center;
  font-size: 13px;
  color: var(--ss-text-3);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.ss-report-cta-text strong { color: var(--ss-text); display: block; margin-bottom: 3px; }

.ss-report-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: var(--ss-radius);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--ss-border);
  color: var(--ss-text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: var(--ss-font);
  text-decoration: none;
}
.ss-report-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ============================================================
   SETTINGS DRAWER
   ============================================================ */

.ss-settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.ss-settings-overlay.open { opacity: 1; pointer-events: auto; }

.ss-settings-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #0d0d0d;
  border: 1px solid var(--ss-border);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: 1.25rem 1.5rem 2rem;
  z-index: 99;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  max-height: 88dvh;
  overflow-y: auto;
}
.ss-settings-drawer.open { transform: translateY(0); }

.ss-drawer-handle {
  width: 38px; height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 99px;
  margin: 0 auto 1.4rem;
}

.ss-settings-section { margin-bottom: 1.4rem; }
.ss-settings-section h4 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ss-text-3); margin-bottom: 0.75rem; }

.ss-voice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ss-voice-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--ss-border);
  border-radius: var(--ss-radius);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 9px;
  -webkit-tap-highlight-color: transparent;
}
.ss-voice-card:hover { background: rgba(255,255,255,0.07); }
.ss-voice-card.selected {
  background: rgba(34,211,238,0.07);
  border-color: rgba(34,211,238,0.3);
}
.ss-voice-flag { font-size: 19px; flex-shrink: 0; }
.ss-voice-info { flex: 1; }
.ss-voice-info p    { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.8); margin: 0; }
.ss-voice-info span { font-size: 10.5px; color: var(--ss-text-3); }
.ss-voice-check { font-size: 12px; color: var(--ss-cyan); opacity: 0; transition: opacity 0.15s; }
.ss-voice-card.selected .ss-voice-check { opacity: 1; }

.ss-voice-preview-btn {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 99px;
  border: 1px solid var(--ss-border);
  background: transparent;
  color: var(--ss-text-3);
  cursor: pointer;
  font-family: var(--ss-font);
  display: block;
  margin-top: 4px;
  transition: all 0.15s;
}
.ss-voice-preview-btn:hover { color: var(--ss-text-2); border-color: var(--ss-border-2); }

.ss-settings-close {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: var(--ss-radius);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--ss-border);
  color: var(--ss-text-2);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--ss-font);
  transition: background 0.15s;
}
.ss-settings-close:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   PWA / MOBILE UTILS
   ============================================================ */

@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
}

@media (max-width: 480px) {
  .ss-hero h1 { font-size: 28px; }
  .ss-orb { width: 190px; height: 190px; }
  .ss-orb-wrapper { width: 190px; height: 190px; }
}

/* ============================================================
   DESKTOP CENTERING — the experience is a centered column
   ============================================================ */

.ss-challenge-topbar,
.ss-challenge-body,
.ss-challenge-page > div:not(.ss-orb-ambient) {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.ss-orb-topbar,
.ss-choices {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.ss-settings-drawer {
  max-width: 560px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .ss-challenge-page { align-items: center; }
  .ss-orb-page { align-items: center; }
  .ss-choices { padding-bottom: 3rem; }
}

/* Token colors for code */
.tok-kw { color: #ff7b72; }
.tok-fn { color: #d2a8ff; }
.tok-str { color: #a5d6ff; }
.tok-cm { color: #6e7681; }
.tok-num { color: #79c0ff; }

/* Loading spinner */
.ss-spinner {
  width: 32px; height: 32px;
  border: 2px solid rgba(255,255,255,0.08);
  border-top-color: var(--ss-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* XP bar (report) */
.ss-xp-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; }
.ss-xp-bar-wrap { flex: 1; height: 5px; background: rgba(255,255,255,0.06); border-radius: 99px; overflow: hidden; }
.ss-xp-bar-fill { height: 100%; background: var(--ss-amber); border-radius: 99px; transition: width 1.5s ease; }
