/* ═══════════════════════════════════════════════════════════════
   AI HUMANIZER PRO — MAIN STYLESHEET
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg-base: #0a0a0f;
  --bg-surface: #0f0f1a;
  --bg-card: #13131f;
  --bg-card-hover: #181828;
  --bg-input: #0d0d18;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);

  --purple: #6366f1;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --cyan: #06b6d4;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --orange: #f97316;

  --text-primary: #f1f1f8;
  --text-secondary: #9494b0;
  --text-muted: #5a5a78;

  --gradient-main: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  --gradient-success: linear-gradient(135deg, #22c55e, #16a34a);
  --gradient-warning: linear-gradient(135deg, #eab308, #f97316);
  --gradient-info: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--purple);
  border-radius: 3px;
}

/* ── Utility ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ══════════════════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  display: flex;
  align-items: center;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.header-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--purple);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orb-float 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: var(--purple);
  top: -200px;
  left: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--pink);
  top: -100px;
  right: -100px;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--cyan);
  bottom: -100px;
  left: 50%;
  animation-delay: -5s;
}

@keyframes orb-float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-30px) scale(1.05);
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 32px;
  gap: 32px;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════════════════
   TOOL SECTION
══════════════════════════════════════════════════════════════ */
.tool-section {
  padding: 0 0 60px;
}

/* Mode Selector */
.mode-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.mode-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-main);
  opacity: 0;
  transition: var(--transition);
}

.mode-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.mode-btn.active {
  border-color: var(--purple);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.mode-btn.active::before {
  opacity: 0.05;
}

.mode-icon {
  font-size: 1.8rem;
  position: relative;
  z-index: 1;
}

.mode-label {
  font-size: 0.95rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.mode-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* Options Bar */
.options-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.options-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.options-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.style-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.style-pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.style-pill:hover {
  border-color: var(--purple);
  color: var(--text-primary);
}

.style-pill.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.strength-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.strength-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 160px;
  height: 4px;
  background: linear-gradient(to right, var(--purple) 0%, var(--purple) 50%, var(--border) 50%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.strength-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.strength-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.strength-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  width: 160px;
}

/* Editor Grid */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}

.editor-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.editor-panel:focus-within {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-input {
  background: var(--orange);
  box-shadow: 0 0 6px var(--orange);
}

.dot-output {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.panel-actions {
  display: flex;
  gap: 6px;
}

.panel-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.panel-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.panel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.panel-btn.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

.panel-body {
  display: flex;
  flex-direction: column;
}

.text-editor {
  width: 100%;
  min-height: 320px;
  max-height: 480px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  resize: vertical;
  padding: 16px;
  caret-color: var(--purple);
}

.text-editor::placeholder {
  color: var(--text-muted);
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.word-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ai-meter-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-meter-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ai-meter-bar-wrap {
  width: 80px;
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
}

.ai-meter-bar {
  height: 100%;
  background: var(--gradient-danger);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.ai-meter-bar.success {
  background: var(--gradient-success);
}

.ai-meter-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 28px;
}

/* Process Center */
.process-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 120px;
}

.process-btn {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--gradient-main);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
  transition: var(--transition);
  overflow: visible;
}

.process-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.6);
}

.process-btn:active {
  transform: scale(0.96);
}

.process-btn.processing {
  animation: btn-pulse 1.5s ease-in-out infinite;
}

@keyframes btn-pulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4);
  }

  50% {
    box-shadow: 0 0 60px rgba(168, 85, 247, 0.7);
  }
}

.process-btn-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 2px;
}

.process-btn-icon {
  font-size: 1.6rem;
}

.process-btn-text {
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.process-btn-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-main);
  opacity: 0.3;
  filter: blur(8px);
  z-index: -1;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

.process-spinner {
  display: none;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.process-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 80px;
  line-height: 1.4;
}

/* Output Area */
.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 12px;
  color: var(--text-muted);
  padding: 40px 20px;
  text-align: center;
}

.placeholder-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.placeholder-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.output-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
}

.output-tab {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.output-tab:hover {
  color: var(--text-primary);
}

.output-tab.active {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.output-content {
  flex: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.output-text {
  padding: 16px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-primary);
  min-height: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 280px;
}

.compare-col {
  display: flex;
  flex-direction: column;
}

.compare-col:first-child {
  border-right: 1px solid var(--border);
}

.compare-header {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.compare-text {
  padding: 14px;
  font-size: 0.88rem;
  line-height: 1.7;
  flex: 1;
}

.compare-text .changed {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 3px;
  padding: 1px 3px;
}

/* Score Strip */
.score-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.score-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: var(--transition);
}

.score-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.score-icon {
  font-size: 1.4rem;
}

.score-info {
  flex: 1;
}

.score-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.score-change {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
}

.score-gauge {
  position: relative;
  width: 48px;
  height: 48px;
}

.score-gauge svg {
  width: 48px;
  height: 48px;
}

.gauge-fill {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: conic-gradient(var(--red) 0%, var(--bg-surface) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gauge-fill.success {
  background: conic-gradient(var(--green) 0%, var(--bg-surface) 0%);
}

.gauge-fill.warning {
  background: conic-gradient(var(--yellow) 0%, var(--bg-surface) 0%);
}

.gauge-fill.info {
  background: conic-gradient(var(--cyan) 0%, var(--bg-surface) 0%);
}

.gauge-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════════
   ANALYTICS SECTION
══════════════════════════════════════════════════════════════ */
.analytics-section {
  padding: 60px 0;
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 50%, var(--bg-base) 100%);
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1rem;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.analytics-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

.analytics-card.card-wide {
  grid-column: span 2;
}

.analytics-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.analytics-card-icon {
  font-size: 1.4rem;
}

.analytics-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Detection Rings */
.detection-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 16px;
}

.detection-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.detection-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detection-ring {
  position: relative;
  width: 100px;
  height: 100px;
}

.detection-ring svg {
  width: 100px;
  height: 100px;
}

.detection-ring-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.detection-tag {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.detection-tag.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
}

.detection-tag.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

.detection-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.detection-improvement {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green);
  padding: 8px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: var(--radius-sm);
}

/* Score Bars */
.big-score {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.score-bar-wrap {
  margin-bottom: 12px;
}

.score-bar-track {
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.success-grad {
  background: var(--gradient-success);
}

.warning-grad {
  background: var(--gradient-warning);
}

.info-grad {
  background: var(--gradient-info);
}

.score-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Readability */
.readability-compare {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.read-col {
  text-align: center;
}

.read-grade {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
}

.read-grade.success {
  color: var(--green);
}

.read-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.read-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
}

/* Tone */
.tone-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tone-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--purple);
}

.tone-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tone-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tone-bar-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  width: 80px;
}

.tone-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
}

.tone-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-main);
  transition: width 1s ease;
}

.tone-bar-val {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 32px;
  text-align: right;
}

/* Struct */
.struct-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.struct-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.struct-item-label {
  color: var(--text-secondary);
}

.struct-item-val {
  font-weight: 600;
  color: var(--text-primary);
}

/* Insights */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.insight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.insight-icon {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.insight-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.insight-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.insight-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════
   FEATURES SECTION
══════════════════════════════════════════════════════════════ */
.features-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-surface);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.footer-note {
  text-align: right;
}

.footer-note p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy {
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--green);
}

.toast.error {
  border-color: var(--red);
}

/* ══════════════════════════════════════════════════════════════
   LOADING SHIMMER
══════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .process-center {
    padding-top: 0;
    flex-direction: row;
    justify-content: center;
  }

  .process-btn {
    width: 60px;
    height: 60px;
  }

  .process-btn-icon {
    font-size: 1.2rem;
  }

  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .analytics-card.card-wide {
    grid-column: span 2;
  }

  .score-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .mode-selector {
    grid-template-columns: 1fr;
  }

  .options-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-card.card-wide {
    grid-column: span 1;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .score-strip {
    grid-template-columns: 1fr 1fr;
  }

  .insights-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-nav {
    display: none;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .score-strip {
    grid-template-columns: 1fr;
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   HISTORY TOGGLE BUTTON
══════════════════════════════════════════════════════════════ */
.history-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.history-toggle-btn:hover {
  border-color: var(--purple);
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.history-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════
   HISTORY DRAWER
══════════════════════════════════════════════════════════════ */
.history-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.history-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 201;
  width: 420px;
  max-width: 95vw;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.history-drawer.open {
  transform: translateX(0);
}

.history-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.history-drawer-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.history-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.history-drawer-close:hover {
  border-color: var(--red);
  color: var(--red);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 40px 20px;
  line-height: 1.7;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}

.history-item:hover {
  border-color: var(--border-hover);
}

.history-item-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.history-mode-badge {
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: var(--purple);
  text-transform: capitalize;
}

.history-style-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  text-transform: capitalize;
}

.history-time {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-preview-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.history-preview-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.history-preview-text.output {
  color: var(--text-primary);
}

.history-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.history-stat {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.history-actions {
  display: flex;
  gap: 6px;
}

.history-restore-btn {
  color: var(--purple) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.history-restore-btn:hover {
  background: rgba(99, 102, 241, 0.1) !important;
}

/* ══════════════════════════════════════════════════════════════
   LIVE COACHING PANEL
══════════════════════════════════════════════════════════════ */
.coaching-panel {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(168, 85, 247, 0.06));
  border-top: 1px solid rgba(99, 102, 241, 0.2);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  padding: 14px 0;
  animation: slide-down 0.3s ease;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coaching-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coaching-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coaching-icon {
  font-size: 1.1rem;
}

.coaching-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple);
  flex: 1;
}

.coaching-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.coaching-close:hover {
  border-color: var(--red);
  color: var(--red);
}

.coaching-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coaching-tip {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex: 1;
  min-width: 240px;
  transition: var(--transition);
}

.coaching-tip:hover {
  border-color: var(--border-hover);
}

.coaching-tip.severity-high {
  border-left: 3px solid var(--red);
}

.coaching-tip.severity-medium {
  border-left: 3px solid var(--yellow);
}

.coaching-tip.severity-low {
  border-left: 3px solid var(--cyan);
}

.tip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
  flex-shrink: 0;
  margin-top: 5px;
}

/* ══════════════════════════════════════════════════════════════
   WORD LIMIT PROGRESS BAR
══════════════════════════════════════════════════════════════ */
.word-limit-bar-wrap {
  height: 3px;
  background: var(--bg-surface);
  overflow: hidden;
}

.word-limit-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.3s ease, background 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════
   SIMILARITY PANEL
══════════════════════════════════════════════════════════════ */
.similarity-panel {
  padding: 16px;
}

.similarity-header {
  margin-bottom: 16px;
}

.similarity-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
}

.similarity-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.similarity-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.similarity-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.similarity-sentence {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.similarity-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.similarity-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
}

.similarity-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.sim-high {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.sim-medium {
  background: linear-gradient(90deg, #eab308, #f97316);
}

.sim-low {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.similarity-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 32px;
}

.similarity-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE ADDITIONS
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .history-drawer {
    width: 100vw;
  }

  .coaching-tips {
    flex-direction: column;
  }

  .history-toggle-btn span:not(.history-count) {
    display: none;
  }
}

/* ══════════════════════════════════════════════════════════════
   OPTIONS SELECT (Language & Audience)
══════════════════════════════════════════════════════════════ */
.options-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  min-width: 130px;
}

.options-select:hover,
.options-select:focus {
  border-color: var(--purple);
  background: var(--bg-card);
}

.options-select option {
  background: var(--bg-surface);
}

/* ══════════════════════════════════════════════════════════════
   TTS BUTTON
══════════════════════════════════════════════════════════════ */
.tts-btn {
  transition: var(--transition);
}

.tts-btn.active {
  border-color: var(--purple) !important;
  color: var(--purple) !important;
  background: rgba(99, 102, 241, 0.1) !important;
  animation: tts-pulse 1.5s ease-in-out infinite;
}

@keyframes tts-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0);
  }
}

/* ══════════════════════════════════════════════════════════════
   PRIVACY BUTTON
══════════════════════════════════════════════════════════════ */
.privacy-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.privacy-btn:hover {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.08);
}

/* ══════════════════════════════════════════════════════════════
   SENTENCE EDITING
══════════════════════════════════════════════════════════════ */
.sentence-editable .sentence-span {
  cursor: pointer;
  border-radius: 3px;
  padding: 1px 2px;
  transition: background 0.15s ease;
}

.sentence-editable .sentence-span:hover {
  background: rgba(99, 102, 241, 0.15);
  outline: 1px dashed rgba(99, 102, 241, 0.4);
}

.sentence-editable .sentence-span.regenerating {
  background: rgba(99, 102, 241, 0.2);
  animation: sentence-regen 0.8s ease-in-out infinite;
}

@keyframes sentence-regen {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.sentence-edit-hint {
  padding: 8px 16px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════
   A/B VERSIONS PANEL
══════════════════════════════════════════════════════════════ */
.versions-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  animation: slide-down 0.3s ease;
}

.versions-header {
  margin-bottom: 20px;
}

.versions-header h3 {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.versions-icon {
  font-size: 1.3rem;
}

.versions-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.versions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.version-card {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.version-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.version-card.selected {
  border-color: var(--purple);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

.version-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.version-emoji {
  font-size: 1.2rem;
}

.version-label {
  font-size: 0.88rem;
  font-weight: 700;
  flex: 1;
}

.version-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.version-selected-badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.2);
  color: var(--purple);
}

.version-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  /* ✅ Bug 5 Fix: standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.version-use-btn {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.version-use-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(99, 102, 241, 0.08);
}

.version-card.selected .version-use-btn {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 900px) {
  .versions-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   WORD CLOUD SECTION
══════════════════════════════════════════════════════════════ */
.wordcloud-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
}

.wordcloud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.wordcloud-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wordcloud-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wordcloud-card canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.wc-changes {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.wc-change-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.wc-change-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wc-change-label.removed {
  color: var(--red);
}

.wc-change-label.added {
  color: var(--green);
}

.wc-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  margin: 2px;
}

.wc-tag.removed {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.wc-tag.added {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.wc-none {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .wordcloud-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   PRIVACY MODAL
══════════════════════════════════════════════════════════════ */
.privacy-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.privacy-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 420px;
  max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: modal-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.privacy-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}

.privacy-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.privacy-close:hover {
  border-color: var(--red);
  color: var(--red);
}

.privacy-modal-body {
  padding: 20px 24px;
}

.privacy-modal-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.privacy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.privacy-list li {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.privacy-note {
  color: var(--yellow) !important;
  font-weight: 500;
}

.privacy-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

.privacy-confirm-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--gradient-danger);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.privacy-confirm-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════
   AUDIENCE INDICATOR (shown in output)
══════════════════════════════════════════════════════════════ */
.audience-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
  margin-left: 8px;
}

/* ══════════════════════════════════════════════════════════════
   LIGHT MODE
══════════════════════════════════════════════════════════════ */
body.light-mode {
  color-scheme: light;
}

body.light-mode .header,
body.light-mode .editor-panel,
body.light-mode .analytics-section,
body.light-mode .score-strip {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

body.light-mode .text-editor {
  color: #0f172a;
}

body.light-mode .output-text {
  color: #1e293b;
}

/* ══════════════════════════════════════════════════════════════
   THEME TOGGLE + ACCENT PICKER
══════════════════════════════════════════════════════════════ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--purple);
  background: rgba(99, 102, 241, 0.08);
}

.accent-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.accent-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
}

.accent-dot:hover {
  transform: scale(1.3);
}

.accent-dot.active {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
  transform: scale(1.2);
}

/* ══════════════════════════════════════════════════════════════
   INTEGRATIONS TOOLBAR
══════════════════════════════════════════════════════════════ */
.integrations-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 16px;
  animation: slide-down 0.3s ease;
}

.integrations-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.integration-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.integration-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════
   AUTO-RETRY STATUS
══════════════════════════════════════════════════════════════ */
.retry-status {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-top: 12px;
  animation: slide-down 0.3s ease;
}

.retry-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.retry-text {
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════════════════
   PARAGRAPH PANEL
══════════════════════════════════════════════════════════════ */
.paragraph-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  animation: slide-down 0.3s ease;
}

.para-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.para-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

.para-icon {
  font-size: 1.2rem;
}

.para-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.para-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.para-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.para-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.para-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
  min-width: 24px;
}

.para-ai-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.para-ai-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

.para-ai-val {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 50px;
  text-align: right;
}

.para-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════════════════
   PLAGIARISM PANEL
══════════════════════════════════════════════════════════════ */
.plagiarism-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  animation: slide-down 0.3s ease;
}

.plagiarism-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.plagiarism-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

.plagiarism-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.plagiarism-text {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

mark.generic-highlight {
  background: rgba(234, 179, 8, 0.2);
  color: var(--yellow);
  border-radius: 3px;
  padding: 1px 3px;
  border-bottom: 2px solid var(--yellow);
  cursor: help;
}

/* ══════════════════════════════════════════════════════════════
   EMAIL PANEL
══════════════════════════════════════════════════════════════ */
.email-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  animation: slide-down 0.3s ease;
}

.email-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.email-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

.email-copy {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.email-copy:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.email-text {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ══════════════════════════════════════════════════════════════
   TWITTER THREAD PANEL
══════════════════════════════════════════════════════════════ */
.thread-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  animation: slide-down 0.3s ease;
}

.thread-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.thread-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

.thread-copy-all {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition);
}

.thread-copy-all:hover {
  border-color: #1da1f2;
  color: #1da1f2;
}

.thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thread-tweet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.thread-tweet-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1da1f2;
  min-width: 20px;
}

.thread-tweet-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.thread-tweet-chars {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

.thread-tweet-copy {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.thread-tweet-copy:hover {
  border-color: #1da1f2;
  color: #1da1f2;
}

/* ══════════════════════════════════════════════════════════════
   CITATION PANEL
══════════════════════════════════════════════════════════════ */
.citation-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
  animation: slide-down 0.3s ease;
}

.citation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.citation-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  flex: 1;
}

.citation-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.citation-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.citation-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.citation-format {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple);
  min-width: 55px;
  padding-top: 2px;
}

.citation-text {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-family: 'Courier New', monospace;
}

.citation-copy {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.citation-copy:hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* ══════════════════════════════════════════════════════════════
   BADGES SECTION
══════════════════════════════════════════════════════════════ */
.badges-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 100%);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.badge-card.unlocked {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.04);
}

.badge-card.unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.badge-card.locked {
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.badge-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Badge toast notification */
.badge-toast {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 280px;
}

.badge-toast.show {
  transform: translateX(0);
}

.badge-toast-icon {
  font-size: 2rem;
}

.badge-toast-title {
  font-size: 0.7rem;
  color: var(--purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-toast-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-toast-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   PROGRESS CHART SECTION
══════════════════════════════════════════════════════════════ */
.progress-chart-section {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow-x: auto;
}

.chart-card canvas {
  width: 100%;
  height: auto;
  min-width: 400px;
}

/* ═══════════════════════════════════════════════════════════════
   UPGRADE 4 — Responsive Header Fix
   ═══════════════════════════════════════════════════════════════ */

/* Tablet: hide accent picker labels, compress */
@media (max-width: 900px) {
  .header-nav {
    gap: 8px;
  }

  .accent-label {
    display: none;
  }
}

/* Mobile: hide accent picker entirely, stack header */
@media (max-width: 600px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .accent-picker {
    display: none;
  }

  .theme-toggle {
    margin-left: auto;
  }

  .header-nav {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }

  .header-nav .nav-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  /* Integrations toolbar: scroll horizontally on mobile */
  #integrations-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  #integrations-bar::-webkit-scrollbar {
    height: 3px;
  }

  #integrations-bar::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 2px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   WORD-LEVEL DIFF HIGHLIGHTING
   ═══════════════════════════════════════════════════════════════ */

/* Green highlight badge on every changed word */
mark.word-changed {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border-radius: 3px;
  padding: 1px 3px;
  border-bottom: 2px solid rgba(34, 197, 94, 0.5);
  font-style: normal;
  transition: background 0.2s, color 0.2s;
  cursor: default;
}

mark.word-changed:hover {
  background: rgba(34, 197, 94, 0.32);
  color: #86efac;
}

/* Hidden state when user toggles off */
mark.word-changed-hidden {
  background: transparent !important;
  color: inherit !important;
  border-bottom: none !important;
}

/* Diff legend bar — shows "X words changed (Y%)" */
.diff-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 8px;
  margin: 0 0 12px 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.diff-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: pulse-green 2s ease-in-out infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }


  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.diff-legend-text strong {
  color: #4ade80;
}

.diff-legend-toggle {
  margin-left: auto;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.diff-legend-toggle:hover {
  background: rgba(34, 197, 94, 0.22);
}

/* ═══════════════════════════════════════════════════════════════
   MAXIMUM TRANSFORMATION MODE UI
   ═══════════════════════════════════════════════════════════════ */

.max-transform-panel {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.max-transform-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.max-transform-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 0 8px rgba(255, 230, 0, 0.5));
  animation: flicker 3s infinite;
}

@keyframes flicker {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.8;
  }
}

.max-transform-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.max-transform-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.max-transform-badges {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.mtb {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.max-transform-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.mts {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.mts-num {
  background: var(--purple);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
  color: #fff;
}

/* Strength Slider Max Label */
.strength-label-max {
  color: #a855f7;
  font-weight: 700;
  transition: all 0.3s;
}

.strength-label-max--active {
  color: #ec4899;
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
  transform: scale(1.1);
}

/* Maximum Mode Analytics Card */
.max-analytics-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #a855f7;
}

.mac-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.mac-icon {
  font-size: 1.2rem;
}

.mac-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.mac-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mac-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mac-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.mac-value {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.mac-high {
  color: #22c55e;
}

.mac-low {
  color: #4ade80;
}


.diff-legend-text strong {
  color: #4ade80;
}

.diff-legend-toggle {
  margin-left: auto;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.diff-legend-toggle:hover {
  background: rgba(34, 197, 94, 0.22);
}

/* ══════════════════════════════════════════════════════════════
   ADVANCED PRO METRICS
══════════════════════════════════════════════════════════════ */
.pro-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 10px 0;
}

.pro-metric-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-metric-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pro-info-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  cursor: help;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.pro-metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pro-metric-bar-wrap {
  height: 8px;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pro-metric-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 
   INTERACTIVE SMART EDIT (SYNONYN POPOVER)
- */
.synonym-popover {
  position: absolute;
  z-index: 10000;
  background: rgba(30, 30, 40, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 12px;
  width: 220px;
  animation: popIn 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  pointer-events: all;
  color: white;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.synonym-popover-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.synonym-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.synonym-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eee;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.synonym-btn:hover {
  background: #7c3aed;
  transform: translateX(4px);
  color: white;
}

.synonym-applied {
  background-color: rgba(255, 255, 0, 0.2) !important;
  border-bottom: 2px solid #7c3aed;
}

.word-changed {
  cursor: pointer;
  transition: all 0.3s ease;
}

.word-changed:hover {
  background-color: #2e7d32 !important;
  color: white !important;
  text-decoration: underline dotted;
}


.strength-label--active {
  color: #818cf8 !important;
  font-weight: 700 !important;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 7 — FINAL SAAS POLISH & VISUAL EXCELLENCE
   ═══════════════════════════════════════════════════════════════ */

/* Premium Glassmorphism for Inputs */
.options-input {
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.options-input:focus {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: var(--purple) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Smooth Fade-In for Output Tabs */
.tab-content-active {
  animation: fadeSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success Flourish for Analytics Cards */
.mac-glow {
  position: relative;
}

.mac-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  z-index: -1;
  opacity: 0.3;
  filter: blur(8px);
  animation: breathe-glow 4s ease-in-out infinite;
}

@keyframes breathe-glow {

  0%,
  100% {
    opacity: 0.2;
    filter: blur(6px);
  }

  50% {
    opacity: 0.4;
    filter: blur(10px);
  }
}

/* Writing Coach Hint Pulse */
.coaching-pulse {
  animation: soft-pulse 2.5s ease-in-out infinite;
}

@keyframes soft-pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(99, 102, 241, 0);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
  }
}

/* Tab Switch Highlight */
.tab-btn.active {
  position: relative;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--purple);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--purple);
}

/* ══════════════════════════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════════════════════════ */
.progress-container {
  width: 100%;
  max-width: 320px;
  margin: 16px auto 0;
  text-align: center;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.2s ease;
}

.progress-status {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  min-height: 1.2em;
}