/* ============================================================================
   AI Response Audio Scape — Local Bundled Stylesheet (styles.css)
   100% Offline System Font Stack | Zero Remote Assets | Strict MV3 CSP Compliant
   Universal 8-Browser Certified: Chrome, Brave, Comet, Opera, Firefox, Edge,
                                  Apple Safari (macOS/iOS), & Samsung Internet
   Built by Ojus Wankhede using AI
   ============================================================================ */

:root {
  --bg-deep: #0b1120;
  --bg-card: #131c31;
  --bg-card-hover: #1b2845;
  --bg-elevated: #1e293b;
  --border-subtle: #263554;
  --border-focus: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-emerald: #34d399;
  --accent-indigo: #818cf8;
  --accent-amber: #fbbf24;
  --danger-rose: #fb7185;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 10px 25px -5px rgba(2, 6, 23, 0.6);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* ============================================================================
   POPUP UI STYLES (popup.html) — Responsive for Desktop & Mobile Sheet (iOS/Android)
   ============================================================================ */
body.popup-body {
  width: 360px;
  max-width: 100vw;
  min-height: 520px;
  padding: 16px;
  background: radial-gradient(circle at top right, #172554 0%, #0b1120 65%);
}

@media (max-width: 400px) {
  body.popup-body {
    width: 100vw;
    padding: 14px;
  }
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 500;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.14);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.status-pill.paused {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.3);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.card-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-label-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-label-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Custom Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: 0.2s ease;
  border-radius: 999px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s ease;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.section-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.sound-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
}

.sound-option:hover {
  background: var(--bg-card-hover);
  border-color: rgba(56, 189, 248, 0.5);
}

.sound-option.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px var(--accent-cyan);
}

.sound-option-title {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sound-option-meta {
  font-size: 10px;
  color: var(--text-muted);
}

/* Custom Upload Option Full Width */
.custom-sound-row {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sound-option.custom-full {
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.upload-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: all 0.15s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0d9488);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-full {
  width: 100%;
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  flex: 1;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

.volume-value {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  min-width: 36px;
  text-align: right;
}

.status-feedback {
  font-size: 11px;
  color: var(--accent-emerald);
  min-height: 16px;
  margin-top: 4px;
}

.status-feedback.error {
  color: var(--danger-rose);
}

/* Informational Contact Card in Popup */
.contact-info-card {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 11px;
}

.contact-info-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-secondary);
}

.contact-info-list li span.email-val {
  color: var(--accent-cyan);
  font-weight: 700;
  font-family: var(--font-mono);
  -webkit-user-select: all;
  user-select: all;
}

.popup-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.popup-footer-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.credit-micro {
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================================================
   ONBOARDING & DOCUMENTATION SITE (setup.html)
   ============================================================================ */
body.setup-body {
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, #172554 0%, #0b1120 55%);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

.setup-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(11, 17, 32, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}

.setup-nav-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 700;
}

.setup-container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 36px 24px 64px;
  flex: 1;
}

.hero-banner {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.14);
  color: var(--accent-emerald);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.badge.indigo {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-indigo);
  border-color: rgba(129, 140, 248, 0.35);
}

.badge.amber {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-amber);
  border-color: rgba(251, 191, 36, 0.4);
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-lead {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 780px;
  margin-bottom: 20px;
}

.hero-credit-highlight {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border-left: 4px solid var(--accent-cyan);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title-lg {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.showcase-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.showcase-lead {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.info-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-cyan);
}

.info-card p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding-left: 22px;
  position: relative;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-emerald);
  font-weight: 700;
}

/* Soundscape Showcase Card on Setup */
.showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-soft);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.showcase-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.showcase-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.showcase-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.privacy-box {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

.privacy-box h2 {
  font-size: 22px;
  color: var(--accent-emerald);
  margin-bottom: 12px;
}

/* Informational Support & Contact Box */
.support-box {
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(251, 191, 36, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
}

.support-box h2 {
  font-size: 22px;
  color: var(--accent-amber);
  margin-bottom: 12px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.contact-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.contact-list li strong {
  color: var(--text-primary);
  min-width: 190px;
}

.email-highlight {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  -webkit-user-select: all;
  user-select: all;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.privacy-intro-text {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 14px;
}

.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.platform-pill {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.setup-footer {
  border-top: 1px solid var(--border-subtle);
  background: #070b14;
  padding: 28px 24px;
  text-align: center;
}

.setup-footer-credit {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.setup-footer-email {
  font-size: 14px;
  color: var(--accent-amber);
  font-weight: 600;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  -webkit-user-select: all;
  user-select: all;
}

.setup-footer-sub {
  font-size: 13px;
  color: var(--text-muted);
}
