/* =============================================
   ROOT DESIGN TOKENS — LIGHT THEME (DEFAULT)
   ============================================= */
:root,
[data-theme="light"] {
  --color-bg: transparent;
  --color-surface: rgba(255, 255, 255, 0.72);
  --color-surface-2: rgba(238, 240, 249, 0.75);
  --color-surface-3: rgba(228, 230, 245, 0.75);
  --color-border: rgba(99, 102, 241, 0.18);
  --color-border-hover: rgba(99, 102, 241, 0.42);

  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-secondary: #8b5cf6;
  --color-accent: #06b6d4;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.75) 0%, rgba(248, 249, 255, 0.65) 100%);
  --gradient-hero: transparent;

  --color-text-primary: #1e1b4b;
  --color-text-secondary: #4338ca;
  --color-text-body: #374151;
  --color-text-muted: #5b6070;

  --color-success: #059669;
  --color-error: #dc2626;
  --color-warning: #d97706;

  --shadow-sm: 0 1px 3px rgba(99, 102, 241, 0.10);
  --shadow-md: 0 4px 24px rgba(99, 102, 241, 0.14);
  --shadow-lg: 0 8px 48px rgba(99, 102, 241, 0.18);
  --shadow-glow: 0 0 32px rgba(99, 102, 241, 0.16);
  --shadow-glow-strong: 0 0 56px rgba(99, 102, 241, 0.26);

  --header-bg: rgba(255, 255, 255, 0.55);
  --header-border: rgba(99, 102, 241, 0.14);
  --card-bg: rgba(255, 255, 255, 0.65);
  --input-bg: rgba(255, 255, 255, 0.55);
  --input-bg-focus: rgba(255, 255, 255, 0.9);
  --select-option-bg: #ffffff;
  --footer-bg: rgba(255, 255, 255, 0.45);
}

/* =============================================
   DARK THEME
   ============================================= */
[data-theme="dark"] {
  --color-bg: transparent;
  --color-surface: rgba(10, 10, 25, 0.60);
  --color-surface-2: rgba(15, 15, 35, 0.65);
  --color-surface-3: rgba(22, 22, 48, 0.70);
  --color-border: rgba(99, 102, 241, 0.22);
  --color-border-hover: rgba(99, 102, 241, 0.50);

  --gradient-card: linear-gradient(145deg, rgba(99, 102, 241, 0.10) 0%, rgba(139, 92, 246, 0.06) 100%);
  --gradient-hero: transparent;

  --color-text-primary: #eeeeff;
  --color-text-secondary: #a5b4fc;
  --color-text-body: #94a3b8;
  --color-text-muted: #64748b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 56px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 44px rgba(99, 102, 241, 0.28);
  --shadow-glow-strong: 0 0 70px rgba(99, 102, 241, 0.45);

  --header-bg: rgba(6, 4, 20, 0.50);
  --header-border: rgba(99, 102, 241, 0.22);
  --card-bg: rgba(10, 10, 28, 0.60);
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-bg-focus: rgba(255, 255, 255, 0.10);
  --select-option-bg: #12102a;
  --footer-bg: rgba(6, 4, 20, 0.45);
}

/* =============================================
   SHARED TOKEN ALIASES
   ============================================= */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 150ms ease;
  --transition-normal: 260ms ease;
  --transition-slow: 420ms ease;

  --max-width: 920px;
  --header-height: 64px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =============================================
   FULL-PAGE ANIMATED GRADIENT BACKGROUND
   One unified gradient for the entire website
   ============================================= */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  min-height: 100%;
  /* Light mode animated gradient */
  background: linear-gradient(-45deg,
      #dde1ff,
      #ede8ff,
      #d8f0ff,
      #e8d8ff,
      #d8f5f0,
      #e4d8ff);
  background-size: 500% 500%;
  animation: siteGradient 20s ease infinite;
  transition: none;
}

/* Dark mode: data-theme is on html itself */
html[data-theme="dark"] {
  background: linear-gradient(-45deg,
      #060614,
      #0d0820,
      #04101e,
      #0a0418,
      #050f12,
      #080420);
  background-size: 500% 500%;
  animation: siteGradient 20s ease infinite;
}

@keyframes siteGradient {
  0% {
    background-position: 0% 50%;
  }

  25% {
    background-position: 50% 0%;
  }

  50% {
    background-position: 100% 50%;
  }

  75% {
    background-position: 50% 100%;
  }

  100% {
    background-position: 0% 50%;
  }
}

body {
  font-family: var(--font-sans);
  background: transparent;
  /* let html gradient show through */
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color var(--transition-slow);
}

/* =============================================
   ANIMATED BACKGROUND ORBS (DARK ONLY)
   ============================================= */
.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

[data-theme="dark"] .bg-orbs {
  opacity: 1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  animation: orbFloat 22s infinite ease-in-out;
}

.orb-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, #6366f1, transparent 70%);
  top: -220px;
  left: -120px;
  animation-duration: 28s;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  top: 38%;
  right: -160px;
  animation-duration: 32s;
  animation-delay: -11s;
}

.orb-3 {
  width: 430px;
  height: 430px;
  background: radial-gradient(circle, #06b6d4, transparent 70%);
  bottom: -120px;
  left: 28%;
  animation-duration: 21s;
  animation-delay: -6s;
}

@keyframes orbFloat {

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

  25% {
    transform: translate(35px, -55px) scale(1.06);
  }

  50% {
    transform: translate(-25px, 35px) scale(0.94);
  }

  75% {
    transform: translate(45px, 22px) scale(1.03);
  }
}

/* Particle dots (light mode subtle decoration) */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.12;
  animation: particleDrift 18s infinite ease-in-out;
}

.bg-particles span:nth-child(1) {
  top: 10%;
  left: 5%;
  animation-duration: 20s;
}

.bg-particles span:nth-child(2) {
  top: 20%;
  left: 80%;
  animation-duration: 25s;
  animation-delay: -3s;
}

.bg-particles span:nth-child(3) {
  top: 50%;
  left: 15%;
  animation-duration: 22s;
  animation-delay: -7s;
}

.bg-particles span:nth-child(4) {
  top: 70%;
  left: 90%;
  animation-duration: 19s;
  animation-delay: -12s;
}

.bg-particles span:nth-child(5) {
  top: 85%;
  left: 45%;
  animation-duration: 28s;
  animation-delay: -2s;
}

.bg-particles span:nth-child(6) {
  top: 35%;
  left: 60%;
  animation-duration: 24s;
  animation-delay: -9s;
}

.bg-particles span:nth-child(7) {
  top: 60%;
  left: 30%;
  animation-duration: 17s;
  animation-delay: -15s;
}

.bg-particles span:nth-child(8) {
  top: 15%;
  left: 50%;
  animation-duration: 30s;
  animation-delay: -4s;
}

.bg-particles span:nth-child(9) {
  top: 40%;
  left: 75%;
  animation-duration: 23s;
  animation-delay: -8s;
}

.bg-particles span:nth-child(10) {
  top: 80%;
  left: 10%;
  animation-duration: 21s;
  animation-delay: -18s;
}

[data-theme="dark"] .bg-particles span {
  opacity: 0.25;
}

@keyframes particleDrift {

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

  50% {
    transform: translateY(-40px) scale(1.6);
    opacity: 0.05;
  }
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--header-bg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--header-border);
  display: flex;
  align-items: center;
  transition: background var(--transition-slow), border-color var(--transition-slow), box-shadow var(--transition-slow);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-icon {
  flex-shrink: 0;
  transition: transform var(--transition-normal);
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.3));
}

.logo:hover .logo-icon {
  transform: rotate(-6deg) scale(1.08);
}

/* Logo image sizing */
.logo-img {
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.logo-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
}

.logo-badge {
  position: relative;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.8px;
  color: #fff;
  background: linear-gradient(110deg,
      #f59e0b 0%,
      #fbbf24 25%,
      #f97316 50%,
      #fbbf24 75%,
      #f59e0b 100%);
  background-size: 250% 100%;
  padding: 3px 9px 3px 8px;
  border-radius: var(--radius-full);
  box-shadow:
    0 0 10px rgba(251, 191, 36, 0.5),
    0 0 20px rgba(249, 115, 22, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.2);
  animation: proBadgeShimmer 2.6s linear infinite, proBadgeFloat 3s ease-in-out infinite;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  user-select: none;
}

/* Shimmer sweep overlay */
.logo-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
      transparent 30%,
      rgba(255, 255, 255, 0.45) 50%,
      transparent 70%);
  background-size: 200% 100%;
  animation: badgeSweep 2.2s ease-in-out infinite;
  border-radius: inherit;
}

@keyframes proBadgeShimmer {
  0% {
    background-position: 100% 0;
  }

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

@keyframes badgeSweep {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes proBadgeFloat {

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

  50% {
    transform: translateY(-2px);
  }
}

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

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* =============================================
   HEADER NAV LINKS — Full Listing / Item Specifics
   ============================================= */
.nav-link {
  position: relative;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  letter-spacing: 0.1px;
}

/* Animated underline glow sweep */
.nav-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.45s ease;
  border-radius: inherit;
}

.nav-link:hover::before {
  transform: translateX(100%);
}

.nav-link:hover {
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.30);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
}

.nav-link i {
  transition: transform 0.25s ease;
}

.nav-link:hover i {
  transform: scale(1.25) rotate(-8deg);
}

/* Theme Toggle — glowing sun/moon pill */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.10));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  border-radius: inherit;
}

.theme-toggle:hover::before {
  transform: translateX(100%);
}

.theme-toggle:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.18));
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.theme-toggle i {
  transition: transform 0.4s ease;
}

.theme-toggle:hover i {
  transform: rotate(22deg) scale(1.2);
}

/* Icon visibility */
[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="light"] .icon-moon {
  display: inline;
}

[data-theme="dark"] .icon-sun {
  display: inline;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* =============================================
   HERO (COMPACT)
   ============================================= */
.hero {
  position: relative;
  z-index: 1;
  padding: 36px 24px 30px;
  text-align: center;
  background: transparent;
  /* gradient shows through */
  border-bottom: 1px solid rgba(99, 102, 241, 0.12);
  overflow: hidden;
}

/* Floating orbs behind hero */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}

.hero::before {
  width: 520px;
  height: 520px;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  animation: heroOrbFloat 8s ease-in-out infinite alternate;
}

.hero::after {
  width: 300px;
  height: 300px;
  bottom: -40px;
  right: 15%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  animation: heroOrbFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroOrbFloat {
  from {
    transform: translateX(-50%) translateY(0);
  }

  to {
    transform: translateX(-50%) translateY(-24px);
  }
}

.hero-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

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

/* AI-Powered badge — simple professional glow pulse */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  background: rgba(99, 102, 241, 0.07);
  border: 1.5px solid rgba(99, 102, 241, 0.35);
  cursor: default;
  animation: heroIn 0.6s 0.1s ease both, badgeGlow 3s 0.8s ease-in-out infinite;
}

@keyframes badgeGlow {

  0%,
  100% {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: none;
  }

  50% {
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.18);
  }
}

/* Static dot */
.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  opacity: 0.85;
}


/* Hero title — staggered word entrances */
.hero-title {
  font-size: clamp(24px, 4.2vw, 50px);
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: -1.5px;
  color: var(--color-text-primary);
  margin: 0 auto 16px;
  padding: 0 12px;
  text-align: center;
  white-space: nowrap;
  display: block;
}

@media (max-width: 640px) {
  .hero-title {
    white-space: normal;
    font-size: clamp(22px, 8vw, 34px);
    letter-spacing: -0.8px;
    padding: 0 8px;
  }
}

/* Each word has staggered slide-up entrance */
.hero-title span {
  display: inline-block;
  opacity: 0;
  animation: wordRise 0.7s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
}

.hero-word-plain:nth-child(1) {
  animation-delay: 0.25s;
}

.hero-word-gradient {
  animation-delay: 0.40s;
}

.hero-word-accent {
  animation-delay: 0.55s;
}

.hero-word-plain:nth-child(4) {
  animation-delay: 0.70s;
}

@keyframes wordRise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.92);
  }

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

/* Gradient shimmer on "Perfect eBay" */
.hero-word-gradient {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4, #f59e0b, #6366f1);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: wordRise 0.7s 0.40s cubic-bezier(0.34, 1.3, 0.64, 1) forwards,
    titleShimmer 4s 1.1s linear infinite;
}

/* Neon accent glow on "Listings" */
.hero-word-accent {
  background: linear-gradient(90deg, #06b6d4, #8b5cf6, #6366f1);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(99, 102, 241, 0.45));
  animation: wordRise 0.7s 0.55s cubic-bezier(0.34, 1.3, 0.64, 1) forwards,
    titleShimmer 5s 1.2s linear infinite reverse,
    accentGlow 3s 1.2s ease-in-out infinite;
}

@keyframes accentGlow {

  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
  }

  50% {
    filter: drop-shadow(0 0 28px rgba(99, 102, 241, 0.7));
  }
}

@keyframes titleShimmer {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 300% center;
  }
}

/* Subtitle fade up */
.hero-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-body);
  line-height: 1.65;
  margin: 0 auto;
  max-width: 560px;
  text-align: center;
  opacity: 0;
  animation: heroIn 0.8s 0.9s ease forwards;
}

.hero-subtitle-line2 {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 6px;
  line-height: 1.65;
  opacity: 0;
  animation: heroIn 0.8s 1.05s ease forwards;
}

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 52px 24px 90px;
}

/* =============================================
   SECTION STRUCTURE
   ============================================= */
.generator-section {
  margin-bottom: 44px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.section-number {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 3px;
}

.section-title {
  font-size: 21px;
  font-weight: 900;
  color: var(--color-text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 44px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border), transparent);
}

.divider-icon {
  font-size: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius-full);
  transition: transform var(--transition-normal);
}

.section-divider:hover .divider-icon {
  transform: rotate(15deg) scale(1.1);
}

/* Hidden helper */
.hidden {
  display: none !important;
}

/* Slide-in animation for revealed sections */
#specifics-wrapper.revealed {
  animation: fadeSlideIn 0.55s ease;
}

#specifics-wrapper.hidden {
  animation: none;
}

.output-container.revealed {
  animation: fadeSlideIn 0.4s ease;
}

/* Product context banner */
.context-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 20px;
  transition: border-color var(--transition-fast);
}

.context-banner:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.context-icon {
  font-size: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.context-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.context-label {
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.context-value {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 13px;
}

/* =============================================
   CARD
   ============================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

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

.card:hover::before {
  opacity: 1;
}

/* =============================================
   FORM ELEMENTS
   ============================================= */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.label-icon {
  font-size: 12px;
  color: var(--color-primary);
}

.label-required {
  color: var(--color-error);
  font-weight: 800;
}

.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}

.form-textarea,
.form-select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-slow), color var(--transition-slow);
  outline: none;
}

.form-textarea {
  padding: 13px 15px;
  resize: vertical;
  min-height: 130px;
}

.form-textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 0.55;
  font-size: 13px;
}

.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
  background: var(--input-bg-focus);
}

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

.form-row>.form-group {
  margin-bottom: 0;
}

.select-wrapper {
  position: relative;
}

.form-select {
  padding: 12px 36px 12px 13px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.form-select option {
  background: var(--select-option-bg);
  color: var(--color-text-primary);
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  font-size: 11px;
}

.char-counter,
.tags-count {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 5px;
  font-family: var(--font-mono);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.1px;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.12), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 5px 22px rgba(99, 102, 241, 0.38);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(99, 102, 241, 0.48);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: white;
  box-shadow: 0 5px 22px rgba(139, 92, 246, 0.38);
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(139, 92, 246, 0.48);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.btn.loading .btn-loader {
  display: block;
}

.btn.loading .btn-icon {
  display: none;
}

.btn.loading .btn-text::after {
  content: "…";
}

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

/* AI Disclaimer — plain small muted text, no box */
.ai-disclaimer {
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  opacity: 0.7;
  margin-bottom: 12px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.ai-disclaimer .fa-circle-exclamation {
  font-size: 10px;
  opacity: 0.75;
  margin-right: 3px;
}

/* =============================================
   OUTPUT CONTAINERS
   ============================================= */
.output-container {
  margin-top: 22px;
  background: var(--card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color var(--transition-normal), background var(--transition-slow), box-shadow var(--transition-normal);
}

.output-container.has-content {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-glow);
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(99, 102, 241, 0.04);
}

.output-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.output-title .fa-file-lines,
.output-title .fa-tags {
  color: var(--color-primary);
}

/* Web Enriched badge */
.web-enriched-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--color-accent);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  animation: fadeSlideIn 0.4s ease;
  text-transform: uppercase;
  cursor: help;
}

.output-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.action-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.action-btn:active {
  transform: scale(0.96) translateY(0);
}

.action-btn-danger:hover {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--color-error);
}

/* Output body */
.output-body {
  padding: 22px;
  min-height: 150px;
}

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 120px;
  color: var(--color-text-muted);
  text-align: center;
}

.placeholder-icon {
  font-size: 36px;
  opacity: 0.3;
  margin-bottom: 6px;
  color: var(--color-primary);
}

.output-placeholder p {
  font-size: 13px;
  font-weight: 600;
}

.placeholder-hint {
  font-size: 11px !important;
  opacity: 0.6;
}

/* =============================================
   GENERATED CONTENT STYLES
   ============================================= */
.suggested-category-breadcrumb {
  font-size: 13px;
  color: var(--color-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.suggested-category-breadcrumb i {
  font-size: 14px;
}

.generated-content {
  animation: fadeSlideIn 0.4s ease;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

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

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

.listing-section-block {
  margin-bottom: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 0;
}

.listing-section-block:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.listing-section-block:last-child {
  border-bottom: none;
}

/* Title section special styling */
.listing-section-title-block {
  background: rgba(99, 102, 241, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.15) !important;
  border-radius: var(--radius-lg);
  margin-bottom: 16px !important;
  padding: 18px 20px !important;
}

[data-theme="dark"] .listing-section-title-block {
  background: rgba(99, 102, 241, 0.06);
}

.listing-section-heading {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.listing-section-heading .fa-solid {
  font-size: 10px;
  opacity: 0.85;
}

.listing-title-block {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid rgba(99, 102, 241, 0.18);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.55;
  word-break: break-word;
  margin-top: 10px;
  letter-spacing: 0.01em;
}

.listing-text-block p {
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.78;
  margin-bottom: 10px;
}

.listing-text-block p:last-child {
  margin-bottom: 0;
}

.listing-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.listing-bullets li {
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.listing-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-primary);
}

/* Item Specifics table */
.specifics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specifics-table tr {
  border-bottom: 1px solid rgba(99, 102, 241, 0.09);
  transition: background var(--transition-fast);
}

.specifics-table tr:last-child {
  border-bottom: none;
}

.specifics-table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.specifics-table td {
  padding: 9px 6px;
  vertical-align: top;
}

.specifics-copyable-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.specifics-copyable-row:hover {
  background-color: var(--color-surface);
}

.specifics-copyable-row .specifics-copy-btn {
  pointer-events: none; /* Let the row intercept the click */
}

.specifics-tag {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  width: 38%;
  white-space: nowrap;
}

.specifics-separator {
  color: var(--color-text-muted);
  padding: 9px 4px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.specifics-value {
  color: var(--color-text-body);
  font-size: 13px;
  vertical-align: middle;
}

.specifics-value-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
}

.specifics-value-text {
  flex: 1;
}

.specifics-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--color-text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.specifics-copy-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  border-color: rgba(99, 102, 241, 0.2);
}

.specifics-copy-btn:active {
  transform: scale(0.95);
}

/* Error state */
.output-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  animation: fadeSlideIn 0.3s ease;
}

.error-icon {
  font-size: 16px;
  color: var(--color-error);
  flex-shrink: 0;
  margin-top: 2px;
}

.error-message {
  font-size: 13px;
  color: var(--color-error);
  line-height: 1.5;
}

/* Loading skeleton */
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: fadeSlideIn 0.3s ease;
}

.skeleton-line {
  height: 13px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 25%, rgba(99, 102, 241, 0.18) 50%, rgba(99, 102, 241, 0.08) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 1.5s infinite;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.medium {
  width: 70%;
}

.skeleton-line.full {
  width: 100%;
}

.skeleton-line.heading {
  height: 9px;
  width: 28%;
  margin-bottom: 4px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* =============================================
   DETAILS COMBINED BLOCK
   ============================================= */
.details-combined-block {
  background: var(--card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.details-combined-block:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.details-combined-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(99, 102, 241, 0.04);
}

.details-combined-title {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.details-combined-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.details-sections-body {
  padding: 6px 0;
}

/* =============================================
   TOAST NOTIFICATION
   ============================================= */
.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 9999;
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: white;
  min-width: 190px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  transform: translateY(90px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast.success {
  background: linear-gradient(135deg, #059669, #10b981);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast.error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.toast.info {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 26px 24px;
  text-align: center;
  background: var(--footer-bg);
  backdrop-filter: blur(10px);
  transition: background var(--transition-slow);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-text {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.footer-note {
  font-size: 11px;
  color: var(--color-text-muted);
  opacity: 0.55;
}

/* =============================================
   RESPONSIVENESS
   ============================================= */
@media (max-width: 640px) {
  .header-inner {
    padding: 0 14px;
  }

  .logo-title {
    font-size: 13px;
  }

  .header-nav {
    display: none;
  }

  .theme-label {
    display: none;
  }

  .hero {
    padding: 24px 16px 20px;
  }

  .hero-title {
    font-size: 21px;
  }

  .hero-subtitle {
    font-size: 13px;
  }

  .main-content {
    padding: 28px 14px 70px;
  }

  .card {
    padding: 18px 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .output-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-header {
    flex-direction: column;
    gap: 10px;
  }

  .toast {
    bottom: 14px;
    right: 14px;
    left: 14px;
  }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.55);
}

/* Selection */
::selection {
  background: rgba(99, 102, 241, 0.22);
  color: var(--color-primary-dark);
}

[data-theme="dark"] ::selection {
  background: rgba(99, 102, 241, 0.38);
  color: white;
}

/* =============================================
   TONE SELECTOR
   ============================================= */
.tone-group {
  margin-bottom: 16px;
}

.tone-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tone-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.tone-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tone-label-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--input-bg);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.tone-option input[type="radio"]:checked+.tone-label-text {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.tone-option:hover .tone-label-text {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.tone-icon {
  font-size: 12px;
}

/* =============================================
   WEB SEARCH TOGGLE ROW
   ============================================= */
.search-toggle-row {
  margin-bottom: 18px;
}

.search-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 11px 15px;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.search-toggle-wrap:hover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.09);
}

.search-toggle-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary);
}

.search-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

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

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

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 25px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-surface-3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: transform var(--transition-fast);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--color-primary);
}

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

/* =============================================
   SHORTCUT HINT
   ============================================= */
.shortcut-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 12px;
  opacity: 0.7;
  flex-wrap: wrap;
}

kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* =============================================
   TITLE CHAR COUNTER (inside listing output)
   ============================================= */
.title-char-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  margin-top: 8px;
}

.title-len-good {
  color: var(--color-success);
}

.title-len-warn {
  color: var(--color-warning);
}

.title-len-bad {
  color: var(--color-error);
}

.title-char-ok {
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.title-char-warn {
  color: var(--color-warning);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =============================================
   LISTING SECTION HEADING ROW & SECTION ACTIONS
   ============================================= */
.listing-section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Title section always shows its action buttons */
.title-section-actions {
  opacity: 1 !important;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.section-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.section-action-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.section-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Fix SEO Warning Button — only visible when title < 70 chars */
.fix-seo-btn {
  position: relative;
  background: linear-gradient(135deg, #dc2626, #f97316) !important;
  border-color: #dc2626 !important;
  color: white !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
  box-shadow:
    0 0 0 0 rgba(220, 38, 38, 0.6),
    0 4px 14px rgba(220, 38, 38, 0.35) !important;
  animation: fixSeoPulse 1.8s ease-in-out infinite, fixSeoEntrance 0.4s ease both !important;
  overflow: hidden;
}

.fix-seo-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: fixSeoSweep 2s ease-in-out infinite;
  border-radius: inherit;
}

.fix-seo-btn .fa-bolt {
  animation: fixSeoBolt 1.8s ease-in-out infinite;
}

.fix-seo-btn:hover {
  background: linear-gradient(135deg, #b91c1c, #ea580c) !important;
  transform: translateY(-2px) scale(1.04) !important;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.55) !important;
}

@keyframes fixSeoPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5), 0 4px 14px rgba(220, 38, 38, 0.35);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(220, 38, 38, 0), 0 4px 20px rgba(220, 38, 38, 0.55);
  }
}

@keyframes fixSeoEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) translateX(-6px);
  }

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

@keyframes fixSeoSweep {
  0% {
    transform: translateX(-200%);
  }

  60% {
    transform: translateX(200%);
  }

  100% {
    transform: translateX(200%);
  }
}

@keyframes fixSeoBolt {

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

  25% {
    transform: scale(1.3) rotate(-10deg);
  }

  75% {
    transform: scale(1.3) rotate(10deg);
  }
}

/* =============================================
   SCORE BADGE
   ============================================= */
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  animation: fadeSlideIn 0.4s ease;
  white-space: nowrap;
}

.score-icon {
  font-size: 10px;
}

.score-value {
  font-size: 13px;
  font-weight: 900;
}

.score-sep {
  opacity: 0.6;
  font-size: 10px;
}

.score-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-excellent {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.score-good {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.score-fair {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.score-poor {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* History score chips */
.score-chip-excellent {
  color: #059669;
  font-weight: 700;
  font-size: 11px;
}

.score-chip-good {
  color: #0891b2;
  font-weight: 700;
  font-size: 11px;
}

.score-chip-fair {
  color: #d97706;
  font-weight: 700;
  font-size: 11px;
}

.score-chip-poor {
  color: #dc2626;
  font-weight: 700;
  font-size: 11px;
}

/* =============================================
   HISTORY NAV BUTTON
   ============================================= */
/* History Button — pulsing purple */
.history-nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.10));
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: 0.1px;
}

/* Shimmer sweep */
.history-nav-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.18), transparent);
  transform: translateX(-100%);
  transition: none;
  border-radius: inherit;
  animation: histBtnSweep 3.5s ease-in-out infinite;
}

@keyframes histBtnSweep {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }

  10%,
  45% {
    opacity: 1;
  }

  55% {
    transform: translateX(100%);
    opacity: 0;
  }

  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

.history-nav-btn:hover {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: #6366f1;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(99, 102, 241, 0.40);
}

.history-nav-btn i {
  transition: transform 0.4s ease;
}

.history-nav-btn:hover i {
  animation: clockSpin 0.5s ease;
}

@keyframes clockSpin {
  0% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(-20deg) scale(1.2);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* =============================================
   MODAL (shared base)
   ============================================= */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal.open {
  pointer-events: auto;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(12px);
  transition: transform var(--transition-normal);
  overflow: hidden;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.modal.open .modal-panel {
  transform: scale(1) translateY(0);
}

.modal-panel-wide {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  background: rgba(99, 102, 241, 0.03);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 900;
  color: var(--color-text-primary);
}

.modal-title .fa-solid {
  color: var(--color-primary);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.07);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--color-error);
  transform: rotate(90deg);
}

.modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 0;
}

.modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.modal-tip {
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* =============================================
   HISTORY LIST (inside modal)
   ============================================= */
.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 24px;
  gap: 7px;
  text-align: center;
  color: var(--color-text-muted);
}

.history-empty-icon {
  font-size: 38px;
  opacity: 0.35;
  margin-bottom: 6px;
  color: var(--color-primary);
}

.history-empty-hint {
  font-size: 11px;
  opacity: 0.6;
}

.history-item {
  padding: 14px 22px;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:hover {
  background: rgba(99, 102, 241, 0.04);
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.history-item-date {
  font-size: 11px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

.history-item-country,
.history-item-tone {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 8px;
  background: rgba(99, 102, 241, 0.09);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  text-transform: capitalize;
}

.history-item-product {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

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

.history-load-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-load-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.history-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 5px 9px;
  font-size: 12px;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.history-delete-btn:hover {
  border-color: var(--color-error);
  background: rgba(220, 38, 38, 0.08);
  color: var(--color-error);
}

/* =============================================
   EBAY PREVIEW (inside modal)
   ============================================= */
.ebay-preview {
  font-family: var(--font-sans);
}

.ebay-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  background: rgba(99, 102, 241, 0.05);
  border-bottom: 1px solid var(--color-border);
}

.ebay-logo-wrap {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}

.ebay-e {
  color: #e53238;
}

.ebay-b {
  color: #0064d2;
}

.ebay-a {
  color: #f5af02;
}

.ebay-y {
  color: #86b817;
}

.ebay-preview-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.ebay-preview-body {
  padding: 22px 24px;
}

.ebay-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin-bottom: 8px;
}

.ebay-char-info {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 18px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.char-good {
  background: rgba(5, 150, 105, 0.1);
  color: #059669;
}

.char-warn {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.char-bad {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.char-tip {
  font-weight: 500;
  font-size: 10px;
}

.ebay-section {
  margin-bottom: 18px;
}

.ebay-section h2 {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--color-border);
}

.ebay-desc p {
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.78;
  margin-bottom: 8px;
}

.ebay-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ebay-bullets li {
  font-size: 13px;
  color: var(--color-text-body);
  padding-left: 15px;
  position: relative;
  line-height: 1.5;
}

.ebay-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #0064d2;
  font-weight: 700;
}

/* =============================================
   MOBILE STICKY BAR
   ============================================= */
.mobile-sticky-bar {
  display: none;
}

@media (max-width: 640px) {
  .mobile-sticky-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(99, 102, 241, 0.12);
  }

  .mobile-sticky-inner {
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-quick-toggle {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-quick-toggle.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border-color: rgba(99, 102, 241, 0.3);
  }

  .mobile-sticky-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
  }

  body {
    padding-bottom: 70px;
  }
}

/* =============================================
   PRINT / EXPORT PDF STYLES
   ============================================= */
@media print {

  .site-header,
  .hero,
  .card form,
  #specifics-wrapper,
  .site-footer,
  .toast,
  .mobile-sticky-bar,
  .modal,
  .output-header,
  .details-combined-header,
  .title-section-actions,
  .web-enriched-badge,
  .score-badge,
  .shortcut-hint,
  .bg-orbs,
  .bg-particles {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    padding: 0;
    font-size: 14px;
  }

  .main-content {
    max-width: 100%;
    padding: 20px;
  }

  .output-container,
  .details-combined-block {
    border: none;
    box-shadow: none;
  }

  .output-body {
    padding: 0;
  }

  .listing-section-block {
    page-break-inside: avoid;
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .listing-section-heading {
    color: #000;
  }

  .title-char-counter {
    display: none !important;
  }
}

/* =============================================
   SMALL SCREEN EXTRA TWEAKS
   ============================================= */
@media (max-width: 640px) {
  .tone-selector {
    gap: 6px;
  }

  .tone-label-text {
    padding: 6px 10px;
    font-size: 11px;
  }

  .history-nav-btn span {
    display: none;
  }

  .output-header {
    align-items: flex-start;
  }

  .output-header-right {
    flex-wrap: wrap;
    gap: 6px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: 92vh;
  }

  .details-combined-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .listing-section-title-block {
    padding: 14px !important;
  }

  .title-section-actions {
    flex-wrap: wrap;
  }
}

/* =============================================
   HEADER SCROLL EFFECT
   ============================================= */
/* Handled via JS class .scrolled, style already applied above */

/* Floating label animation on inputs */
.form-textarea:not(:placeholder-shown),
.form-textarea:focus {
  border-color: var(--color-primary);
}

/* Glow pulse on generate button while loading */
.btn-primary.loading {
  animation: btnGlow 1.8s ease infinite;
}

@keyframes btnGlow {

  0%,
  100% {
    box-shadow: 0 5px 22px rgba(99, 102, 241, 0.38);
  }

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

/* =============================================
   FOOTER — CREDIT & SOCIALS
   ============================================= */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 28px 24px 30px;
  text-align: center;
  background: var(--footer-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background var(--transition-slow);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* "Built with ❤ by Ali Raza" row */
.footer-credit {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-built-text {
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Animated heart */
.footer-heart {
  display: inline-block;
  color: #ef4444;
  font-size: 18px;
  line-height: 1;
  animation: heartBeat 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.55));
  transform-origin: center;
}

@keyframes heartBeat {

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

  14% {
    transform: scale(1.30);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.20);
  }

  56% {
    transform: scale(1);
  }
}

/* Author name — gradient animated on hover */
.footer-author-name {
  font-size: 14px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  background-size: 200% auto;
  transition: background-position 0.5s ease, filter 0.3s ease;
  letter-spacing: -0.2px;
}

.footer-author-name:hover {
  background-position: right center;
  filter: brightness(1.15);
}

/* Social icon row */
.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  font-size: 15px;
  text-decoration: none;
  color: white;
  background: rgba(99, 102, 241, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.25);
}

.footer-social-btn:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Website icon — indigo */
.footer-social-btn:not(.footer-social-linkedin):not(.footer-social-wa) {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.footer-social-btn:not(.footer-social-linkedin):not(.footer-social-wa):hover {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* LinkedIn — brand blue */
.footer-social-linkedin {
  background: #0a66c2;
  border-color: rgba(10, 102, 194, 0.4);
  box-shadow: 0 2px 10px rgba(10, 102, 194, 0.3);
}

.footer-social-linkedin:hover {
  background: #004182;
  box-shadow: 0 6px 20px rgba(10, 102, 194, 0.5);
}

/* WhatsApp — brand green */
.footer-social-wa {
  background: #25d366;
  border-color: rgba(37, 211, 102, 0.4);
  box-shadow: 0 2px 10px rgba(37, 211, 102, 0.3);
}

.footer-social-wa:hover {
  background: #128c4b;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.55);
}

.footer-note {
  font-size: 11px;
  color: var(--color-text-muted);
  opacity: 0.55;
}

/* =============================================
   RICH TEXT EDITOR MODAL
   ============================================= */
#editor-modal {
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px;
  z-index: 2000;
}

#editor-modal.open {
  pointer-events: all;
  opacity: 1;
}

.editor-modal-box {
  display: flex;
  flex-direction: column;
  width: min(860px, 100%);
  max-height: min(88vh, 700px);
  background: #fff;
  /* always white */
  border: 1px solid #e2e5ea;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(99, 102, 241, 0.10);
  animation: editorSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes editorSlideIn {
  from {
    opacity: 0;
    transform: scale(0.93) translateY(16px);
  }

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

/* Header */
.editor-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8f9ff;
  /* always light */
  border-bottom: 1px solid #e2e5ea;
  flex-shrink: 0;
}

.editor-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-heading);
}

.editor-modal-title-row .fa-pen-to-square {
  color: var(--color-primary);
  font-size: 16px;
}

.editor-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.editor-close-btn:hover {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: #dc2626;
  transform: rotate(90deg);
}

/* Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 14px;
  background: #f4f5fb;
  /* always light grey */
  border-bottom: 1px solid #e2e5ea;
  flex-shrink: 0;
}

.editor-toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.editor-toolbar-sep {
  width: 1px;
  height: 20px;
  background: var(--color-border);
  margin: 0 4px;
}

.editor-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-tool-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
  color: var(--color-primary);
}

.editor-tool-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.editor-size-group {
  gap: 3px;
}

.editor-size-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-right: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-size-btn {
  font-weight: 800;
  min-width: 24px;
}

/* Content area */
.editor-content-wrap {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-title-input {
  display: none;
  width: 100%;
  padding: 18px 20px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: #1a1d23;
  background: #fff;
  border: none;
  outline: none;
  border-bottom: 1px solid #e2e5ea;
  box-sizing: border-box;
  letter-spacing: 0.1px;
}

.editor-title-input:focus {
  background: #f8f9ff;
}

.editor-richtext {
  display: block;
  flex: 1;
  padding: 18px 20px;
  overflow-y: auto;
  outline: none;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.75;
  color: #2d3148;
  background: #fff;
  min-height: 200px;
  cursor: text;
}

.editor-richtext:focus {
  background: #fff;
}

.editor-richtext ul {
  padding-left: 20px;
}

.editor-richtext ol {
  padding-left: 20px;
}

.editor-richtext li {
  margin-bottom: 4px;
}

.editor-richtext p {
  margin: 0 0 10px;
}

/* Full-listing edit mode: section dividers & labels */
.editor-full-section-label {
  margin: 14px 0 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #6366f1;
}

.editor-full-section-label:first-child {
  margin-top: 0;
}

.editor-full-divider {
  border: none;
  border-top: 1px dashed #e2e5ea;
  margin: 14px 0;
}

/* Footer */
.editor-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: #f4f5fb;
  /* always light */
  border-top: 1px solid #e2e5ea;
  flex-shrink: 0;
}

.editor-footer-actions {
  display: flex;
  gap: 8px;
}

.editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.editor-btn-cancel {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.editor-btn-cancel:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
}

.editor-btn-save {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.editor-btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.5);
}

.editor-btn-save:active {
  transform: translateY(0);
}

/* Live char counter pills */
.editor-char-counter {
  font-size: 12px;
}

.editor-counter-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.ectr-good {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.ectr-warn {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.ectr-bad {
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* Dark mode: keep editor always white — override everything */
[data-theme="dark"] .editor-modal-box,
[data-theme="dark"] .editor-richtext,
[data-theme="dark"] .editor-title-input {
  background: #fff !important;
  color: #2d3148 !important;
  border-color: #e2e5ea !important;
}

[data-theme="dark"] .editor-modal-header,
[data-theme="dark"] .editor-toolbar,
[data-theme="dark"] .editor-modal-footer {
  background: #f4f5fb !important;
  border-color: #e2e5ea !important;
}

[data-theme="dark"] .editor-modal-title-row {
  color: #1a1d23 !important;
}

[data-theme="dark"] .editor-tool-btn {
  color: #4b5563 !important;
}

[data-theme="dark"] .editor-close-btn {
  color: #6b7280 !important;
  border-color: #e2e5ea !important;
  background: transparent !important;
}

/* Mobile */
@media (max-width: 600px) {
  .editor-modal-box {
    border-radius: 14px 14px 0 0;
    max-height: 92vh;
  }

  #editor-modal {
    align-items: flex-end;
    padding: 0;
  }

  .editor-toolbar {
    gap: 2px;
    padding: 8px 10px;
  }

  .editor-tool-btn {
    min-width: 26px;
    height: 26px;
    font-size: 11px;
  }

    .editor-toolbar-sep {
    display: none;
  }
}

/* =============================================
   USER OVERRIDE: SOLID BLACK TEXT FOR OUTPUT 
   ============================================= */
html[data-theme="light"] #listing-output-container .listing-section-heading,
html[data-theme="light"] #listing-output-container .listing-title-block,
html[data-theme="light"] #listing-output-container .listing-text-block p,
html[data-theme="light"] #listing-output-container .listing-bullets li,
html[data-theme="light"] #listing-output-container .title-char-counter,
html[data-theme="light"] .specifics-table th,
html[data-theme="light"] .specifics-table td,
html[data-theme="light"] .specifics-table td .specifics-value,
html[data-theme="light"] .specifics-table td .specifics-tag {
    color: #000000 !important;
}



/* =============================================
   SEO CONTENT SECTIONS (HOW IT WORKS & FAQ)
   ============================================= */
.seo-content-section {
  margin-top: 40px;
  margin-bottom: 60px;
  animation: fadeIn 0.8s ease-out;
}

.seo-card {
  padding: 40px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.seo-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
}

@media (max-width: 850px) {
  .seo-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.seo-section-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text-primary);
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}

.seo-section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

/* Steps */
.seo-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.seo-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.step-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.step-text p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item h3::before {
  content: "?";
  display: inline-flex;
  width: 20px;
  height: 20px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-primary);
  border-radius: 4px;
  font-size: 12px;
  align-items: center;
  justify-content: center;
}

.faq-item p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding-left: 30px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
