/* ═══════════════════════════════════════════════════════════════════
   PVSoft Screen Recorder - In-App WebView Stylesheet
   (Seamless Mobile Integration - No Web Header)
   ═══════════════════════════════════════════════════════════════════ */

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

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

:root {
  /* Surface & Base Palette */
  --bg-deep: #0a0d14;
  --bg-surface: #121824;
  --bg-card: rgba(22, 29, 44, 0.85);
  --bg-card-hover: #192233;
  --bg-card-active: #1d273b;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-highlight: rgba(255, 255, 255, 0.14);
  --border-active: rgba(37, 99, 235, 0.45);

  /* Typography Colors */
  --text-white: #ffffff;
  --text-title: #f1f5f9;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Vibrant Category Gradient Badges */
  --grad-red: linear-gradient(135deg, #ef4444, #f97316);
  --grad-purple: linear-gradient(135deg, #8b5cf6, #ec4899);
  --grad-blue: linear-gradient(135deg, #2563eb, #06b6d4);
  --grad-emerald: linear-gradient(135deg, #10b981, #14b8a6);
  --grad-amber: linear-gradient(135deg, #f59e0b, #ef4444);
  --grad-cyan: linear-gradient(135deg, #06b6d4, #3b82f6);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);

  /* Smooth Timing */
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --speed: 0.22s;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 15% 0%, rgba(239, 68, 68, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(139, 92, 246, 0.07) 0%, transparent 45%);
  background-attachment: fixed;
  color: var(--text-body);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  padding-top: 6px;
}

/* ─── Search & Category Bar (Starts at very top of in-app webview) ─ */
.filter-wrapper {
  max-width: 760px;
  margin: 8px auto 0;
  padding: 0 16px;
  width: 100%;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2px 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--speed) var(--ease);
}

.search-input-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.25);
  background: #192233;
}

.search-icon-svg {
  color: var(--text-dim);
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.search-input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14px;
  padding: 10px 0;
  font-family: inherit;
}

.search-input-box input::placeholder {
  color: var(--text-dim);
}

.search-clear-action {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: background var(--speed) var(--ease);
}

.search-clear-action:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Horizontal Scrollable Category Chips */
.category-scroll-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-scroll-strip::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  user-select: none;
}

.category-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-title);
  border-color: var(--border-highlight);
}

.category-chip.active {
  background: rgba(37, 99, 235, 0.18);
  border-color: #2563eb;
  color: #93c5fd;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

/* ─── Main Content Deck ───────────────────────────────────────── */
.content-deck {
  flex: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 16px 40px;
  width: 100%;
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Premium FAQ Card (Identifier Style) ─────────────────────── */
.faq-card-item {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.faq-card-item:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

.faq-card-item.is-open {
  border-color: var(--border-active);
  background: var(--bg-card-active);
  box-shadow: var(--shadow-md);
}

.faq-card-trigger {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

/* Glowing Category Icon Badge */
.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.icon-badge.red { background: var(--grad-red); box-shadow: 0 3px 12px rgba(239, 68, 68, 0.35); }
.icon-badge.purple { background: var(--grad-purple); box-shadow: 0 3px 12px rgba(139, 92, 246, 0.35); }
.icon-badge.blue { background: var(--grad-blue); box-shadow: 0 3px 12px rgba(59, 130, 246, 0.35); }
.icon-badge.emerald { background: var(--grad-emerald); box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35); }
.icon-badge.amber { background: var(--grad-amber); box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35); }
.icon-badge.cyan { background: var(--grad-cyan); box-shadow: 0 3px 12px rgba(6, 182, 212, 0.35); }

.faq-title-col {
  flex: 1;
  min-width: 0;
}

.category-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.faq-title-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-title);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.faq-chevron-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--speed) var(--ease), background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.faq-card-item.is-open .faq-chevron-wrap {
  transform: rotate(180deg);
  background: var(--grad-red);
  color: #ffffff;
  border-color: transparent;
}

/* Modern Zero-Lag Smooth CSS Accordion */
.faq-collapsible-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s var(--ease);
}

.faq-card-item.is-open .faq-collapsible-wrapper {
  grid-template-rows: 1fr;
}

.faq-collapsible-inner {
  overflow: hidden;
}

.faq-answer-box {
  padding: 0 16px 16px 16px;
}

.faq-answer-divider {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
}

.faq-answer-divider strong {
  color: #ffffff;
  font-weight: 600;
}

.faq-answer-divider code {
  background: #06090e;
  padding: 2px 6px;
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #38bdf8;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ─── DISTINCT User Guide Manual Card (How-To Tutorial Style) ──── */
.guide-manual-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.guide-manual-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
}

.guide-badge-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.guide-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
}

.guide-pill-tag.red { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.guide-pill-tag.purple { background: rgba(139, 92, 246, 0.15); color: #d8b4fe; border-color: rgba(139, 92, 246, 0.3); }
.guide-pill-tag.blue { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(59, 130, 246, 0.3); }
.guide-pill-tag.emerald { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
.guide-pill-tag.amber { background: rgba(245, 158, 11, 0.15); color: #fde68a; border-color: rgba(245, 158, 11, 0.3); }
.guide-pill-tag.cyan { background: rgba(6, 182, 212, 0.15); color: #a5f3fc; border-color: rgba(6, 182, 212, 0.3); }

.guide-time-est {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
}

.guide-header-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.guide-heading-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.35;
  margin-bottom: 4px;
}

.guide-desc-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.guide-app-path {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed var(--border-highlight);
  font-size: 11.5px;
  color: #38bdf8;
  font-weight: 500;
  margin-bottom: 14px;
}

/* Step-by-Step Vertical Timeline */
.guide-timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 6px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.guide-timeline-step {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 14px;
}

.guide-timeline-step:last-child {
  padding-bottom: 0;
}

.guide-timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 12px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.step-node-badge {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #3b82f6;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.step-content-col {
  flex: 1;
  padding-top: 2px;
}

.step-content-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
}

.step-content-desc {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.55;
}

.step-content-desc strong {
  color: #fff;
}

.pro-tip-callout {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  font-size: 12.5px;
  color: #fbbf24;
  line-height: 1.5;
}

/* ─── Compact Feedback Drawer ─────────────────────────────────── */
.feedback-card-drawer {
  margin-top: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 16px;
}

.drawer-trigger-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.drawer-title-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-title);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-form-body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.form-field-input, .form-field-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0c1018;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--speed) var(--ease);
}

.form-field-input:focus, .form-field-textarea:focus {
  border-color: #ef4444;
}

.form-field-textarea {
  min-height: 85px;
  resize: vertical;
}

.btn-send-feedback {
  align-self: flex-start;
  padding: 9px 22px;
  border-radius: 10px;
  background: var(--grad-red);
  border: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
  transition: opacity var(--speed) var(--ease);
}

.btn-send-feedback:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toast Notice */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: popIn 0.2s var(--ease);
  white-space: nowrap;
}

.toast-notice.success {
  background: #064e3b;
  border: 1px solid #10b981;
  color: #6ee7b7;
}

.toast-notice.error {
  background: #7f1d1d;
  border: 1px solid #ef4444;
  color: #fca5a5;
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ─── Compact In-App Footer ───────────────────────────────────── */
.app-footer-compact {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.app-footer-compact a {
  color: var(--text-muted);
}
