@import url('fonts/fonts.css');

:root {
  --heading: #0f172a;
  --body: #475569;
  --muted: #64748b;
  --brand-blue: #2563eb;
  --brand-violet: #7c3aed;
  --brand-gradient: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
  --badge-bg: #eff6ff;
  --badge-border: #bfdbfe;
  --badge-text: #1d4ed8;
  --card-bg: rgba(255, 255, 255, 0.88);
  --card-border: #e2e8f0;
  --surface-alt: #f8fafc;
  --surface-hover: #f1f5f9;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font-heading: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

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

body {
  font-family: var(--font-body);
  background-color: #ffffff;
  color: var(--body);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Atmospheric Mesh Glow */
.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 10%, rgba(169, 214, 245, 0.55) 0%, transparent 45%),
    radial-gradient(circle at 88% 12%, rgba(227, 201, 243, 0.45) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(239, 246, 255, 0.6) 0%, transparent 60%);
  filter: blur(60px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 64px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-logo-icon {
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text .navy { color: var(--heading); }
.brand-text .gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--body);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--brand-blue);
}

.tests-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 9999px;
  color: var(--badge-text) !important;
  font-size: 0.78rem;
  font-weight: 600;
}

.tests-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem 1.5rem;
}

/* Hero */
.hero-section {
  margin-bottom: 1.25rem;
}

.hero-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-flex;
  padding: 3px 9px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 9999px;
  color: var(--badge-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.privacy-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: #15803d;
  font-weight: 500;
}

.hero-h1 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.hero-h1 .gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subline {
  color: var(--body);
  font-size: 0.95rem;
  max-width: 860px;
  line-height: 1.45;
}

/* Buttons & Inputs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  opacity: 0.93;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--card-border);
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  border-radius: 5px;
}

.btn-danger-hover:hover {
  color: #dc2626;
  border-color: #fca5a5;
  background: #fef2f2;
}

/* Workspace */
.workspace-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Toolbar */
.toolbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--card-border);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.view-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.view-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.view-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--body);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-tab:hover {
  background: rgba(241, 245, 249, 0.8);
  color: var(--heading);
}

.view-tab.active {
  background: #ffffff;
  color: var(--brand-blue);
  border-color: var(--card-border);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Options Drawer */
.options-drawer {
  display: none;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
}

.options-drawer.open {
  display: block;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.drawer-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--heading);
}

.drawer-badge {
  font-size: 0.72rem;
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 600;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.option-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.option-item:hover {
  border-color: #cbd5e1;
}

.option-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--brand-blue);
  width: 15px;
  height: 15px;
}

.option-content {
  display: flex;
  flex-direction: column;
}

.option-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--heading);
}

.option-desc {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}

.option-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
}

.select-clean {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  color: var(--heading);
}

/* Split Panes */
.split-container {
  display: flex;
  min-height: 540px;
  position: relative;
  transition: all 0.2s ease;
}

.split-container.is-focus-mode {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #ffffff;
  height: 100vh;
  margin: 0;
}

.pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-left {
  flex: 1 1 50%;
  min-width: 280px;
}

.pane-right {
  flex: 1 1 50%;
  min-width: 280px;
  background: #fafcff;
}

.split-divider {
  width: 9px;
  background: #f1f5f9;
  border-left: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  cursor: col-resize;
  position: relative;
  user-select: none;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.split-divider:hover, .split-divider:active {
  background: #dbeafe;
}

.divider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 24px;
  background: #94a3b8;
  border-radius: 2px;
}

.pane-header {
  padding: 0.55rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--card-border);
  background: #ffffff;
  gap: 0.5rem;
}

.pane-title-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pane-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--heading);
}

.stat-badge {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pane-body {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--heading);
  background: transparent;
}

.output-preview {
  flex: 1;
  width: 100%;
  height: 100%;
  padding: 1rem;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--heading);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Drop scrim */
.drop-scrim {
  position: absolute;
  inset: 0;
  background: rgba(37, 99, 235, 0.08);
  backdrop-filter: blur(2px);
  border: 2px dashed var(--brand-blue);
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
  color: var(--brand-blue);
  font-weight: 700;
}

.pane-left.dragover .drop-scrim {
  display: flex;
}

/* AI Chunks View */
.chunks-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0.75rem;
  gap: 0.65rem;
}

.chunks-config-bar {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chunk-slider-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.chunk-slider-group input[type="range"] {
  accent-color: var(--brand-blue);
}

.chunks-cards-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chunk-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.chunk-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.chunk-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-blue);
  background: var(--badge-bg);
  padding: 2px 7px;
  border-radius: 4px;
}

.chunk-card-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--body);
  max-height: 140px;
  overflow-y: auto;
  background: #f8fafc;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #edf2f7;
  white-space: pre-wrap;
}

/* Speaker Analytics Panel */
.speaker-analytics-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
}

.speaker-chart-box {
  margin-bottom: 1.25rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}

.speaker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.speaker-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--card-border);
  color: var(--heading);
  font-weight: 600;
  background: #f8fafc;
}

.speaker-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--body);
}

.speaker-rename-input {
  width: 180px;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  border: 1px solid var(--card-border);
  border-radius: 4px;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.82rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.toast-notification.show {
  display: flex;
}

.btn-toast-action {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-weight: 700;
  cursor: pointer;
}

/* SEO Guide */
.seo-guide-section {
  margin-top: 2rem;
}

.guide-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.guide-card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--heading);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.guide-card h2:first-child {
  margin-top: 0;
}

.guide-card p {
  font-size: 0.94rem;
  color: var(--body);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.features-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.feature-item {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.25rem;
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.feature-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.feature-item p {
  font-size: 0.86rem;
  color: var(--body);
  margin-bottom: 0;
  line-height: 1.5;
}

.guide-steps {
  margin: 1rem 0 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
}

.guide-steps li {
  line-height: 1.55;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.faq-item {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 1.15rem;
}

.faq-item h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.faq-item p {
  font-size: 0.88rem;
  color: var(--body);
  margin-bottom: 0;
  line-height: 1.55;
}

/* Modal */
.modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 480px;
  width: 90vw;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading);
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--body);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--heading);
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
}

.footer-brand .navy { color: var(--heading); }
.footer-brand .gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-desc {
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-right a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.84rem;
  transition: color 0.15s ease;
}

.footer-right a:hover {
  color: var(--brand-blue);
}

/* Responsive */
@media (max-width: 900px) {
  .split-container {
    flex-direction: column;
    min-height: auto;
  }
  .split-divider {
    display: none;
  }
  .pane-left, .pane-right {
    min-height: 380px;
  }
}


/* Ambient Viewport Floating Mesh Blobs */
.blob-bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  transition: all 0.5s ease;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0) 70%);
  top: -100px;
  left: -100px;
  animation: blob-float-1 25s infinite alternate ease-in-out;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(14, 165, 233, 0) 70%);
  bottom: -150px;
  right: -150px;
  animation: blob-float-2 28s infinite alternate ease-in-out;
}

.blob-3 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, rgba(244, 63, 94, 0) 70%);
  top: 40%;
  right: 15%;
  animation: blob-float-3 22s infinite alternate ease-in-out;
}

.blob-4 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(20, 184, 166, 0) 70%);
  bottom: 10%;
  left: 20%;
  animation: blob-float-4 30s infinite alternate ease-in-out;
}

@keyframes blob-float-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 80px) scale(1.1); }
  100% { transform: translate(50px, 150px) scale(0.95); }
}

@keyframes blob-float-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-100px, -90px) scale(1.08); }
  100% { transform: translate(-140px, -40px) scale(0.92); }
}

@keyframes blob-float-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, 110px) scale(1.15); }
  100% { transform: translate(-120px, -60px) scale(0.9); }
}

@keyframes blob-float-4 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(90px, -120px) scale(1.05); }
  100% { transform: translate(140px, 60px) scale(0.95); }
}

