/* ========================================
   MAPS-TO-SITES by PIXNOM — BRIGHT PREMIUM THEME
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --bg: #ffffff;
  --sidebar-bg: #ffffff;
  --sidebar-border: #ede9fe;
  --main-bg: #ffffff;

  --surface: #ffffff;
  --surface2: #faf5ff;
  --border: #e9e5f5;
  --border2: #d4d0e7;

  --text: #1a1035;
  --text-main: #2d2451;
  --muted: #7c6f9b;

  --accent: #7c3aed;
  --accent2: #9333ea;
  --accent-light: rgba(124, 58, 237, 0.1);
  --accent-soft: rgb(255, 255, 255);
  --accent-glow: rgba(124, 58, 237, 0.15);

  --green: #059669;
  --red: #dc2626;
  --gold: #d97706;
  --grad: linear-gradient(135deg, #7c3aed, #9333ea);
  --grad-warm: linear-gradient(135deg, #7c3aed, #db2777, #f59e0b);
  --grad-soft: linear-gradient(135deg, #ede9fe, #fce7f3, #fef3c7);

  --radius: 14px;
  --sidebar-width: 260px;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Background blobs removed — plain white background */

/* ============ LAYOUT ============ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  height: 100vh;
  position: fixed;
  left: calc(-1 * var(--sidebar-width));
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-open .sidebar {
  left: 0;
}

/* Sidebar overlay */
body.sidebar-open .sidebar-overlay {
  display: block;
}

.main-content {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
  margin-left: 0;
  padding-top: 60px;
  position: relative;
  z-index: 1;
  background: transparent;
}

.view-container {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* MOBILE NAV */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 900;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  margin-right: 16px;
  transition: color 0.2s;
}

.menu-toggle:hover {
  color: var(--accent);
}

.mobile-nav .logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
  display: flex;
  transition: color 0.2s;
}

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

/* ============ SIDEBAR ============ */
.sidebar-logo {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--sidebar-border);
  margin-bottom: 12px;
}

.sidebar-logo .logo-icon {
  font-size: 1.4rem;
}

.sidebar-logo .logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.nav-group {
  flex: 1;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--accent);
}

/* Pixnom branding in sidebar */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--sidebar-border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.user-avatar {
  width: 34px;
  height: 34px;
  background: var(--grad);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-info {
  overflow: hidden;
  flex: 1;
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#credit-badge {
  display: block;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.btn-logout {
  width: 100%;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 8px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: #fee2e2;
}

/* Pixnom badge */
.pixnom-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
  padding: 6px 0;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.pixnom-badge span {
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.75rem;
}

/* ============ VIEWS ============ */
.view,
.page-view {
  display: none;
  animation: fadeUp 0.4s ease;
}

.view.active,
.page-view.active {
  display: block;
}

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

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

/* ============ GENERATOR VIEW ============ */
.h-view-full {
  max-width: 100% !important;
  padding: 0 !important;
}

.h-top-banner {
  background: rgba(205, 255, 78, 0.9); /* Glassy Lime */
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  text-align: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.h-top-banner a {
  color: #1a1035;
  text-decoration: underline;
  cursor: pointer;
}
.h-timer {
  display: flex;
  align-items: center;
  gap: 4px;
}
.h-timer-unit {
  font-size: 0.65rem;
  font-weight: 800;
}

.h-main-hero {
  background: transparent;
  min-height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 40px;
  position: relative;
  overflow: hidden;
  border-bottom: none;
}

.h-main-hero-content {
  max-width: 800px;
  width: 100%;
  color: #1a1a2e;
  z-index: 10;
  position: relative;
}

.h-main-hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.h-italic {
  font-style: italic;
  font-weight: 400;
  font-family: serif;
  color: #7c3aed;
}

.h-hero-desc {
  font-size: 1.1rem;
  line-height: 1.5;
  color: #64748b;
  margin-bottom: 30px;
  max-width: 500px;
}

.h-hero-price {
  font-size: 1rem;
  color: #1a1a2e;
  margin-bottom: 24px;
}

.h-hero-price strong {
  font-size: 1.25rem;
  font-weight: 800;
}

.h-hero-input-area {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  max-width: 500px;
}

.h-hero-input-area input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #1a1a2e;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

.h-hero-input-area input:focus {
  border-color: #5b30ff;
  background: #ffffff;
}

.h-hero-input-area input::placeholder {
  color: #94a3b8;
}

.h-hero-input-area button {
  background: #673de6; 
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 32px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h-hero-input-area button:hover {
  background: #5b30ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,48,255,0.4);
}

.h-hero-guarantee {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.h-hero-guarantee i {
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .h-main-hero { padding: 40px 20px; }
  .h-main-hero-content h1 { font-size: 2.5rem; }
  .h-hero-input-area { flex-direction: column; }
  .h-hero-input-area button { padding: 14px; }
}
.page-header {
  margin-bottom: 36px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.page-header h1 .highlight {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.04), 0 8px 24px rgba(124, 58, 237, 0.03);
  position: relative;
}

.input-hero {
  max-width: 800px;
}

.input-container {
  display: flex;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  gap: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-container:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 4px 20px rgba(124, 58, 237, 0.08);
}

.input-container input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
  font-family: inherit;
  background: transparent;
}

.input-container input::placeholder {
  color: #b4adc7;
}

.btn-generate {
  background: var(--grad);
  color: #fff;
  border: none;
  padding: 0 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
  position: relative;
}

.btn-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

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

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Progress */
.progress-card {
  margin-top: 32px;
  text-align: center;
  padding: 48px 32px;
}

.funny-loader {
  margin-bottom: 24px;
}

.loader-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  display: inline-block;
  animation: float 2s infinite ease-in-out;
}

@keyframes float {

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

  25% {
    transform: translateY(-8px) rotate(2deg);
  }

  75% {
    transform: translateY(-4px) rotate(-2deg);
  }
}

#progress-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

#progress-funny {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  height: 20px;
}

.progress-bar-container {
  height: 6px;
  background: var(--accent-soft);
  border-radius: 3px;
  overflow: hidden;
  margin: 24px 0 16px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--grad);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 3px;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmer 1.8s infinite;
}

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

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

/* Results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.template-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.template-card:hover {
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.1);
  transform: translateY(-4px);
  border-color: var(--accent-light);
}

.template-preview {
  height: 140px;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.template-content {
  padding: 20px;
}

.template-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
}

.coming-soon {
  font-size: 0.6rem;
  background: #f3f0ff;
  color: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--accent-light);
  color: var(--accent);
}

.template-desc {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.btn-preview-gold {
  display: block;
  width: 100%;
  background: var(--grad);
  color: #fff;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-preview-gold:hover {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25);
}

/* ============ PRICING VIEW ============ */
@keyframes silk-move {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

.pricing-page {
  max-width: 100% !important;
  padding: 0 !important;
  margin-top: -60px;
  margin-bottom: -40px;
}

.pricing-hero {
  background: #ffffff;
  padding: 100px 20px 120px;
  width: 100%;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#silk-canvas {
  display: none;
}

.pricing-hero > *:not(canvas) {
  position: relative;
  z-index: 1;
}

.pricing-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.pricing-subtitle {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #7c3aed;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pricing-title {
  color: #1a1a2e !important;
  font-size: 2.4rem !important;
  font-weight: 800;
  margin-bottom: 40px !important;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

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

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

.h-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.h-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: #d1d5db;
}

.h-card-popular {
  border: 2px solid #7c3aed;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
  background: #faf5ff;
}

.h-popular-badge {
  background: linear-gradient(135deg, #7c3aed, #5b30ff);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
  padding: 8px 0;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.h-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.h-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.h-card-title-row h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a1a2e;
}

.h-discount {
  background: #cdff4e; /* Hostinger lime green */
  color: #2f1c6a;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.h-card-desc {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.4;
  min-height: 40px;
}

.h-price-strike {
  font-size: 0.85rem;
  color: #9ca3af;
  text-decoration: line-through;
  margin-bottom: 2px;
  font-weight: 500;
}

.h-price-main {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: -1px;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
}

.h-price-mo {
  font-size: 1rem;
  color: #6b7280;
  font-weight: 500;
  margin-left: 2px;
  letter-spacing: 0;
}

.h-price-free {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
}

.h-btn-choose {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  background: transparent;
  color: #1a1a2e;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.h-btn-choose:hover {
  background: #f3f4f6;
}

.h-btn-popular {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

.h-btn-popular:hover {
  background: #6d28d9;
}

.h-card-renewal {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.4;
  margin-bottom: 24px;
}

.h-features {
  list-style: none;
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
  flex: 1;
}

.h-features li {
  font-size: 0.85rem;
  color: #374151;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.h-features i {
  color: #059669; /* green check */
  font-size: 0.85rem;
  margin-top: 3px;
  min-width: 14px;
}

.h-feature-disabled {
  color: #9ca3af !important;
}

.h-features-subheader {
  font-weight: 700;
  font-size: 0.85rem;
  color: #1a1a2e;
  margin: 20px 0 12px 0;
}

.h-features .new-badge {
  background: #e0e7ff;
  color: #4f46e5;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  align-self: center;
}

/* ============ LOGIN ============ */
@keyframes grainient-move {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#login-content {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  padding: 40px;
  background: linear-gradient(-45deg, #0a0015, #1a0035, #5227FF, #FF9FFC, #B19EEF, #1a0035, #0a0015);
  background-size: 400% 400%;
  animation: grainient-move 15s ease infinite;
  position: relative;
  overflow: hidden;
}

/* Grain overlay */
#login-content::before {
  content: '';
  position: absolute;
  inset: 0;
  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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
}

#login-content::after {
  display: none;
}

.login-logo {
  position: absolute;
  top: 32px;
  left: 40px;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  z-index: 2;
}

.login-headline {
  max-width: 520px;
  z-index: 1;
}

.login-headline h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 300;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.02em;
}

.login-headline h2 em {
  font-style: italic;
  font-weight: 600;
}

@media (max-width: 900px) {
  #login-content {
    flex-direction: column;
    gap: 32px;
    padding: 24px;
  }
  .login-headline {
    text-align: center;
  }
  .login-headline h2 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(15, 5, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 44px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 1;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-header h1 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 8px;
  color: #fff;
}

.login-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.login-brand span {
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.8rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#login-content .form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.3s;
}

#login-content .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#login-content .form-group input:focus {
  border-color: #B19EEF;
  box-shadow: 0 0 0 4px rgba(177, 158, 239, 0.2);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  background: #fff;
  color: var(--text);
  transition: all 0.3s;
}

.form-group input::placeholder {
  color: #c4bdd8;
}

.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ============ SETTINGS ============ */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 16, 53, 0.25);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
}

.settings-overlay.open {
  display: block;
}

.settings-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  z-index: 1001;
  display: none;
  box-shadow: 0 25px 60px rgba(124, 58, 237, 0.12);
}

.settings-panel.open {
  display: block;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ============ UTILS ============ */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 12px 28px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(26, 16, 53, 0.15);
}

/* ============ BUTTON SPINNER ============ */
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.25);
}

/* ============ SELECTION ============ */
::selection {
  background: #ede9fe;
  color: var(--accent);
}

/* ============ RESPONSIVE ============ */
@media (min-width: 1024px) {
  .view-container {
    padding: 48px 40px;
  }
}

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

  .view-container {
    padding: 24px 16px;
  }

  .card {
    padding: 24px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .input-container {
    flex-direction: column;
  }

  .btn-generate {
    padding: 14px 24px;
  }
}

/* ============ HISTORY PAGE ============ */
.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.history-table th {
  background: var(--bg);
  padding: 14px 24px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
.history-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  vertical-align: middle;
}
.history-table tr:last-child td {
  border-bottom: none;
}
.history-table tr:hover td {
  background: rgba(124, 58, 237, 0.02);
}
.history-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.history-link:hover {
  text-decoration: underline;
}
.history-date {
  color: var(--muted);
  font-size: 0.85rem;
}
.copy-link-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent) !important;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.copy-link-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.copy-link-btn:active {
  transform: translateY(0);
}

/* Business Type Selector */
.biz-type-selector { text-align: center; margin-bottom: 16px; }
.biz-type-selector p { color: #1a1a2e !important; }
.biz-type-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 160px; height: 100px; border-radius: 14px;
  border: 2px solid #e2e8f0; background: #ffffff;
  cursor: pointer; transition: all 0.2s; color: #1a1a2e; font-weight: 600; font-size: 0.9rem;
}
.biz-type-btn:hover { border-color: var(--accent); background: #ffffff; color: #1a1a2e; box-shadow: 0 4px 20px rgba(124,58,237,0.3); }
.biz-type-btn.selected { border-color: var(--accent); background: #ffffff; color: #1a1a2e; box-shadow: 0 4px 16px rgba(124,58,237,0.3); }

/* Design Thumbnail Cards */
.design-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25) !important;
  transform: translateY(-4px);
}
.design-card:hover img {
  transform: scale(1.08);
}
@media (max-width: 600px) {
  #design-selector > div:first-of-type {
    grid-template-columns: 1fr !important;
    max-width: 300px !important;
  }
}

/* History and Common Typography Fixes */
.page-header h1 {
    color: var(--text) !important;
}
.page-header p {
    color: var(--muted) !important;
}
.highlight {
    background: var(--grad) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

#view-history .card h3 {
    color: var(--text) !important;
}

/* Column Filter Styles */
.column-filter-dropdown {
    position: relative;
}

.column-filter-menu {
    animation: fadeIn 0.2s ease;
}

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

.column-filter-menu label:hover {
    background: #f8fafc;
}

.column-filter-menu input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.column-filter-menu input[type="checkbox"]:checked {
    background: #7c3aed;
    border-color: #7c3aed;
}

.column-filter-menu input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.column-filter-menu input[type="checkbox"]:hover {
    border-color: #7c3aed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .column-filter-dropdown {
        width: 100%;
    }
    
    .column-filter-menu {
        left: 0;
        right: 0;
        min-width: 100%;
    }
}

/* Credits Summary Styles */
#credits-summary {
    transition: all 0.3s ease;
}

#credits-summary.show {
    display: block !important;
    animation: fadeInDown 0.5s ease;
}

#credits-summary.hide {
    display: none !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#credits-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.25);
}

#credits-summary div {
    transition: all 0.3s ease;
}

/* Animation for credit count */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

#total-credits {
    display: inline-block;
}

#total-credits.updating {
    animation: pulse 0.5s ease;
}

/* ========================================
   EMAIL WRITER — Lead Search, Script Slots, Edit
   ======================================== */

/* --- Lead Search --- */
.email-lead-search-wrap {
    position: relative;
}

.email-lead-search-wrap input#email-lead-search {
    width: 100%;
    padding: 14px 14px 14px 42px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.email-lead-search-wrap input#email-lead-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.email-lead-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.email-lead-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.email-lead-results::-webkit-scrollbar {
    width: 6px;
}

.email-lead-results::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 3px;
}

.email-lead-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.email-lead-result-item:last-child {
    border-bottom: none;
}

.email-lead-result-item:hover {
    background: var(--accent-light);
}

.email-lead-selected-info {
    margin-top: 12px;
    padding: 14px 18px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

/* --- Email Script Slots --- */
.email-script-slots {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.email-script-slots::-webkit-scrollbar {
    height: 4px;
}

.email-script-slots::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 2px;
}

.email-script-slot {
    flex: 0 0 auto;
    min-width: 130px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    user-select: none;
}

.email-script-slot:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.email-script-slot.active {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.email-script-slot-num {
    width: 26px;
    height: 26px;
    margin: 0 auto 8px;
    background: var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted);
    transition: background 0.2s, color 0.2s;
}

.email-script-slot.active .email-script-slot-num {
    background: var(--accent);
    color: #fff;
}

.email-script-slot-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    white-space: nowrap;
}

.email-script-slot-icon {
    font-size: 1.1rem;
    color: var(--muted);
    transition: color 0.2s;
}

.email-script-slot.active .email-script-slot-icon {
    color: var(--accent);
}

/* --- History Search --- */
.history-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.history-search-wrap input#history-search {
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    background: #fff;
    color: var(--text);
    width: 220px;
    height: 36px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.history-search-wrap input#history-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.history-search-icon {
    position: absolute;
    left: 11px;
    color: var(--muted);
    font-size: 0.8rem;
    pointer-events: none;
}

@media (max-width: 600px) {
    .history-search-wrap input#history-search {
        width: 160px;
    }
}

/* --- Email Header Fields (From, To, CC, Subject) --- */
.email-header-fields {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px 0;
    margin-bottom: 16px;
}

.email-header-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
}

.email-header-row:last-child {
    border-bottom: none;
}

.email-header-row label {
    min-width: 60px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--muted);
    flex-shrink: 0;
}

.email-header-row input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text);
    padding: 4px 8px;
    outline: none;
}

.email-header-row input::placeholder {
    color: var(--border2);
}

.email-header-row input:focus {
    background: rgba(124, 58, 237, 0.04);
    border-radius: 6px;
}

/* --- Email Sent Success Overlay (GPay style) --- */
.email-sent-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.email-sent-content {
    text-align: center;
    transform: scale(0.5);
    opacity: 0;
    animation: emailSentPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.1s forwards;
}

@keyframes emailSentPop {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.email-sent-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.email-sent-checkmark {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    stroke-width: 3;
    stroke: #fff;
    stroke-miterlimit: 10;
}

.email-sent-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 3;
    stroke-miterlimit: 10;
    stroke: #22c55e;
    fill: none;
    animation: emailSentStroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) 0.3s forwards;
}

.email-sent-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #22c55e;
    stroke-width: 3;
    stroke-linecap: round;
    animation: emailSentStroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.7s forwards;
}

@keyframes emailSentStroke {
    to {
        stroke-dashoffset: 0;
    }
}

.email-sent-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    opacity: 0;
    animation: emailSentFadeUp 0.4s ease 0.9s forwards;
}

.email-sent-subtext {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: emailSentFadeUp 0.4s ease 1.1s forwards;
}

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

/* --- Email Edit Mode --- */
#email-body.email-edit-active {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow);
    cursor: text;
    outline: none;
}

/* --- Mobile adjustments --- */
@media (max-width: 600px) {
    .email-script-slots {
        gap: 8px;
    }

    .email-script-slot {
        min-width: 110px;
        padding: 10px 12px;
    }

    .email-script-slot-name {
        font-size: 0.75rem;
    }
}