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

:root {
  /* Colors */
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --accent-pink: #EC4899;
  --accent-cyan: #06B6D4;
  --accent-green: #10B981;
  
  /* Backgrounds */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --bg-tertiary: #F3F4F6;
  
  /* Text */
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  
  /* Borders */
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --gradient-secondary: linear-gradient(135deg, #7C3AED 0%, #06B6D4 100%);
  --gradient-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Glow effects */
  --glow-primary: 0 0 40px rgba(124, 58, 237, 0.3);
  --glow-primary-strong: 0 0 60px rgba(124, 58, 237, 0.4);
  --glow-pink: 0 0 40px rgba(236, 72, 153, 0.3);
  --glow-cyan: 0 0 40px rgba(6, 182, 212, 0.3);
  
  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition: all 0.2s ease;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.08);
  z-index: 100;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.08);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
}

.logo-icon {
  color: var(--primary);
  font-size: 24px;
  filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.4));
  transition: var(--transition-smooth);
}

.nav-logo:hover .logo-icon {
  filter: drop-shadow(0 0 12px rgba(124, 58, 237, 0.6));
  transform: scale(1.1) rotate(15deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-discord {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-discord:hover {
  color: #5865F2;
  background: rgba(88, 101, 242, 0.1);
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 10px 18px;
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--primary);
  background: var(--gradient-soft);
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--gradient-primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.btn-login:hover {
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px);
}

.btn-login .google-icon {
  flex-shrink: 0;
}

.credit-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: default;
  transition: all 0.2s;
}
.credit-badge svg { opacity: 0.7; }
.credit-badge .credit-low { color: #DC2626; }
.credit-badge.credit-warn {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.3);
  color: #ca8a04;
}
.credit-badge.credit-empty {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  color: #DC2626;
  animation: pulse-red 2s ease-in-out infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15); }
}
.credit-badge.credit-premium {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--primary);
}
.user-upgrade-btn {
  color: var(--primary) !important; font-weight: 600 !important;
  display: flex; align-items: center; gap: 6px;
}
.user-upgrade-btn svg { stroke: var(--primary); }
.user-upgrade-btn.hidden { display: none; }

.user-menu {
  position: relative;
}

.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: var(--gradient-primary);
  transition: var(--transition-smooth);
}

.user-avatar-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 200;
  overflow: hidden;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.user-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-email {
  font-size: 12px;
  color: var(--text-tertiary);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border);
}

.user-dropdown-item {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  text-align: left;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.user-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.05);
  color: var(--text-primary);
}

.main {
  padding-top: 64px;
}

.hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--gradient-soft);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.1);
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  z-index: 1000;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  pointer-events: none;
  animation: pulse-glow 8s ease-in-out infinite;
}

.orb-purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
  top: -150px;
  right: -100px;
}

.orb-pink {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%);
  top: 30%;
  left: -100px;
  animation-delay: -3s;
}

.orb-blue {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
  bottom: 10%;
  right: 10%;
  animation-delay: -5s;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

.hero-title {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title span {
  display: block;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-pink) 50%, var(--accent-cyan) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 6s ease infinite;
  filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.3));
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

.prompt-container {
  max-width: 600px;
  margin: 0 auto;
}

.prompt-input-wrapper {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: var(--radius-2xl);
  padding: 12px;
  box-shadow: 
    0 4px 30px rgba(124, 58, 237, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-smooth);
}

.prompt-input-wrapper:focus-within {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 
    0 8px 40px rgba(124, 58, 237, 0.15),
    0 0 0 4px rgba(124, 58, 237, 0.08),
    var(--glow-primary),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.prompt-input {
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}

.prompt-input::placeholder {
  color: var(--text-tertiary);
}

.prompt-char-count {
  display: block;
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  padding: 0 16px;
  min-height: 16px;
}
.prompt-char-count.warn {
  color: #DC2626;
  font-weight: 600;
}

.prompt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px;
  margin-top: 4px;
}

.prompt-action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.prompt-action-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Image Preview Row */
.image-preview-row {
  display: flex;
  gap: 8px;
  padding: 8px 8px 4px;
  flex-wrap: wrap;
}

.image-thumb {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.image-thumb.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
}

.image-thumb-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.image-thumb:hover .image-thumb-remove {
  opacity: 1;
}

.model-toggle {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-left: auto;
}

.model-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.model-btn.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.generate-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border: none;
  background: var(--gradient-primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.generate-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.generate-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

.generate-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.generate-btn:not(:disabled):hover::before {
  opacity: 1;
}

.business-info-toggle { text-align: left; margin-top: 16px; margin-bottom: 8px; }
.business-info-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-secondary);
  font-size: 0.82rem; cursor: pointer; padding: 4px 0;
  transition: color 0.2s;
}
.business-info-btn:hover { color: var(--primary); }
.business-info-btn .chevron { transition: transform 0.2s; }
.business-info-btn.active .chevron { transform: rotate(180deg); }
.business-info-panel {
  display: none; padding: 0 0 12px; animation: fadeDown 0.2s ease;
}
.business-info-panel.active { display: block; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.business-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
@media (max-width: 640px) { .business-info-grid { grid-template-columns: 1fr; } }
.business-input {
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-primary);
  font-size: 0.85rem; color: var(--text-primary);
  transition: border-color 0.2s;
}
.business-input:focus { outline: none; border-color: var(--primary); }
.business-input::placeholder { color: var(--text-tertiary); }
.business-info-hint {
  font-size: 0.75rem; color: var(--text-tertiary); margin-top: 6px;
}

/* ─── Brand Kit ─── */
.brand-kit-toggle { text-align: left; margin-bottom: 8px; }
.brand-kit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--text-secondary);
  font-size: 0.82rem; cursor: pointer; padding: 4px 0;
  transition: color 0.2s;
}
.brand-kit-btn:hover { color: var(--primary); }
.brand-kit-btn .chevron { transition: transform 0.2s; }
.brand-kit-btn.active .chevron { transform: rotate(180deg); }
.brand-kit-panel {
  display: none; padding: 0 0 12px; animation: fadeDown 0.2s ease;
}
.brand-kit-panel.active { display: block; }
.brand-kit-grid {
  display: grid; grid-template-columns: 1fr auto auto 1fr; gap: 8px; align-items: center;
}
@media (max-width: 640px) { .brand-kit-grid { grid-template-columns: 1fr 1fr; } }
.brand-color-input {
  width: 40px; height: 40px; border: none; border-radius: 8px;
  cursor: pointer; padding: 0; background: none;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.quick-prompt-btn {
  padding: 10px 18px;
  border: 1px solid rgba(124, 58, 237, 0.12);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.quick-prompt-btn:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--primary);
  background: var(--gradient-soft);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
}

.history-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.templates-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.templates-header {
  margin-bottom: 32px;
}

.templates-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.templates-icon {
  color: var(--primary);
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.4));
}

.templates-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.templates-count {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
}

.style-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.style-filter-btn {
  padding: 8px 16px;
  border: 2px solid rgba(124, 58, 237, 0.15);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
}

.style-filter-btn:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--primary);
  background: var(--gradient-soft);
}

.style-filter-btn.active {
  background: var(--gradient-secondary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

.style-filter-btn .style-icon {
  font-size: 14px;
  line-height: 1;
}

.templates-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .style-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .style-filters::-webkit-scrollbar {
    display: none;
  }
  .style-filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .templates-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .templates-filters::-webkit-scrollbar {
    display: none;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.filter-btn {
  padding: 10px 18px;
  border: 1px solid rgba(124, 58, 237, 0.1);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--primary);
  background: var(--gradient-soft);
}

.filter-btn.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

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

@media (max-width: 900px) {
  .templates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .templates-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 36px;
  }
}

.template-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(124, 58, 237, 0.08);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
  position: relative;
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.template-card:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 
    0 20px 40px rgba(124, 58, 237, 0.12),
    0 0 0 1px rgba(124, 58, 237, 0.05),
    var(--glow-primary);
  transform: translateY(-8px);
}

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

.template-preview {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.template-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.template-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 286%;
  height: 286%;
  transform: scale(0.35);
  transform-origin: top left;
  pointer-events: none;
  border: none;
  background: white;
}
 
 .mini-preview {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-preview.light {
  background: rgba(0, 0, 0, 0.05);
}

.mini-nav {
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.mini-nav.dark {
  background: rgba(0, 0, 0, 0.1);
}

.mini-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mini-badge {
  width: 60px;
  height: 6px;
  background: rgba(124, 58, 237, 0.5);
  border-radius: 3px;
}

.mini-title {
  width: 80%;
  height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
}

.mini-title.dark {
  background: rgba(0, 0, 0, 0.2);
}

.mini-title.large {
  width: 90%;
  height: 16px;
}

.mini-title.serif {
  width: 70%;
}

.mini-subtitle {
  width: 60%;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.mini-subtitle.dark {
  background: rgba(0, 0, 0, 0.1);
}

.mini-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mini-btn {
  width: 50px;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

.mini-btn.primary {
  background: var(--primary);
}

.mini-btn.pink {
  background: #EC4899;
}

.mini-btn.white {
  background: white;
}

.mini-btn.outline {
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: transparent;
}

.mini-btn.outline-white {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
}

.mini-avatar {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
}

.mini-grid {
  display: flex;
  gap: 8px;
}

.mini-card {
  flex: 1;
  height: 40px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
}

.mini-hero-split {
  display: flex;
  gap: 12px;
  flex: 1;
  align-items: center;
  padding: 8px;
}

.mini-text-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-product-img {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  border-radius: var(--radius-md);
}

.mini-stats {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mini-stat {
  width: 40px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
}

.mini-hero-full {
  flex: 1;
  position: relative;
  background: linear-gradient(135deg, #d4b896 0%, #c9a87c 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.mini-center-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mini-features {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mini-feature {
  width: 50px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
}

.template-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.template-card:hover .template-overlay {
  opacity: 1;
}

.preview-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.preview-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), var(--glow-primary);
}

.template-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: white;
}

.template-info {
  padding: 20px;
}

.template-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.template-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.template-prompt {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.prompt-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.prompt-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
}

.coming-soon {
  text-align: center;
  padding: 48px;
  margin-top: 24px;
}

.coming-soon p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.coming-soon-badge {
  display: inline-block;
  padding: 8px 20px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: white;
  box-shadow: var(--glow-primary);
  animation: float 3s ease-in-out infinite;
}

.footer {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(124, 58, 237, 0.03) 100%);
  border-top: 1px solid rgba(124, 58, 237, 0.08);
  padding: 40px 24px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gradient-primary);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-copyright {
  color: var(--text-tertiary);
  font-size: 14px;
}
.app-version {
  opacity: 0.5;
  font-size: 12px;
  margin-left: 4px;
}

/* ═══ FULLSCREEN EDITOR MODAL ═══ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.active { opacity: 1; visibility: visible; }

.modal-content {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal.active .modal-content { transform: translateY(0); }

/* ─── Toolbar ─── */
.editor-toolbar {
  display: flex; align-items: center; height: 52px;
  padding: 0 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-primary); flex-shrink: 0; gap: 12px; z-index: 10;
}
.toolbar-left {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.toolbar-close {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--bg-tertiary);
  border-radius: var(--radius-md); color: var(--text-secondary);
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.toolbar-close:hover { background: var(--border); color: var(--text-primary); }
.toolbar-title {
  font-size: 15px; font-weight: 600; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toolbar-category {
  padding: 3px 8px; background: var(--bg-tertiary);
  border-radius: var(--radius-full); font-size: 11px;
  color: var(--text-secondary); white-space: nowrap; flex-shrink: 0;
}
.quality-score-badge {
  padding: 3px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.quality-score-badge.score-s { background: linear-gradient(135deg, #7C3AED, #EC4899); color: #fff; }
.quality-score-badge.score-a { background: linear-gradient(135deg, #10B981, #06B6D4); color: #fff; }
.quality-score-badge.score-b { background: var(--bg-tertiary); color: var(--text-secondary); }
.quality-score-badge.score-c { background: #FEF3C7; color: #92400E; }
.toolbar-center { flex-shrink: 0; }
.toolbar-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; position: relative;
}
.toolbar-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg-secondary);
  border-radius: var(--radius-md); color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.toolbar-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ─── More Menu ─── */
.more-menu {
  display: none; position: absolute; top: 44px; right: 0;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 6px;
  min-width: 200px; box-shadow: var(--shadow-xl); z-index: 100;
}
.more-menu.active { display: block; }
.more-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 12px; border: none;
  background: transparent; color: var(--text-primary);
  font-size: 13px; font-weight: 500; border-radius: var(--radius-md);
  cursor: pointer; transition: var(--transition); text-align: left;
}
.more-menu-item:hover { background: var(--bg-tertiary); }
.more-menu-item svg { color: var(--text-secondary); flex-shrink: 0; }
.more-menu-divider { height: 1px; background: var(--border); margin: 4px 0; }
.color-picker-inline { display: none; padding: 8px 12px; gap: 6px; flex-wrap: wrap; }
.color-picker-inline.active { display: flex; }
.font-select-inline {
  display: none; width: calc(100% - 24px); margin: 4px 12px;
  height: 32px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-primary); color: var(--text-primary); padding: 0 8px; font-size: 12px;
}
.font-select-inline.active { display: block; }
.modal-view-toggle {
  display: flex; background: var(--bg-tertiary);
  border-radius: var(--radius-md); padding: 3px; width: 100%;
}
.modal-view-btn {
  flex: 1; padding: 5px 12px; border: none; background: transparent;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); text-align: center;
}
.modal-view-btn.active {
  background: var(--bg-primary); color: var(--text-primary); box-shadow: var(--shadow-sm);
}

/* ─── Viewport & Template Buttons ─── */
.viewport-toggle {
  display: flex; background: var(--bg-tertiary);
  border-radius: var(--radius-md); padding: 3px;
}
.viewport-btn {
  width: 34px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.viewport-btn:hover { color: var(--text-primary); }
.viewport-btn.active {
  background: var(--bg-primary); color: var(--text-primary); box-shadow: var(--shadow-sm);
}
.use-template-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: none;
  background: var(--gradient-primary); color: white;
  font-size: 13px; font-weight: 600; border-radius: var(--radius-lg);
  cursor: pointer; transition: var(--transition-smooth); white-space: nowrap;
}
.use-template-btn:hover { transform: translateY(-1px); box-shadow: var(--glow-primary); }

/* ─── Preview & Code Areas ─── */
.editor-preview {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg-tertiary);
  position: relative; isolation: isolate; min-height: 0;
}

.editor-code {
  flex: 1; display: flex; padding: 16px; overflow: hidden;
  background: var(--bg-tertiary);
}

.modal-code-block {
  position: relative; width: 100%; height: 100%;
  background: #1e1e2e; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-xl);
}
.modal-code-block pre {
  margin: 0; padding: 20px; height: 100%; overflow: auto;
  font-family: 'Courier New','Monaco','Menlo',monospace;
  font-size: 13px; line-height: 1.6; color: #cdd6f4; background: #1e1e2e;
}
.modal-code-block code { font-family: inherit; font-size: inherit; color: inherit; }
.code-tag { color: #89b4fa; } .code-attr { color: #a6e3a1; }
.code-str { color: #f38ba8; } .code-comment { color: #6c7086; }
.modal-code-copy {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-md);
  background: rgba(255,255,255,0.08); color: #cdd6f4;
  cursor: pointer; transition: var(--transition); z-index: 10;
}
.modal-code-copy:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.25); color: white; }

.preview-frame {
  width: 100%; height: 100%; border: none; background: white;
  transition: width 0.3s ease;
  transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.preview-frame.mobile { max-width: 375px; width: 100%; height: 100%; margin: 0 auto; box-shadow: 0 4px 24px rgba(0,0,0,0.12); border-radius: 16px; }
.preview-frame.tablet { max-width: 768px; width: 100%; height: 100%; margin: 0 auto; box-shadow: 0 4px 24px rgba(0,0,0,0.08); border-radius: 12px; }

/* ─── Edit Popover ─── */
.edit-popover {
  position: absolute; z-index: 50;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(124,58,237,0.08);
  padding: 14px; width: 300px; animation: popoverIn 0.2s ease;
}
@keyframes popoverIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.popover-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.popover-label {
  font-size: 12px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 4px;
}
.popover-label::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.popover-close {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--text-tertiary);
  cursor: pointer; border-radius: var(--radius-sm); transition: var(--transition);
}
.popover-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.popover-quick-actions { display: flex; gap: 5px; margin-bottom: 10px; }
.popover-quick-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-full); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: var(--transition-smooth); white-space: nowrap;
}
.popover-quick-btn:hover, .popover-quick-btn.active {
  border-color: var(--primary); color: var(--primary); background: var(--gradient-soft);
}
.popover-input-row { display: flex; gap: 6px; }
.popover-input {
  flex: 1; height: 36px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-secondary);
  padding: 0 12px; font-size: 13px; color: var(--text-primary);
}
.popover-input:focus { outline: none; border-color: rgba(124,58,237,0.5); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.popover-apply {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: var(--radius-lg);
  background: var(--gradient-primary); color: white;
  cursor: pointer; transition: var(--transition-smooth);
}
.popover-apply:hover { transform: translateY(-1px); box-shadow: var(--glow-primary); }

/* ─── SEO Overlay ─── */
.seo-overlay {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.seo-panel-float {
  background: var(--bg-primary); border-radius: var(--radius-xl);
  padding: 24px; width: 90%; max-width: 500px; box-shadow: var(--shadow-xl);
}
.seo-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-size: 15px; font-weight: 600;
}

/* ─── Atmosphere Overlay ─── */
.atmosphere-overlay {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.atmosphere-panel-float {
  background: var(--bg-primary); border-radius: var(--radius-xl);
  padding: 24px; width: 90%; max-width: 420px; box-shadow: var(--shadow-xl);
}
.atmosphere-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-size: 15px; font-weight: 600;
}
.atmosphere-desc {
  font-size: 13px; color: var(--text-secondary); margin: 0 0 16px 0;
}
.atmosphere-axes {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px;
}
.atmosphere-axis {
  display: flex; gap: 6px; background: var(--bg-tertiary);
  border-radius: var(--radius-lg); padding: 4px; overflow: hidden;
}
.atmosphere-toggle-btn {
  flex: 1; padding: 8px 0; border: none; background: transparent;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.atmosphere-toggle-btn:hover { color: var(--text-primary); }
.atmosphere-toggle-btn.active {
  background: var(--bg-primary); color: var(--primary);
  font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.atmosphere-custom-input {
  width: 100%; height: 40px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-secondary);
  padding: 0 14px; font-size: 13px; color: var(--text-primary);
  margin-bottom: 16px; box-sizing: border-box;
}
.atmosphere-custom-input:focus {
  outline: none; border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.atmosphere-apply-btn {
  width: 100%; height: 42px; border: none;
  border-radius: var(--radius-lg); background: var(--gradient-primary);
  color: white; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition-smooth);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.atmosphere-apply-btn:hover {
  transform: translateY(-1px); box-shadow: var(--glow-primary);
}

/* ─── Bottom Bar ─── */
.editor-bottombar {
  display: flex; align-items: center; height: 52px; padding: 0 12px;
  border-top: 1px solid var(--border); background: var(--bg-primary);
  flex-shrink: 0; gap: 8px; z-index: 10;
}
.bottombar-left { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bottombar-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg-secondary);
  border-radius: var(--radius-md); color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.bottombar-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.bottombar-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.bottombar-divider { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.bottombar-select {
  height: 34px; max-width: 180px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-secondary); color: var(--text-primary);
  padding: 0 8px; font-size: 12px;
}
.bottombar-center { flex: 1; display: flex; gap: 6px; min-width: 0; }
.bottombar-input {
  flex: 1; height: 36px; border: 1px solid var(--border);
  border-radius: var(--radius-xl); background: var(--bg-secondary);
  padding: 0 14px; font-size: 13px; color: var(--text-primary);
}
.bottombar-input:focus { outline: none; border-color: rgba(124,58,237,0.5); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.bottombar-apply {
  display: flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 14px; border: none;
  border-radius: var(--radius-xl); background: var(--gradient-primary);
  color: white; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: var(--transition-smooth); white-space: nowrap;
}
.bottombar-apply:hover { transform: translateY(-1px); box-shadow: var(--glow-primary); }
.bottombar-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* ─── Editor Responsive ─── */
@media (max-width: 768px) {
  .editor-toolbar { padding: 0 10px; gap: 8px; height: 48px; }
  .toolbar-title { font-size: 13px; max-width: 100px; }
  .toolbar-category { display: none; }
  .use-template-btn { font-size: 12px; padding: 6px 12px; }
  .viewport-toggle { display: none; }
  .editor-bottombar { height: 48px; padding: 0 8px; gap: 4px; }
  .bottombar-select { display: none; }
  .bottombar-divider { display: none; }
  .bottombar-input { font-size: 12px; padding: 0 10px; }
  .bottombar-apply { padding: 0 10px; font-size: 12px; }
  .bottombar-apply svg { display: none; }
  .edit-popover {
    position: fixed !important;
    bottom: 52px !important; left: 0 !important; right: 0 !important;
    top: auto !important; width: 100% !important;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: sheetUp 0.25s ease;
  }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
}
@media (max-width: 480px) {
  .toolbar-title { max-width: 70px; }
  .use-template-btn { display: none; }
  .bottombar-left .bottombar-btn:nth-child(n+3) { display: none; }
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 32px;
}

.hero-stat strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-stat span {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
  flex-shrink: 0;
}

.pricing-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 24px 100px;
  text-align: center;
}

.pricing-header {
  margin-bottom: 48px;
}

.pricing-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.pricing-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.pricing-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

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

.pricing-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: 36px 28px;
  text-align: left;
  position: relative;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.15);
}

.pricing-card.featured:hover {
  box-shadow: var(--glow-primary), 0 8px 30px rgba(124, 58, 237, 0.2);
}

.pricing-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  background: var(--gradient-primary);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.pricing-plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.pricing-price {
  margin-bottom: 24px;
}

.pricing-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pricing-period {
  font-size: 14px;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: 700;
  font-size: 13px;
}

.pricing-features li.disabled {
  color: var(--text-tertiary);
}

.pricing-features li.disabled::before {
  content: '—';
  color: var(--text-tertiary);
}

.pricing-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pricing-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pricing-btn.primary {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
}

.pricing-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.pricing-btn.current {
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  cursor: default;
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
  
  .hero-stats {
    gap: 16px;
  }
  
  .hero-stat strong {
    font-size: 16px;
  }
}

.generation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.generation-overlay.active {
  display: flex;
  opacity: 1;
}

.generation-modal {
  background: rgba(18, 18, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 44px 48px 36px;
  text-align: center;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.96) translateY(8px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
  width: 90%;
}

.generation-overlay.active .generation-modal {
  transform: scale(1) translateY(0);
}

.generation-spinner-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 28px;
}

.generation-spinner {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.generation-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: white;
  opacity: 0.9;
}

.generation-status {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.generation-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  margin: 0 auto 24px;
  overflow: hidden;
}

.generation-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.generation-analysis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  min-height: 0;
}

.gallery-link-btn {
  font-size: 0.78rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  margin-left: 8px;
  transition: opacity 0.2s;
}
.gallery-link-btn:hover {
  opacity: 0.7;
}

.batch-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}
.batch-export-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--gradient-soft);
}
.batch-export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.creation-title-input {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  width: 200px;
  transition: border-color 0.2s;
}
.creation-title-input:focus {
  outline: none;
  border-color: var(--primary);
}
.creation-title-input::placeholder {
  color: var(--text-tertiary);
}

.generation-cancel-btn {
  margin-top: 8px;
  padding: 7px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
}
.generation-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

.analysis-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(6px);
  animation: chip-appear 0.3s ease forwards;
}

.analysis-chip:nth-child(1) { animation-delay: 0s; }
.analysis-chip:nth-child(2) { animation-delay: 0.1s; }
.analysis-chip:nth-child(3) { animation-delay: 0.2s; }
.analysis-chip:nth-child(4) { animation-delay: 0.3s; }

@keyframes chip-appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chip-arrow {
  color: var(--primary-light);
  font-weight: 600;
}

.color-customize-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.color-customize-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--gradient-soft);
}

.color-picker-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(-8px);
  transform-origin: top right;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
}

.color-picker-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.color-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-bounce);
  box-shadow: var(--shadow-sm);
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  border-color: var(--text-primary);
  box-shadow: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--text-primary);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.download-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--gradient-soft);
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #0891b2;
  background: rgba(8, 145, 178, 0.08);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: #0891b2;
  cursor: pointer;
  transition: var(--transition);
}

.share-btn:hover {
  background: rgba(8, 145, 178, 0.18);
  border-color: #06b6d4;
  color: #06b6d4;
}

/* modal-footer removed — content moved to toolbar + bottombar */

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3000;
}

.toast.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.toast-error {
  background: #991b1b;
  color: #fef2f2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.toast-retry-btn {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.toast-retry-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* legacy edit styles removed — now using popover + bottombar */


@media (max-width: 768px) {
  .generation-modal {
    padding: 32px 24px;
    margin: 0 16px;
  }

  .generation-progress {
    width: 220px;
  }

  .templates-search {
    width: 100%;
  }

  .prompt-container .prompt-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .business-info-grid {
    grid-template-columns: 1fr;
  }

  .brand-kit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .seo-input {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}

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

  .brand-color-input {
    width: 100%;
    height: 36px;
  }

  .seo-grid {
    gap: 6px;
  }

  .seo-apply-btn {
    width: 100%;
  }
}

/* ─── Template Search ─── */
.templates-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}

.templates-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.templates-search svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.templates-search-input {
  border: none;
  background: none;
  outline: none;
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 100%;
  font-family: inherit;
}

.templates-search-input::placeholder {
  color: var(--text-tertiary);
}

/* ─── Prompt Enhance Button ─── */
#promptEnhanceBtn.loading {
  opacity: 0.5;
  pointer-events: none;
  animation: spin 1s linear infinite;
}

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

/* ─── History Delete Button ─── */
.history-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: none;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 5;
  backdrop-filter: blur(4px);
}

.history-card:hover .history-delete-btn {
  opacity: 1;
}

.history-delete-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.1);
}

/* ─── Mobile Responsive Improvements ─── */
@media (max-width: 480px) {
  .hero-title span {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .hero-stat-sep {
    display: none;
  }

  .prompt-input-wrapper {
    flex-direction: column;
  }

  .prompt-input {
    font-size: 14px;
  }

  .prompt-actions {
    width: 100%;
    justify-content: space-between;
  }

  .quick-prompts {
    gap: 6px;
  }

  .quick-prompt-btn {
    font-size: 12px;
    padding: 6px 10px;
  }

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

  .templates-filters {
    gap: 4px;
  }

  .filter-btn {
    font-size: 11px;
    padding: 4px 8px;
  }

  .nav-container {
    padding: 0 12px;
    height: 56px;
  }

  .credit-badge {
    font-size: 11px;
    padding: 3px 8px;
  }
}


/* ─── Lang Toggle ─── */
.lang-toggle {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.lang-toggle:hover {
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.08);
}

/* ─── Dark Mode Toggle ─── */
.dark-mode-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.dark-mode-toggle:hover {
  color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}
body.dark-mode .dm-sun { display: none; }
body:not(.dark-mode) .dm-moon { display: none; }

/* ─── Dark Mode Smooth Transition ─── */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ─── Dark Mode Variables ─── */
body.dark-mode {
  --bg-primary: #0F0F14;
  --bg-secondary: #1A1A24;
  --bg-tertiary: #242432;
  --text-primary: #F0F0F5;
  --text-secondary: #9CA3B5;
  --text-tertiary: #6B7290;
  --border: #2A2A3A;
  --border-light: #1F1F2F;
  --gradient-glass: linear-gradient(135deg, rgba(15, 15, 20, 0.9) 0%, rgba(15, 15, 20, 0.7) 100%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --gradient-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
}

/* ─── Dark Mode Component Overrides ─── */
body.dark-mode .navbar {
  background: rgba(15, 15, 20, 0.85);
  border-bottom-color: rgba(124, 58, 237, 0.12);
}
body.dark-mode .navbar.scrolled {
  background: rgba(15, 15, 20, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .prompt-input-wrapper {
  background: rgba(26, 26, 36, 0.9);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
body.dark-mode .prompt-input-wrapper:focus-within {
  box-shadow: 0 8px 40px rgba(124, 58, 237, 0.2), 0 0 0 4px rgba(124, 58, 237, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark-mode .template-card {
  background: rgba(26, 26, 36, 0.9);
  border-color: rgba(124, 58, 237, 0.12);
}
body.dark-mode .template-card:hover {
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

body.dark-mode .modal-content {
  background: rgba(15, 15, 20, 0.98);
}

body.dark-mode .editor-toolbar {
  border-bottom-color: var(--border);
}
body.dark-mode .toolbar-title { color: var(--text-primary); }
body.dark-mode .toolbar-category { color: var(--text-secondary); }
body.dark-mode .editor-bottombar {
  border-top-color: var(--border);
  background: var(--bg-secondary);
}
body.dark-mode .bottombar-input {
  background: var(--bg-tertiary);
  border-color: var(--border);
  color: var(--text-primary);
}
body.dark-mode .bottombar-select {
  background: var(--bg-tertiary);
  border-color: var(--border);
  color: var(--text-primary);
}
body.dark-mode .bottombar-btn {
  background: var(--bg-tertiary);
  border-color: var(--border);
}
body.dark-mode .more-menu {
  background: var(--bg-secondary);
  border-color: var(--border);
}
body.dark-mode .more-menu-item:hover {
  background: rgba(124, 58, 237, 0.1);
}
body.dark-mode .edit-popover {
  background: var(--bg-secondary);
  border-color: var(--border);
}
body.dark-mode .popover-input {
  background: var(--bg-tertiary);
  border-color: var(--border);
  color: var(--text-primary);
}
body.dark-mode .seo-panel-float {
  background: var(--bg-secondary);
  border-color: var(--border);
}
body.dark-mode .seo-input {
  background: var(--bg-tertiary);
  border-color: var(--border);
  color: var(--text-primary);
}

body.dark-mode .business-input {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-primary);
}

body.dark-mode .btn-login {
  background: rgba(26, 26, 36, 0.9);
  border-color: var(--border);
  color: var(--text-primary);
}
body.dark-mode .btn-login:hover {
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.2);
}

body.dark-mode .user-dropdown {
  background: rgba(26, 26, 36, 0.95);
  border-color: var(--border);
}
body.dark-mode .user-dropdown-item:hover {
  background: rgba(124, 58, 237, 0.1);
}

body.dark-mode .filter-btn {
  background: rgba(26, 26, 36, 0.8);
  border-color: rgba(124, 58, 237, 0.12);
  color: var(--text-secondary);
}
body.dark-mode .filter-btn:hover {
  background: var(--gradient-soft);
  color: var(--primary-light);
}

body.dark-mode .btn-secondary {
  background: rgba(26, 26, 36, 0.8);
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--text-secondary);
}

body.dark-mode .credit-badge {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.2);
}

body.dark-mode .footer {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(124, 58, 237, 0.05) 100%);
  border-top-color: rgba(124, 58, 237, 0.12);
}

body.dark-mode .hero-badge {
  background: rgba(26, 26, 36, 0.8);
  border-color: rgba(124, 58, 237, 0.2);
}

body.dark-mode .hero-stat strong {
  color: #fff;
}

body.dark-mode .templates-search-input {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--text-primary);
}

body.dark-mode .modal-code-block {
  background: #0A0A0F;
}

body.dark-mode .generation-modal {
  background: rgba(26, 26, 36, 0.95);
}

body.dark-mode .coming-soon {
  background: rgba(26, 26, 36, 0.6);
  border-color: rgba(124, 58, 237, 0.12);
}

body.dark-mode .business-info-panel,
body.dark-mode .brand-kit-panel {
  background: rgba(26, 26, 36, 0.6);
}

body.dark-mode .business-info-btn,
body.dark-mode .brand-kit-btn {
  color: var(--text-secondary);
}

body.dark-mode .dark-mode-toggle {
  border-color: var(--border);
  color: var(--text-secondary);
}
body.dark-mode .dark-mode-toggle:hover {
  color: #F5D565;
  background: rgba(245, 213, 101, 0.1);
  border-color: rgba(245, 213, 101, 0.3);
}

/* ─── Skeleton Loading ─── */
.skeleton-card { pointer-events: none; }
.skeleton-box {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-line {
  height: 14px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* ─── SEO Panel ─── */
.seo-panel {
  display: none;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: 8px;
  border: 1px solid var(--border-light);
}
.seo-panel.active {
  display: block;
}
.seo-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seo-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.seo-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
}
.seo-input:focus {
  outline: none;
  border-color: var(--primary);
}
.seo-input::placeholder {
  color: var(--text-tertiary);
}
.seo-preview {
  margin-top: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-family: Arial, sans-serif;
}
.seo-preview-title {
  font-size: 20px;
  color: #1a0dab;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.seo-preview-url {
  font-size: 14px;
  color: #006621;
  margin-top: 2px;
}
.seo-preview-desc {
  font-size: 14px;
  color: #545454;
  line-height: 1.5;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.dark-mode .seo-preview {
  background: #1a1a24;
  border-color: #333;
}
body.dark-mode .seo-preview-title { color: #8ab4f8; }
body.dark-mode .seo-preview-url { color: #bdc1c6; }
body.dark-mode .seo-preview-desc { color: #9aa0a6; }

.seo-char-count {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 2px;
}
.seo-char-count.warn {
  color: #DC2626;
  font-weight: 600;
}
.seo-apply-btn {
  margin-top: 10px;
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.seo-apply-btn:hover {
  background: var(--primary-dark);
}

/* ─── Publish Panel ─── */
.publish-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(4px);
}
.publish-panel-float {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  padding: 28px;
  width: 420px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.publish-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 1rem;
}
.publish-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 18px;
}
.publish-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.publish-slug-row {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.publish-slug-prefix {
  padding: 8px 4px 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.publish-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: var(--transition);
}
.publish-slug-row .publish-input {
  border: none;
  border-radius: 0;
  padding-left: 2px;
}
.publish-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.publish-slug-row:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.publish-slug-hint {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-top: -6px;
}
.publish-slug-hint.error {
  color: #DC2626;
  font-weight: 600;
}
.publish-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.publish-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.publish-label svg {
  display: inline;
  vertical-align: -3px;
  margin-right: 4px;
}
.publish-apply-btn {
  margin-top: 16px;
  width: 100%;
  padding: 11px 20px;
  border: none;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), #EC4899);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.publish-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
}
.publish-apply-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}
.publish-result {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--primary);
}
.publish-result-url {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  word-break: break-all;
  margin-bottom: 10px;
}
.publish-copy-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.publish-copy-btn:hover {
  background: var(--primary-dark);
}

/* Publish button in bottombar */
.bottombar-publish-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--primary), #EC4899) !important;
  color: #fff !important;
  border-radius: var(--radius-full) !important;
  padding: 6px 14px !important;
  font-size: 0.78rem;
  font-weight: 600;
}
.bottombar-publish-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(124,58,237,.3);
}

/* ─── Business Category Quick Prompts ─── */
.biz-category-section {
  margin-top: 16px;
}
.biz-category-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.biz-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.biz-category-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.biz-category-btn:hover {
  border-color: var(--primary);
  background: rgba(124,58,237,.06);
  color: var(--primary);
  transform: translateY(-1px);
}
.biz-category-btn .biz-emoji {
  font-size: 1rem;
}

/* Dark mode additions */
.dark-mode .publish-panel-float {
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.dark-mode .publish-overlay {
  background: rgba(0,0,0,.5);
}

/* ─── My Published Sites ─── */
.my-sites-section {
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.my-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.site-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative;
}
.site-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.site-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.site-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--gradient-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.site-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.site-card-date {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}
.site-card-url {
  display: block;
  font-size: 0.78rem;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-card-url:hover {
  text-decoration: underline;
}
.site-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.site-action-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}
.site-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(124,58,237,.06);
}
.site-action-btn.danger:hover {
  border-color: #DC2626;
  color: #DC2626;
  background: rgba(220,38,38,.06);
}
.site-card-badge {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16,185,129,.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.site-card-views {
  position: absolute;
  top: 12px;
  right: 58px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(124,58,237,.08);
}

/* ─── Leads Modal ─── */
.leads-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.leads-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
}
.leads-modal-content {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 560px;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.leads-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  font-weight: 700;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}
.leads-list {
  padding: 16px 24px 24px;
  overflow-y: auto;
  flex: 1;
}
.leads-empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: 32px 0;
  font-size: 0.85rem;
}
.lead-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.lead-item:last-child {
  border-bottom: none;
}
.lead-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lead-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.lead-item-time {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}
.lead-item-contact {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.lead-item-contact a {
  color: var(--primary);
  text-decoration: none;
}
.lead-item-contact a:hover {
  text-decoration: underline;
}
.lead-item-message {
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.5;
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

/* Lead inbox status styles */
.lead-item.unread {
  border-left: 3px solid var(--primary);
  padding-left: 11px;
  background: color-mix(in srgb, var(--primary) 4%, transparent);
}
.lead-item.unread .lead-item-name {
  font-weight: 800;
}
.lead-item.completed {
  opacity: 0.65;
}
.lead-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  flex-shrink: 0;
}
.lead-status-dot.new {
  background: #3b82f6;
}
.lead-status-dot.read {
  background: transparent;
}
.lead-status-dot.completed {
  background: #22c55e;
}
.lead-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.lead-action-btn {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.lead-action-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.lead-action-btn.complete {
  border-color: #22c55e;
  color: #22c55e;
}
.lead-action-btn.complete:hover {
  background: #22c55e;
  color: #fff;
}
.lead-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1;
}
.leads-filter-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}
.leads-filter-tab {
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.leads-filter-tab:hover {
  color: var(--text-primary);
}
.leads-filter-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.lead-status-label {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.lead-status-label.new {
  background: color-mix(in srgb, #3b82f6 15%, transparent);
  color: #3b82f6;
}
.lead-status-label.completed {
  background: color-mix(in srgb, #22c55e 15%, transparent);
  color: #22c55e;
}

/* Dark mode inbox additions */
.dark-mode .lead-item.unread {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.dark-mode .lead-action-btn {
  background: var(--bg-primary);
}

/* Dark mode - My Sites & Leads */
.dark-mode .site-card {
  box-shadow: none;
}
.dark-mode .leads-modal-content {
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

/* ─── Pricing Modal ─── */
.pricing-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pricing-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
}
.pricing-modal-content {
  position: relative;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  padding: 36px 32px 32px;
  width: 580px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
}
.pricing-header {
  text-align: center;
  margin-bottom: 24px;
}
.pricing-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary);
  background: rgba(124,58,237,.1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.pricing-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pricing-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.pricing-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pricing-plan {
  padding: 22px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.pricing-plan h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pricing-plan.premium {
  border-color: var(--primary);
  background: var(--gradient-soft);
}
.pricing-popular {
  position: absolute;
  top: -10px;
  right: 16px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  background: var(--gradient-primary);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  letter-spacing: .04em;
}
.pricing-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.pricing-price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.pricing-features li {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
}
.pricing-current {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 8px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
}
.pricing-cta {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.pricing-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
}
.dark-mode .pricing-modal-content {
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
@media (max-width: 520px) {
  .pricing-plans {
    grid-template-columns: 1fr;
  }
}

/* Responsive - My Sites */
@media (max-width: 480px) {
  .my-sites-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══ AI CHAT EDITOR PANEL ═══ */
.ai-chat-panel {
  position: absolute; top: 52px; right: 0; bottom: 52px;
  width: 380px; background: var(--bg-primary);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}
.ai-chat-panel.active { transform: translateX(0); }
.chat-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
}
.chat-panel-title svg { color: var(--primary); }
.chat-panel-close {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: none; background: var(--bg-tertiary); border-radius: var(--radius-md);
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.chat-panel-close:hover { background: var(--border); color: var(--text-primary); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.chat-welcome {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 40px 20px;
  color: var(--text-secondary); font-size: 14px; gap: 8px; flex: 1;
}
.chat-welcome-icon {
  font-size: 32px; background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.chat-welcome-sub { font-size: 12px; color: var(--text-tertiary); }
.chat-msg {
  display: flex; flex-direction: column; gap: 4px;
  animation: chatMsgIn 0.3s ease;
}
@keyframes chatMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.user { align-items: flex-end; }
.chat-msg.ai { align-items: flex-start; }
.chat-msg-label {
  font-size: 11px; font-weight: 600; color: var(--text-tertiary);
  padding: 0 4px;
}
.chat-msg-bubble {
  max-width: 90%; padding: 10px 14px;
  border-radius: 14px; font-size: 13px; line-height: 1.5;
  word-break: break-word;
}
.chat-msg.user .chat-msg-bubble {
  background: var(--gradient-primary); color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg.ai .chat-msg-bubble {
  background: var(--bg-tertiary); color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg.ai .chat-msg-bubble.error {
  background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA;
}
.chat-msg-loading {
  display: flex; gap: 4px; padding: 12px 14px;
}
.chat-msg-loading span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-tertiary);
  animation: chatDot 1.2s infinite;
}
.chat-msg-loading span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg-loading span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatDot { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 16px; border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}
.chat-chip {
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-full); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.chat-chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(124,58,237,0.05); }
.chat-input-area {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-input {
  flex: 1; height: 40px; border: 1px solid var(--border);
  border-radius: var(--radius-xl); background: var(--bg-secondary);
  padding: 0 14px; font-size: 13px; color: var(--text-primary);
}
.chat-input:focus { outline: none; border-color: rgba(124,58,237,0.5); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.chat-send-btn {
  width: 40px; height: 40px; border: none;
  border-radius: var(--radius-xl); background: var(--gradient-primary);
  color: white; cursor: pointer; transition: var(--transition-smooth);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--glow-primary); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.chat-toggle-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Chat panel mobile */
@media (max-width: 768px) {
  .ai-chat-panel {
    width: 100%; top: auto; bottom: 0; left: 0; right: 0;
    height: 60vh; border-left: none;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    transform: translateY(100%);
  }
  .ai-chat-panel.active { transform: translateY(0); }
}

/* Dark mode chat */
body.dark-mode .ai-chat-panel { background: #1a1a2e; border-color: #2d2d44; }
body.dark-mode .chat-panel-header { border-color: #2d2d44; }
body.dark-mode .chat-panel-close { background: #2d2d44; color: #a0a0b8; }
body.dark-mode .chat-msg.ai .chat-msg-bubble { background: #2d2d44; color: #e0e0e8; }
body.dark-mode .chat-chip { border-color: #2d2d44; background: #2d2d44; color: #a0a0b8; }
body.dark-mode .chat-chip:hover { border-color: var(--primary); color: var(--primary-light); }
body.dark-mode .chat-input { background: #2d2d44; border-color: #3d3d55; color: #e0e0e8; }
body.dark-mode .chat-input-area { border-color: #2d2d44; }
body.dark-mode .chat-suggestions { border-color: #2d2d44; }
body.dark-mode .chat-welcome { color: #a0a0b8; }
body.dark-mode .chat-welcome-sub { color: #666680; }

/* ═══ LANDING / VALUE PROPOSITION SECTION ═══ */
.landing-hero-section {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: clamp(80px, 12vw, 140px) clamp(1rem, 4vw, 3rem);
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}
.landing-hero-section::before {
  content: ''; position: absolute; top: -200px; left: 50%;
  transform: translateX(-50%); width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.landing-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--radius-full);
  background: rgba(124,58,237,0.08); color: var(--primary);
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
  border: 1px solid rgba(124,58,237,0.15);
}
.landing-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); animation: pulse 2s infinite;
}
.landing-title {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 1.1; color: var(--text-primary);
  margin-bottom: 20px; max-width: 800px;
}
.landing-title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.landing-subtitle {
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
  color: var(--text-secondary); max-width: 600px;
  line-height: 1.7; margin-bottom: 32px;
}
.landing-stats-row {
  display: flex; align-items: center; gap: 32px;
  margin-bottom: 40px; flex-wrap: wrap; justify-content: center;
}
.landing-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.landing-stat strong {
  font-size: 28px; font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.landing-stat span { font-size: 13px; color: var(--text-tertiary); }
.landing-cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.landing-cta-primary {
  padding: 14px 32px; border: none; border-radius: var(--radius-full);
  background: var(--gradient-primary); color: white;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: var(--transition-smooth); display: flex; align-items: center; gap: 8px;
}
.landing-cta-primary:hover { transform: translateY(-2px); box-shadow: var(--glow-primary-strong); }
.landing-cta-secondary {
  padding: 14px 32px; border: 1.5px solid var(--border);
  border-radius: var(--radius-full); background: transparent;
  color: var(--text-primary); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: var(--transition-smooth);
}
.landing-cta-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* Feature Highlights */
.landing-features {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; max-width: 1100px; width: 100%;
  margin: 60px auto 0; padding: 0 clamp(1rem, 4vw, 3rem);
}
.landing-feature-card {
  padding: 28px 24px; border-radius: var(--radius-xl);
  background: var(--bg-primary); border: 1px solid var(--border);
  text-align: left; transition: var(--transition-smooth);
}
.landing-feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.landing-feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-lg);
  background: var(--gradient-soft); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 20px;
}
.landing-feature-card h3 {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 8px;
}
.landing-feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 768px) {
  .landing-features { grid-template-columns: repeat(2, 1fr); }
  .landing-stats-row { gap: 20px; }
}
@media (max-width: 480px) {
  .landing-features { grid-template-columns: 1fr; }
}

/* ═══ ANALYTICS DASHBOARD ═══ */
.analytics-section {
  display: none; padding: 0 clamp(1rem, 4vw, 3rem); margin-bottom: 40px;
}
.analytics-section.visible { display: block; }
.analytics-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.analytics-card {
  padding: 20px; border-radius: var(--radius-xl);
  background: var(--bg-primary); border: 1px solid var(--border);
  transition: var(--transition-smooth);
}
.analytics-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.analytics-card-label {
  font-size: 12px; font-weight: 500; color: var(--text-tertiary);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.analytics-card-label svg { width: 14px; height: 14px; }
.analytics-card-value {
  font-size: 28px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.03em;
}
.analytics-card-value.gradient-value {
  background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.analytics-chart {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px; margin-bottom: 16px;
}
.analytics-chart-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.analytics-bars {
  display: flex; align-items: flex-end; gap: 8px; height: 120px;
}
.analytics-bar-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 6px; height: 100%;
  justify-content: flex-end;
}
.analytics-bar {
  width: 100%; min-height: 4px; border-radius: 4px 4px 0 0;
  background: var(--gradient-primary); transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.analytics-bar-label {
  font-size: 10px; color: var(--text-tertiary); white-space: nowrap;
}
.analytics-top-sites {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px;
}
.analytics-top-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 12px;
}
.analytics-site-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.analytics-site-row:last-child { border-bottom: none; }
.analytics-site-rank {
  font-size: 12px; font-weight: 700; color: var(--text-tertiary);
  width: 24px; text-align: center;
}
.analytics-site-name {
  flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.analytics-site-views {
  font-size: 13px; font-weight: 600; color: var(--primary);
}
.analytics-empty {
  text-align: center; padding: 40px; color: var(--text-tertiary); font-size: 14px;
}

@media (max-width: 768px) {
  .analytics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .analytics-grid { grid-template-columns: 1fr; }
}
body.dark-mode .analytics-card { background: #1a1a2e; border-color: #2d2d44; }
body.dark-mode .analytics-chart { background: #1a1a2e; border-color: #2d2d44; }
body.dark-mode .analytics-top-sites { background: #1a1a2e; border-color: #2d2d44; }

/* ═══ INLINE PRICING SECTION ═══ */
.inline-pricing-section {
  padding: 60px clamp(1rem, 4vw, 3rem);
  background: var(--bg-secondary); text-align: center;
}
.inline-pricing-title {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  font-weight: 800; color: var(--text-primary);
  margin-bottom: 8px;
}
.inline-pricing-subtitle {
  font-size: 14px; color: var(--text-secondary); margin-bottom: 32px;
}
.inline-pricing-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; max-width: 700px; margin: 0 auto;
}
.inline-pricing-card {
  padding: 28px 24px; border-radius: var(--radius-xl);
  background: var(--bg-primary); border: 1px solid var(--border);
  text-align: left; transition: var(--transition-smooth);
}
.inline-pricing-card.premium {
  border-color: var(--primary); position: relative;
  box-shadow: 0 4px 20px rgba(124,58,237,0.12);
}
.inline-pricing-popular {
  position: absolute; top: -10px; right: 16px;
  padding: 3px 10px; background: var(--gradient-primary);
  color: white; font-size: 10px; font-weight: 700;
  border-radius: var(--radius-full); letter-spacing: 0.05em;
}
.inline-pricing-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.inline-pricing-price {
  font-size: 32px; font-weight: 800; margin-bottom: 16px;
}
.inline-pricing-price span { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.inline-pricing-card ul {
  list-style: none; padding: 0; margin: 0 0 20px;
}
.inline-pricing-card li {
  font-size: 13px; color: var(--text-secondary);
  padding: 5px 0 5px 22px; position: relative;
}
.inline-pricing-card li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-green);
}
.inline-pricing-cta {
  width: 100%; padding: 10px; border: none;
  border-radius: var(--radius-full); background: var(--gradient-primary);
  color: white; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
}
.inline-pricing-cta:hover { transform: translateY(-1px); box-shadow: var(--glow-primary); }
.inline-pricing-free-badge {
  display: inline-block; padding: 3px 10px;
  background: rgba(16,185,129,0.1); color: var(--accent-green);
  font-size: 11px; font-weight: 700; border-radius: var(--radius-full);
  margin-bottom: 8px;
}
@media (max-width: 520px) {
  .inline-pricing-grid { grid-template-columns: 1fr; }
}

/* ═══ SEO SCORE BADGE ═══ */
.seo-score-badge {
  display: none; padding: 3px 8px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; flex-shrink: 0; cursor: pointer;
  transition: var(--transition);
}
.seo-score-badge.visible { display: inline-flex; align-items: center; gap: 4px; }
.seo-score-badge.grade-a { background: linear-gradient(135deg, #10B981, #06B6D4); color: #fff; }
.seo-score-badge.grade-b { background: var(--bg-tertiary); color: var(--text-secondary); }
.seo-score-badge.grade-c { background: #FEF3C7; color: #92400E; }
.seo-score-badge:hover { transform: scale(1.05); }

/* SEO Report Panel */
.seo-report { margin-top: 12px; }
.seo-report-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 12px; color: var(--text-secondary);
}
.seo-report-item.pass { color: var(--accent-green); }
.seo-report-item.fail { color: #DC2626; }
.seo-report-icon { width: 16px; text-align: center; }

/* ═══ SNS POST GENERATOR ═══ */
.sns-overlay {
  display: none; position: absolute; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 50; align-items: center; justify-content: center;
}
.sns-panel-float {
  background: var(--bg-primary); border-radius: var(--radius-2xl);
  padding: 24px; max-width: 600px; width: 90%;
  max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-xl);
}
.sns-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-weight: 600; font-size: 15px;
}
.sns-posts-grid { display: flex; flex-direction: column; gap: 12px; }
.sns-post-card {
  padding: 16px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); background: var(--bg-secondary);
}
.sns-post-tone {
  font-size: 11px; font-weight: 700; color: var(--primary);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em;
}
.sns-post-content {
  font-size: 13px; line-height: 1.7; color: var(--text-primary);
  white-space: pre-wrap; margin-bottom: 8px;
}
.sns-post-tags { font-size: 12px; color: var(--primary); margin-bottom: 10px; }
.sns-copy-btn {
  padding: 6px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-full); background: var(--bg-primary);
  color: var(--text-primary); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
}
.sns-copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.sns-loading { text-align: center; padding: 40px; color: var(--text-tertiary); font-size: 14px; }
body.dark-mode .sns-panel-float { background: #1a1a2e; }
body.dark-mode .sns-post-card { background: #2d2d44; border-color: #3d3d55; }

/* ═══ MULTI VARIANT COMPARE ═══ */
.variant-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 2000; align-items: center; justify-content: center;
}
.variant-overlay.active { display: flex; }
.variant-panel {
  background: var(--bg-primary); border-radius: var(--radius-2xl);
  width: 95vw; max-width: 1400px; height: 85vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.variant-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.variant-header h3 { font-size: 16px; font-weight: 700; }
.variant-columns {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border); flex: 1; min-height: 0;
}
.variant-col {
  display: flex; flex-direction: column; background: var(--bg-primary);
  overflow: hidden;
}
.variant-col-header {
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  border-bottom: 1px solid var(--border); text-align: center;
  color: var(--text-secondary); flex-shrink: 0;
}
.variant-col iframe {
  flex: 1; width: 100%; border: none; min-height: 0;
}
.variant-col-actions {
  padding: 10px; border-top: 1px solid var(--border);
  display: flex; justify-content: center; flex-shrink: 0;
}
.variant-select-btn {
  padding: 8px 20px; border: none; border-radius: var(--radius-full);
  background: var(--gradient-primary); color: white;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition-smooth);
}
.variant-select-btn:hover { transform: translateY(-1px); box-shadow: var(--glow-primary); }
body.dark-mode .variant-panel { background: #1a1a2e; }
body.dark-mode .variant-col { background: #1a1a2e; }
@media (max-width: 768px) {
  .variant-columns { grid-template-columns: 1fr; }
  .variant-panel { width: 100vw; height: 100vh; border-radius: 0; }
}

/* ═══ VARIANT TOGGLE BUTTON ═══ */
.variant-toggle-btn {
  padding: 6px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-md); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.variant-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.variant-toggle-btn.active {
  background: var(--primary); color: white; border-color: var(--primary);
}
