/* ═══════════════════════════════════════════
   ZETRAX.app — Premium CSS Design System
   ═══════════════════════════════════════════ */

/* ─── TOKENS ─── */
:root {
  --pink-50:  #FFF0F6;
  --pink-100: #eb9fc6;
  --pink-200: #FFB3D1;
  --pink-300: #f57aab;
  --pink-400: #FF6EB4;
  --pink-500: #FF1493;
  --pink-600: #E0127F;
  --pink-700: #ea1d6fd7;
  --pink-800: #880E4F;

  --neutral-0:   #FFFFFF;
  --neutral-50:  #FAFAFA;
  --neutral-100: #F5F5F5;
  --neutral-200: #E8E8EC;
  --neutral-300: #D0D0D8;
  --neutral-400: #9898A8;
  --neutral-500: #6B6B80;
  --neutral-600: #4A4A60;
  --neutral-700: #2D2D40;
  --neutral-800: #1A1A2E;
  --neutral-900: #0D0D18;

  --grad-main: linear-gradient(135deg, #FF6EB4 0%, #FF1493 50%, #C2185B 100%);
  --grad-soft: linear-gradient(135deg, #FFB3D1 0%, #FF6EB4 100%);
  --grad-glow: radial-gradient(ellipse at center, rgba(255,110,180,0.35) 0%, transparent 70%);

  --shadow-sm:  0 1px 3px rgba(255,20,147,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(255,20,147,0.12), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg:  0 16px 40px rgba(255,20,147,0.18), 0 4px 16px rgba(0,0,0,0.08);
  --shadow-xl:  0 32px 64px rgba(255,20,147,0.22), 0 8px 24px rgba(0,0,0,0.10);
  --shadow-card:0 8px 32px rgba(255,20,147,0.10), 0 2px 12px rgba(0,0,0,0.05);

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

  --dur-fast: 150ms;
  --dur-std:  250ms;
  --dur-slow: 400ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --container: 1180px;
  --header-h: 72px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--neutral-0);
  color: var(--neutral-700);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; background: none; }
ul { list-style: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── LAYOUT ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── AMBIENT BACKGROUND ─── */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: blobFadeIn var(--dur-slow) var(--ease) forwards;
}
.blob-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,110,180,0.28) 0%, transparent 70%);
  top: -200px; right: -150px;
  animation-delay: 0.1s;
}
.blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,20,147,0.20) 0%, transparent 70%);
  top: 200px; left: -100px;
  animation-delay: 0.25s;
}
.blob-3 {
  width: 600px; height: 400px;
  background: radial-gradient(circle, rgba(255,179,209,0.22) 0%, transparent 70%);
  bottom: 300px; right: 100px;
  animation-delay: 0.4s;
}
.blob-4 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(194,24,91,0.15) 0%, transparent 70%);
  bottom: -100px; left: 200px;
  animation-delay: 0.55s;
}
@keyframes blobFadeIn {
  to { opacity: 1; }
}

/* ─── FLOATING SHAPES ─── */
.floating-shapes { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.shape {
  position: absolute;
  border-radius: var(--radius-md);
  background: var(--grad-soft);
  opacity: 0.18;
}
.shape-sq-1 {
  width: 48px; height: 48px;
  top: 15%; left: 5%;
  transform: rotate(15deg);
  animation: floatA 7s ease-in-out infinite;
}
.shape-sq-2 {
  width: 32px; height: 32px;
  top: 35%; right: 8%;
  transform: rotate(-20deg);
  background: var(--grad-main);
  opacity: 0.14;
  animation: floatB 9s ease-in-out infinite;
}
.shape-sq-3 {
  width: 56px; height: 56px;
  top: 60%; left: 3%;
  transform: rotate(35deg);
  animation: floatC 11s ease-in-out infinite;
}
.shape-sq-4 {
  width: 24px; height: 24px;
  top: 78%; right: 5%;
  transform: rotate(-10deg);
  background: var(--grad-main);
  opacity: 0.20;
  animation: floatA 8s ease-in-out infinite reverse;
}
.shape-sq-5 {
  width: 40px; height: 40px;
  top: 12%; right: 22%;
  transform: rotate(28deg);
  opacity: 0.12;
  animation: floatB 12s ease-in-out infinite;
}
.shape-sq-6 {
  width: 28px; height: 28px;
  top: 50%; left: 90%;
  transform: rotate(-30deg);
  background: var(--grad-main);
  opacity: 0.16;
  animation: floatC 10s ease-in-out infinite reverse;
}
@keyframes floatA {
  0%,100% { transform: rotate(15deg) translateY(0px); }
  50%      { transform: rotate(15deg) translateY(-18px); }
}
@keyframes floatB {
  0%,100% { transform: rotate(-20deg) translateY(0px) translateX(0px); }
  33%     { transform: rotate(-20deg) translateY(-12px) translateX(8px); }
  66%     { transform: rotate(-20deg) translateY(10px) translateX(-5px); }
}
@keyframes floatC {
  0%,100% { transform: rotate(35deg) translateY(0px); }
  50%     { transform: rotate(35deg) translateY(-22px); }
}

/* ─── SPARKLE STARS ─── */
.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.sparkle {
  position: absolute;
  opacity: 0;
  animation: sparkleAnim 4s ease-in-out infinite;
}
.sp-1 { width: 22px; height: 22px; top: 10%; left: 12%; animation-delay: 0s; }
.sp-2 { width: 16px; height: 16px; top: 8%; right: 30%; animation-delay: 0.8s; }
.sp-3 { width: 28px; height: 28px; top: 38%; right: 12%; animation-delay: 1.6s; }
.sp-4 { width: 18px; height: 18px; top: 65%; left: 8%; animation-delay: 0.4s; }
.sp-5 { width: 12px; height: 12px; top: 80%; right: 18%; animation-delay: 2.2s; }
.sp-6 { width: 20px; height: 20px; top: 48%; left: 92%; animation-delay: 1.2s; }
@keyframes sparkleAnim {
  0%,100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
  25%,75% { opacity: 0.7; transform: scale(1) rotate(15deg); }
  50%     { opacity: 1; transform: scale(1.15) rotate(30deg); }
}

/* ─── HEADER ─── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid rgba(255,110,180,0.10);
  box-shadow: 0 1px 0 rgba(255,20,147,0.06), 0 2px 16px rgba(255,20,147,0.06);
  transition: background var(--dur-std) var(--ease), box-shadow var(--dur-std) var(--ease);
}
.header.scrolled {
  background: rgba(255,255,255,0.94);
  box-shadow: 0 2px 24px rgba(255,20,147,0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-star {
  width: 36px; height: 36px;
  filter: drop-shadow(0 2px 8px rgba(255,20,147,0.3));
  transition: transform var(--dur-std) var(--ease), filter var(--dur-std) var(--ease);
}
.logo:hover .logo-star {
  transform: rotate(15deg) scale(1.08);
  filter: drop-shadow(0 4px 14px rgba(255,20,147,0.5));
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--neutral-800);
}
.logo-dot { color: var(--pink-500); }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-500);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: color var(--dur-fast), background var(--dur-fast);
  position: relative;
}
.nav-link:hover { color: var(--neutral-800); background: rgba(255,20,147,0.05); }
.nav-link.active {
  color: var(--pink-600);
  background: var(--pink-50);
  font-weight: 600;
}

/* Header buttons */
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-outline-sm {
  font-size: 0.875rem; font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-200);
  color: var(--neutral-600);
  background: transparent;
  transition: all var(--dur-std) var(--ease);
}
.btn-outline-sm:hover {
  border-color: var(--pink-300);
  color: var(--pink-600);
  background: var(--pink-50);
}
.btn-primary-sm {
  font-size: 0.875rem; font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--grad-main);
  color: white;
  box-shadow: 0 2px 12px rgba(255,20,147,0.3);
  transition: all var(--dur-std) var(--ease);
}
.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,20,147,0.45);
}
.btn-primary-sm:active { transform: translateY(0); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
}
.hamburger:hover { background: var(--pink-50); }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--neutral-600);
  border-radius: 2px;
  transition: transform var(--dur-std) var(--ease), opacity var(--dur-std);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  padding: 16px 24px 24px;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--pink-50);
}
.mobile-nav.open { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-link {
  font-size: 1rem; font-weight: 500;
  color: var(--neutral-600);
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-100);
  transition: color var(--dur-fast);
}
.mobile-nav-link:hover { color: var(--pink-500); }

/* ─── HERO ─── */
.hero {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 80px) 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--pink-50);
  border: 1px solid rgba(255,20,147,0.15);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pink-600);
  margin-bottom: 28px;
  animation: fadeSlideDown 0.6s var(--ease) 0.2s both;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pink-500);
  box-shadow: 0 0 0 3px rgba(255,20,147,0.2);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 0 3px rgba(255,20,147,0.2); }
  50%      { box-shadow: 0 0 0 6px rgba(255,20,147,0.08); }
}

/* Heading */
.hero-heading {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--neutral-900);
  margin-bottom: 20px;
  animation: fadeSlideDown 0.6s var(--ease) 0.35s both;
}
.gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(255,20,147,0.2));
}

/* Sub */
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  color: var(--neutral-500);
  line-height: 1.7;
  margin-bottom: 52px;
  animation: fadeSlideDown 0.6s var(--ease) 0.5s both;
}
.br-desktop { display: inline; }

/* ─── DASHBOARD CARD ─── */
.dashboard-card {
  width: 100%;
  max-width: 860px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(32px) saturate(1.8);
  -webkit-backdrop-filter: blur(32px) saturate(1.8);
  border: 1.5px solid rgba(255,110,180,0.18);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.8) inset;
  overflow: visible;
  animation: fadeSlideUp 0.7s var(--ease) 0.65s both;
  transition: box-shadow var(--dur-std) var(--ease), transform var(--dur-std) var(--ease);
  position: relative;
}
.dashboard-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) + 1px);
  background: linear-gradient(135deg, rgba(255,110,180,0.3), transparent 50%, rgba(194,24,91,0.15));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--dur-std) var(--ease);
}
.dashboard-card:hover::before { opacity: 1; }
.dashboard-card:hover {
  box-shadow: var(--shadow-xl), 0 0 60px rgba(255,20,147,0.12), 0 0 0 1px rgba(255,255,255,0.9) inset;
  transform: translateY(-2px);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 0;
}
.db-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.db-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-800);
}
.db-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neutral-400);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--neutral-200);
  background: var(--neutral-50);
}

.dashboard-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  padding: 16px 20px 20px;
}

/* Left dropdowns */
.db-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Select group */
.select-group { display: flex; flex-direction: column; gap: 0; }
.select-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 4px;
  margin-bottom: 4px;
}

/* Custom select */
.custom-select { position: relative; }
.select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-200);
  background: var(--neutral-0);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  transition: all var(--dur-fast);
  text-align: left;
}
.select-btn:hover {
  border-color: var(--pink-300);
  background: var(--pink-50);
  color: var(--neutral-800);
}
.select-btn[aria-expanded="true"] {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(255,20,147,0.12);
  color: var(--neutral-800);
}
.select-value { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron {
  flex-shrink: 0;
  transition: transform var(--dur-std) var(--ease);
  color: var(--neutral-400);
}
.select-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.dropdown-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--neutral-0);
  border: 1.5px solid rgba(255,110,180,0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(255,20,147,0.15), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 50;
  padding: 6px;
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  pointer-events: none;
  transition: opacity var(--dur-std) var(--ease), transform var(--dur-std) var(--ease);
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--pink-200) transparent;
}
.dropdown-list.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.dropdown-list li {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.dropdown-list li:hover, .dropdown-list li:focus {
  background: var(--pink-50);
  color: var(--pink-600);
  outline: none;
}
.dropdown-list li.selected {
  background: var(--pink-50);
  color: var(--pink-600);
  font-weight: 600;
}

/* Right: output */
.db-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.output-area {
  flex: 1;
  min-height: 160px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255,110,180,0.18);
  background: linear-gradient(145deg, rgba(255,240,246,0.6) 0%, rgba(255,255,255,0.4) 100%);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-std), box-shadow var(--dur-std);
}
.output-area.has-content {
  border-color: rgba(255,110,180,0.35);
  box-shadow: 0 0 0 3px rgba(255,20,147,0.06), var(--shadow-card);
}
.output-glow {
  position: absolute;
  bottom: -20px; right: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(255,20,147,0.18) 0%, transparent 70%);
  pointer-events: none;
  transition: opacity var(--dur-slow);
  opacity: 0;
}
.output-area.has-content .output-glow { opacity: 1; }

.output-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 128px;
  text-align: center;
  color: var(--neutral-400);
  font-size: 0.82rem;
  line-height: 1.6;
  transition: opacity var(--dur-std);
}
.output-placeholder.hidden { display: none; }

.output-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--neutral-700);
  display: none;
}
.output-text.visible { display: block; }
.output-text .highlight { color: var(--pink-500); font-weight: 600; }

/* Action buttons */
.db-actions {
  display: flex;
  gap: 10px;
}
.btn-generate {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  background: var(--grad-main);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(255,20,147,0.35), 0 1px 4px rgba(0,0,0,0.08);
  transition: all var(--dur-std) var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-generate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.btn-generate:hover::before { opacity: 1; }
.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,20,147,0.5), 0 2px 6px rgba(0,0,0,0.1);
}
.btn-generate:active { transform: translateY(0); box-shadow: 0 2px 10px rgba(255,20,147,0.35); }
.btn-generate.loading { pointer-events: none; }
.btn-generate.loading svg { animation: spinFast 0.6s linear infinite; }
@keyframes spinFast { to { transform: rotate(360deg); } }

.btn-copy {
  padding: 12px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-200);
  background: transparent;
  color: var(--neutral-500);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all var(--dur-std) var(--ease);
}
.btn-copy:not([disabled]):hover {
  border-color: var(--pink-400);
  color: var(--pink-500);
  background: var(--pink-50);
  transform: translateY(-1px);
}
.btn-copy[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn-copy.copied {
  border-color: #22c55e;
  color: #16a34a;
  background: #f0fdf4;
}

/* Trust row */
.trust-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
  animation: fadeSlideUp 0.6s var(--ease) 0.9s both;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--neutral-400);
}
.trust-sep { color: var(--neutral-300); }

/* ─── ANIMATIONS ─── */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── TEMPLATES ─── */
.templates-section {
  position: relative;
  z-index: 2;
  padding: 100px 0;
  background: linear-gradient(180deg, transparent 0%, rgba(255,240,246,0.3) 40%, transparent 100%);
}
.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--neutral-900);
  margin-bottom: 10px;
}
.section-title.left { text-align: left; }
.section-sub {
  font-size: 1rem;
  color: var(--neutral-400);
  font-weight: 400;
}
.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.template-card {
  background: rgba(255,255,255,0.9);
  border: 1.5px solid var(--neutral-100);
  border-radius: var(--radius-xl);
  padding: 24px;
  cursor: pointer;
  transition: all var(--dur-std) var(--ease);
  position: relative;
  overflow: hidden;
}
.template-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-main);
  transform: scaleX(0);
  transition: transform var(--dur-std) var(--ease);
  transform-origin: left;
}
.template-card:hover {
  border-color: rgba(255,110,180,0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.template-card:hover::after { transform: scaleX(1); }
.template-card:focus { outline: 2px solid var(--pink-400); outline-offset: 2px; }

.tpl-icon-wrap {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform var(--dur-std) var(--ease);
}
.template-card:hover .tpl-icon-wrap { transform: scale(1.08) rotate(-4deg); }

.tpl-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: 8px;
}
.tpl-desc {
  font-size: 0.84rem;
  color: var(--neutral-400);
  line-height: 1.6;
  margin-bottom: 16px;
}
.tpl-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--pink-50);
  color: var(--pink-600);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}
.tpl-use-btn {
  width: 100%;
  padding: 9px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-200);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--neutral-500);
  background: transparent;
  transition: all var(--dur-fast);
}
.tpl-use-btn:hover {
  border-color: var(--pink-400);
  background: var(--grad-main);
  color: white;
}

/* ─── API SECTION ─── */
.api-section {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}
.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink-500);
  margin-bottom: 12px;
}
.api-desc {
  font-size: 1rem;
  color: var(--neutral-500);
  line-height: 1.75;
  margin-top: 16px;
  margin-bottom: 28px;
}
.api-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.api-feat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.feat-icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--pink-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.api-feat strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--neutral-800);
  display: block;
  margin-bottom: 2px;
}
.api-feat p {
  font-size: 0.82rem;
  color: var(--neutral-400);
  line-height: 1.5;
}
.api-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: var(--grad-main);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(255,20,147,0.3);
  transition: all var(--dur-std) var(--ease);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,20,147,0.45);
}
.btn-outline {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-200);
  background: transparent;
  color: var(--neutral-600);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--dur-std) var(--ease);
}
.btn-outline:hover {
  border-color: var(--pink-300);
  color: var(--pink-600);
  background: var(--pink-50);
  transform: translateY(-1px);
}

/* Code block */
.api-code-block {
  border-radius: var(--radius-xl);
  background: #0D1117;
  border: 1px solid rgba(255,110,180,0.2);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  transition: transform var(--dur-std) var(--ease), box-shadow var(--dur-std) var(--ease);
}
.api-code-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 80px rgba(255,20,147,0.25), 0 8px 24px rgba(0,0,0,0.3);
}
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-dots { display: flex; gap: 7px; }
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }
.code-lang {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.code-content {
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  white-space: pre;
  color: #E6EDF3;
}
.code-kw  { color: #FF79C6; }
.code-var { color: #E6EDF3; }
.code-fn  { color: #79C0FF; }
.code-str { color: #A5D6FF; }
.code-op  { color: #FF79C6; }
.code-prop{ color: #D2A8FF; }
.code-cmt { color: #8B949E; font-style: italic; }

/* ─── STATS ─── */
.stats-section {
  position: relative;
  z-index: 2;
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(255,240,246,0.5) 0%, rgba(255,255,255,0.1) 100%);
}
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.stat-item {
  flex: 1;
  text-align: center;
  padding: 32px 20px;
}
.stat-number {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-suffix { font-size: 0.6em; }
.stat-label {
  font-size: 0.9rem;
  color: var(--neutral-400);
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(180deg, transparent, rgba(255,110,180,0.3), transparent);
}

/* ─── FOOTER ─── */
.footer {
  position: relative;
  z-index: 2;
  padding: 72px 0 0;
  background: var(--neutral-0);
  border-top: 1px solid var(--neutral-100);
}
.footer-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 60px;
  padding-bottom: 60px;
}
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-tagline {
  font-size: 0.9rem;
  color: var(--neutral-400);
  line-height: 1.6;
}
.footer-social { display: flex; gap: 8px; margin-top: 4px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-400);
  transition: all var(--dur-fast);
}
.social-btn:hover {
  border-color: var(--pink-300);
  color: var(--pink-500);
  background: var(--pink-50);
  transform: translateY(-2px);
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--neutral-700);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a {
  font-size: 0.875rem;
  color: var(--neutral-400);
  font-weight: 400;
  transition: color var(--dur-fast);
}
.footer-col a:hover { color: var(--pink-500); }
.footer-bottom {
  border-top: 1px solid var(--neutral-100);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--neutral-400);
}
.footer-made { display: flex; align-items: center; gap: 4px; }
.heart { color: var(--pink-500); animation: heartbeat 1.8s ease-in-out infinite; }
@keyframes heartbeat {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .api-grid { grid-template-columns: 1fr; gap: 40px; }
  .api-code-block { max-width: 560px; }
  .templates-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav, .header-actions { display: none; }
  .hamburger { display: flex; }
  .dashboard-body { grid-template-columns: 1fr; }
  .templates-grid { grid-template-columns: 1fr; }
  .stats-grid { flex-wrap: wrap; }
  .stat-item { min-width: 50%; }
  .stat-divider { display: none; }
  .hero { padding-top: calc(var(--header-h) + 48px); }
  .br-desktop { display: none; }
  .footer-links-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .hero-heading { font-size: 2.4rem; }
  .templates-grid { grid-template-columns: 1fr; }
  .stat-item { min-width: 100%; }
  .trust-row { gap: 8px; }
  .trust-sep { display: none; }
  .footer-links-grid { grid-template-columns: 1fr; }
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════
   DASHBOARD v2 — Prompt Builder Engine
   ══════════════════════════════════════════════ */

/* ── Dashboard body layout ── */
.dashboard-body-v2 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px 20px;
}

/* ── Subject Input Row ── */
.subject-row {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.subject-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.subject-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.subject-field-wrap {
  position: relative;
}
.subject-input {
  width: 100%;
  padding: 11px 80px 11px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--neutral-200);
  background: var(--neutral-0);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--neutral-800);
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
  caret-color: var(--pink-500);
}
.subject-input::placeholder { color: var(--neutral-300); font-weight: 400; }
.subject-input:focus {
  border-color: var(--pink-400);
  background: var(--pink-50);
  box-shadow: 0 0 0 3px rgba(255,20,147,0.10);
}
.subject-input:hover:not(:focus) {
  border-color: var(--pink-200);
}
.char-count {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--neutral-300);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* ── Dropdowns Row ── */
.dropdowns-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.dropdowns-row.has-5cols {
  grid-template-columns: repeat(5, 1fr);
}
.drop-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drop-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--neutral-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.drop-wrap {
  position: relative;
}
.drop-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 32px 9px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-200);
  background: var(--neutral-0);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--neutral-700);
  cursor: pointer;
  outline: none;
  transition: all var(--dur-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drop-select:not([disabled]):hover {
  border-color: var(--pink-300);
  background: var(--pink-50);
  color: var(--neutral-800);
}
.drop-select:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(255,20,147,0.10);
  background: var(--pink-50);
}
.drop-select[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--neutral-50);
}
.drop-select option { background: white; color: var(--neutral-700); }
.drop-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--neutral-300);
  transition: color var(--dur-fast);
}
.drop-wrap:has(.drop-select:not([disabled]):hover) .drop-chevron,
.drop-wrap:has(.drop-select:focus) .drop-chevron {
  color: var(--pink-400);
}
@keyframes dropdownReveal {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Live Preview Box ── */
.live-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-preview {
  position: relative;
  min-height: 130px;
  border-radius: var(--radius-lg);
  border: 1.5px solid rgba(255,110,180,0.18);
  background: linear-gradient(145deg, rgba(255,240,246,0.7) 0%, rgba(255,255,255,0.5) 100%);
  padding: 18px 20px;
  overflow: hidden;
  transition: border-color var(--dur-std), box-shadow var(--dur-std);
}
.live-preview:has(#preview-active:not([style*="display: none"])) {
  border-color: rgba(255,110,180,0.35);
  box-shadow: 0 0 0 3px rgba(255,20,147,0.06), var(--shadow-card);
}
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100px;
  text-align: center;
  padding: 8px 0;
}
.preview-hint-main {
  font-size: 0.84rem;
  color: var(--neutral-400);
  font-weight: 500;
  line-height: 1.5;
}
.preview-hint-sub {
  font-size: 0.75rem;
  color: var(--neutral-300);
  font-weight: 400;
}
.preview-active {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.preview-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.preview-text {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--neutral-700);
  font-weight: 400;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.preview-text--active {
  opacity: 1;
  transform: translateY(0);
}
.preview-glow-orb {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,20,147,0.16) 0%, transparent 70%);
  pointer-events: none;
}
.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.preview-word-count {
  font-size: 0.72rem;
  color: var(--neutral-300);
  font-variant-numeric: tabular-nums;
}
.preview-copy-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--neutral-300);
}

/* ── Actions Row ── */
.actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

/* Generate & Copy Button */
.btn-gen-copy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  background: var(--grad-main);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,20,147,0.35), 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.15s ease, box-shadow var(--dur-std) var(--ease), background var(--dur-std);
  position: relative;
  overflow: hidden;
}
.btn-gen-copy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), transparent);
  opacity: 0;
  transition: opacity var(--dur-fast);
}
.btn-gen-copy:hover::before { opacity: 1; }
.btn-gen-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,20,147,0.5), 0 2px 6px rgba(0,0,0,0.10);
}
.btn-gen-copy:active {
  transform: scale(0.95) translateY(0);
  box-shadow: 0 2px 10px rgba(255,20,147,0.3);
}
.btn-gen-copy--copied {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  box-shadow: 0 4px 20px rgba(16,185,129,0.4) !important;
}
.btn-gen-copy--shake {
  animation: shakeX 0.4s ease both;
}
@keyframes shakeX {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* Clear Button */
.btn-clear-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--neutral-200);
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--neutral-400);
  cursor: pointer;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}
.btn-clear-all:hover {
  border-color: var(--pink-300);
  color: var(--pink-500);
  background: var(--pink-50);
  transform: translateY(-1px);
}
.btn-clear-all:active { transform: translateY(0); }

/* Engine Badge */
.engine-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--pink-50);
  border: 1px solid rgba(255,20,147,0.15);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--neutral-400);
  flex-shrink: 0;
  animation: fadeSlideUp 0.3s var(--ease) both;
}
.engine-badge svg { color: var(--pink-400); }
.engine-badge strong { color: var(--pink-600); }

/* Category pill (dynamic) */
#category-pill {
  background: linear-gradient(135deg, rgba(255,20,147,0.1), rgba(194,24,91,0.08));
  border: 1px solid rgba(255,20,147,0.2);
  color: var(--pink-600);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: fadeSlideDown 0.25s var(--ease) both;
}

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  background: rgba(26, 26, 46, 0.92);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.855rem;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: auto;
  max-width: 340px;
  opacity: 0;
  transform: translateX(40px) scale(0.95);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast--visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.toast--success .toast-icon { color: #34d399; }
.toast--warning .toast-icon { color: #fbbf24; }
.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.toast-msg { line-height: 1.4; }

/* ── RESPONSIVE ADJUSTMENTS ── */
@media (max-width: 860px) {
  .dropdowns-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .dropdowns-row { grid-template-columns: 1fr; }
  .actions-row { flex-direction: column; align-items: stretch; }
  .action-btns { flex-direction: column; }
  .btn-gen-copy { text-align: center; }
  .engine-badge { align-self: center; }
  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }
}

/* ══════════════════════════════════════════════
   ENHANCE WITH AI ✨ — Gemini 1.5 Flash Button
   ══════════════════════════════════════════════ */

.btn-enhance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-full);

  /* Electric purple → deep pink gradient */
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 35%, #ec4899 70%, #be185d 100%);
  background-size: 200% 200%;
  animation: gradientShimmer 3.5s ease infinite;

  color: white;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  flex-shrink: 0;

  /* Glowing box-shadow — the premium feel */
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.3),
    0 4px 20px rgba(168,85,247,0.4),
    0 8px 32px rgba(236,72,153,0.25),
    inset 0 1px 0 rgba(255,255,255,0.18);

  transition: transform 0.18s ease, box-shadow 0.25s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

/* Inner shimmer sweep */
.btn-enhance::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255,255,255,0.18) 50%,
    transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.btn-enhance:hover::before {
  transform: translateX(100%);
}

.btn-enhance:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.4),
    0 6px 28px rgba(168,85,247,0.55),
    0 12px 40px rgba(236,72,153,0.35),
    inset 0 1px 0 rgba(255,255,255,0.22);
}
.btn-enhance:active {
  transform: scale(0.95) translateY(0);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.3),
    0 2px 10px rgba(168,85,247,0.35);
}
.btn-enhance:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
}

/* Gradient background shimmer animation */
@keyframes gradientShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Sparkle icon spin while loading */
.btn-enhance.enhancing .btn-enhance-icon svg {
  animation: sparkleSpin 1s linear infinite;
}
@keyframes sparkleSpin {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.2); }
  to   { transform: rotate(360deg) scale(1); }
}

/* Enhanced / success state — brief green flash */
.btn-enhance.enhanced {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  animation: none !important;
  box-shadow: 0 4px 20px rgba(16,185,129,0.45) !important;
}

/* ── Live Preview — AI loading pulse ── */
.live-preview.ai-loading {
  animation: previewPulse 1.4s ease-in-out infinite;
}
@keyframes previewPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(168,85,247,0); border-color: rgba(255,110,180,0.18); }
  50%       { opacity: 0.82; box-shadow: 0 0 0 4px rgba(168,85,247,0.12); border-color: rgba(168,85,247,0.5); }
}

/* ── AI-enhanced preview text highlight ── */
.preview-tag.ai-tag {
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(236,72,153,0.10)) !important;
  color: #7c3aed !important;
  border-color: rgba(124,58,237,0.25) !important;
}

/* ── Shimmer loading placeholder inside preview ── */
.ai-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
}
.ai-loading-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  animation: dotBounce 1.2s ease-in-out infinite;
  display: inline-block;
}
.ai-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
  40%           { transform: scale(1.15); opacity: 1; }
}

/* Mobile responsive tweak for 3-button row */
@media (max-width: 700px) {
  .action-btns { flex-wrap: wrap; }
  .btn-enhance { flex: 1; min-width: 140px; justify-content: center; }
}


/* ══════════════════════════════════════════════
   NEW FEATURES — Scroll Bar, Back-to-Top,
   Toast, Surprise Me, Counter, Mobile Polish
   ══════════════════════════════════════════════ */

/* ─── Scroll Progress Bar ─── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #FF6EB4, #FF1493, #C2185B);
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(255,20,147,0.5);
}

/* ─── Back to Top Button ─── */
#back-to-top {
  position: fixed;
  bottom: 28px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6EB4, #FF1493);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(255,20,147,0.38);
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
  z-index: 999;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#back-to-top:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(255,20,147,0.5);
}

/* ─── Toast Notification ─── */
#toast-container {
  position: fixed;
  bottom: 84px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9998;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: #1A1A2E;
  color: #fff;
  border-radius: 12px;
  font-size: 0.84rem; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  border-left: 3px solid #FF6EB4;
  animation: toastIn 0.32s cubic-bezier(0.22,1,0.36,1) forwards;
  pointer-events: none;
  min-width: 220px;
}
.toast.toast-out {
  animation: toastOut 0.28s ease forwards;
}
.toast svg { flex-shrink: 0; color: #FF6EB4; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ─── Surprise Me Button ─── */
.btn-surprise {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.52rem 1rem;
  border-radius: 999px;
  border: 1.5px solid #FFB3D1;
  background: #FFF0F6;
  color: #C2185B;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all 0.22s cubic-bezier(0.22,1,0.36,1);
  white-space: nowrap;
}
.btn-surprise:hover {
  background: linear-gradient(135deg, #FF6EB4, #FF1493);
  border-color: transparent;
  color: #fff;
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(255,20,147,0.3);
}
.btn-surprise.spinning svg {
  animation: spinOnce 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes spinOnce {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── Counter Animation ─── */
.stat-number[data-target] {
  display: inline-block;
  transition: color 0.3s;
}

/* ─── MOBILE POLISH — Comprehensive Responsive ─── */

/* Tablet 1024px */
@media (max-width: 1024px) {
  .hero-heading { font-size: 3rem; }
  .tpl-grid-v2 { grid-template-columns: repeat(2, 1fr) !important; }
  .tpl-nav { gap: 0.8rem; }
}

/* Phablet 768px */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .hero { padding: calc(var(--header-h) + 40px) 0 60px; }
  .hero-heading { font-size: 2.2rem; line-height: 1.2; }
  .hero-sub { font-size: 1rem; }

  .section-title { font-size: 1.8rem; }

  /* Builder full-width on mobile */
  .dashboard-card { border-radius: 16px; }
  .dashboard-body, .dashboard-body-v2 { gap: 1rem; }
  .select-wrapper select { font-size: 0.9rem; }

  /* Template grid → 1 column */
  .tpl-grid-v2 { grid-template-columns: 1fr !important; }
  .tpl-filter-tabs { gap: 0.4rem; }
  .tpl-tab { padding: 0.4rem 0.85rem; font-size: 0.75rem; }

  /* Prev/Next nav */
  .tpl-nav { gap: 0.6rem; }
  .tpl-nav-btn { padding: 0.55rem 1rem; font-size: 0.8rem; }
  .tpl-page-info { min-width: 80px; }
  .tpl-page-label { font-size: 0.7rem; }

  /* Stats */
  .stats-grid { gap: 24px; }
  .stat-number { font-size: 2rem; }

  /* Footer */
  .footer-inner { gap: 32px; }
  .footer-links-grid { grid-template-columns: repeat(2,1fr); gap: 24px; }

  /* API section */
  .api-grid { gap: 32px; }

  /* Action buttons row */
  .actions-row { flex-wrap: wrap; gap: 10px; }
  .action-btns { width: 100%; }
  .btn-gen-copy { flex: 1; justify-content: center; }
  .btn-clear-all { flex: 1; justify-content: center; }

  /* Surprise Me full width on mobile */
  .btn-surprise { width: 100%; justify-content: center; margin-top: 6px; }

  /* Back to top + toast — move left on very narrow */
  #back-to-top { bottom: 20px; right: 16px; }
  #toast-container { bottom: 72px; right: 16px; }
}

/* Phone 480px */
@media (max-width: 480px) {
  .hero-heading { font-size: 1.85rem; }
  .hero-badge { font-size: 0.72rem; }
  .hero-sub { font-size: 0.9rem; }

  .section-title { font-size: 1.5rem; }
  .section-sub { font-size: 0.88rem; }

  .container { padding: 0 16px; }

  /* Builder dropdowns stack */
  .builder-row { flex-direction: column; }

  /* Template cards */
  .tpl-name { font-size: 0.9rem; }
  .tpl-desc { font-size: 0.78rem; }

  /* Feature cards */
  .features-grid { grid-template-columns: 1fr !important; }
  .feature-card { padding: 24px 20px; }

  /* Footer single col */
  .footer-links-grid { grid-template-columns: 1fr; }

  /* Trust items wrap */
  .trust-row { gap: 6px 12px; flex-wrap: wrap; justify-content: center; }
  .trust-sep { display: none; }

  /* Stat items */
  .stat-item { min-width: 100%; text-align: center; }
  .stat-divider { display: none; }

  /* Toast smaller on phone */
  .toast { min-width: 180px; font-size: 0.8rem; padding: 10px 14px; }
}
