/* =========================================
   VisionAI - White Theme + Rainbow Style
   Author: Zabiullah
   Version: 2.0 White Rainbow
========================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.10);
  --radius: 16px;
  --radius-lg: 24px;
  --rainbow: linear-gradient(90deg, #ff0080, #ff8a00, #ffd400, #00e676, #00d4ff, #7c4dff, #ff0080);
  --rainbow-soft: linear-gradient(90deg, rgba(255,0,128,0.12), rgba(255,138,0,0.12), rgba(255,212,0,0.12), rgba(0,230,118,0.12), rgba(0,212,255,0.12), rgba(124,77,255,0.12));
  --rainbow-border: linear-gradient(90deg, #ff0080, #ff8a00, #ffd400, #00e676, #00d4ff, #7c4dff);
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ===== RAINBOW TEXT ===== */
.highlight {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: rainbowShift 6s linear infinite;
}

@keyframes rainbowShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--rainbow);
  background-size: 200% auto;
  color: white !important;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(124,77,255,0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-position: right center;
  box-shadow: 0 8px 25px rgba(124,77,255,0.35);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: transparent;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--border);
  transform: translateY(-2px);
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--rainbow-soft);
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: var(--rainbow);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.navbar nav ul {
  display: flex;
  gap: 32px;
}

.navbar nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  padding-bottom: 4px;
}

.navbar nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rainbow);
  transition: width 0.3s ease;
  border-radius: 999px;
}

.navbar nav a:hover,
.navbar nav a.active {
  color: var(--text);
}

.navbar nav a:hover::after,
.navbar nav a.active::after {
  width: 100%;
}

/* ===== HERO ===== */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle at center, rgba(124,77,255,0.12), rgba(0,212,255,0.08), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at center, rgba(255,0,128,0.08), rgba(255,138,0,0.06), transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  position: relative;
}

.hero-content h1 {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -2px;
  margin: 18px 0 20px;
}

.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.hero-stats div {
  display: flex;
  flex-direction: column;
}

.hero-stats strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.hero-stats span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.hero-image {
  position: relative;
}

.hero-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: var(--rainbow);
  border-radius: calc(var(--radius-lg) + 3px);
  z-index: 0;
  opacity: 0.8;
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 17px;
}

/* ===== FEATURES ===== */
.features {
  padding: 100px 0;
  background: var(--bg-soft);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rainbow);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 100px 0;
  background: #fff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  text-align: center;
  padding: 32px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #fcfdff);
  position: relative;
  transition: all 0.3s ease;
}

.step:hover {
  border-style: solid;
  box-shadow: var(--shadow-sm);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  font-weight: 800;
  color: #fff;
  background: var(--rainbow);
  box-shadow: 0 4px 12px rgba(124,77,255,0.3);
}

.step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== PRICING ===== */
.pricing {
  padding: 100px 0;
  background: var(--bg-soft);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pricing-card.featured {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--rainbow-border) border-box;
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 700;
}

.pricing-card .price {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 12px 0 20px;
}

.pricing-card .price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-card ul {
  margin-bottom: 28px;
  flex-grow: 1;
}

.pricing-card ul li {
  font-size: 14px;
  padding: 8px 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.pricing-card ul li:last-child {
  border-bottom: none;
}

.pricing-card .badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* ===== FAQ ===== */
.faq {
  padding: 100px 0;
  background: #fff;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.faq-item {
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  transition: all 0.2s;
}

.faq-item:hover {
  border-color: #d6dbe3;
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq-item p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.contact-section {
  padding: 100px 0;
  background: var(--bg-soft);
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.contact-info,
.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-info h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 20px 0 6px;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.contact-info p {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.contact-info a {
  transition: all 0.2s;
}

.contact-info a:hover {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.social-links a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.contact-form h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 6px;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7c4dff;
}

.contact-form button {
  margin-top: 18px;
  width: 100%;
}

.contact-additional {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.contact-box h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-box p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== GENERATOR ===== */
.generator-section {
  padding: 60px 0 80px;
  background: var(--bg-soft);
}

.generator-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
}

.generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.generator-header h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.generator-header .badge {
  font-size: 13px;
}

/* ---- Mode Selector ---- */
.mode-selector {
  display: flex;
  gap: 20px;
  align-items: center;
  grid-column: 1 / -1;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 6px;
}

.mode-selector label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.mode-selector label input[type="radio"] {
  accent-color: #7c4dff;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.mode-selector label.active {
  color: var(--text);
}

/* ---- Control Groups ---- */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.control-group label .hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 12px;
}

.control-group input,
.control-group textarea {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
  color: var(--text);
  width: 100%;
}

.control-group input:focus,
.control-group textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #7c4dff;
}

.control-group textarea {
  min-height: 80px;
  resize: vertical;
}

.full-width {
  grid-column: 1 / -1;
}

.generator-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.generator-actions .btn-primary,
.generator-actions .btn-secondary {
  flex: 1;
  justify-content: center;
  padding: 12px 20px;
  font-size: 15px;
  min-width: 120px;
}

.generator-actions .btn-secondary {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.generator-actions .btn-secondary:hover {
  border-color: #f87171;
  color: #f87171;
}

/* ---- Result Area ---- */
.result-area {
  margin-top: 30px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--text-muted);
}

.result-area img {
  max-width: 100%;
  max-height: 600px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.result-area .placeholder {
  font-size: 16px;
}

.result-area .placeholder .icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.result-actions button,
.result-actions a {
  padding: 8px 20px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text);
  text-decoration: none;
}

.result-actions button:hover,
.result-actions a:hover {
  border-color: transparent;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--border);
  transform: translateY(-2px);
}

.result-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

/* ---- Batch Grid ---- */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  width: 100%;
  margin-top: 16px;
}

.batch-item {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.2s;
  position: relative;
}

.batch-item:hover {
  border-color: #7c4dff;
  transform: scale(1.02);
}

.batch-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.batch-item .batch-info {
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.batch-item .batch-info .num {
  color: #7c4dff;
  font-weight: 600;
}

.batch-item .batch-info .status {
  font-size: 11px;
  font-weight: 500;
}

.batch-item .batch-info .status.loading {
  color: #fbbf24;
}

.batch-item .batch-info .status.done {
  color: #4ade80;
}

.batch-item .batch-info .status.error {
  color: #f87171;
}

.batch-item .placeholder-img {
  width: 100%;
  height: 180px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 14px;
}

.batch-item .placeholder-img .spinner-small {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(124,77,255,0.2);
  border-top: 3px solid #7c4dff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ---- Download All Button ---- */
.download-all-btn {
  background: #7c4dff;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 16px;
}

.download-all-btn:hover {
  background: #6a3de8;
  transform: scale(1.02);
}

.download-all-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ---- History ---- */
.history-section {
  margin-top: 30px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.history-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-section h3 button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.history-section h3 button:hover {
  border-color: #f87171;
  color: #f87171;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.history-grid .hist-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.history-grid .hist-item:hover {
  border-color: #7c4dff;
  transform: scale(1.02);
}

.history-grid .hist-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.history-grid .hist-item .hist-prompt {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-grid .hist-item .hist-del {
  position: absolute;
  top: 4px;
  right: 6px;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  padding: 0 6px;
  line-height: 20px;
  display: none;
}

.history-grid .hist-item:hover .hist-del {
  display: block;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 90px 0;
  text-align: center;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rainbow-soft);
  opacity: 0.6;
}

.cta-section .container {
  position: relative;
}

.cta-section h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.cta-section p {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 28px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1e293b;
  border: 1px solid #f58025;
  color: #e2e8f0;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: 0.3s;
  pointer-events: none;
  z-index: 999;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #f87171; }
.toast.success { border-color: #4ade80; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FOOTER ===== */
footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}

.footer-brand h3 {
  font-size: 22px;
  font-weight: 800;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
  max-width: 320px;
}

.footer-credit {
  margin-top: 16px !important;
  font-size: 12px !important;
  line-height: 1.5;
}

.footer-credit a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-contact p {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-contact p {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .hero .container,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .pricing-grid,
  .steps,
  .faq-grid,
  .contact-additional {
    grid-template-columns: 1fr;
  }

  .pricing-card.featured {
    transform: none;
  }

  .navbar nav {
    display: none;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-image {
    order: -1;
  }
}

@media (max-width: 860px) {
  .generator-wrapper {
    padding: 24px 18px;
  }
  .controls-grid {
    grid-template-columns: 1fr;
  }
  .generator-actions {
    flex-direction: column;
  }
  .generator-actions .btn-primary,
  .generator-actions .btn-secondary {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hero-stats {
    gap: 18px;
  }
  .hero-buttons {
    flex-direction: column;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
  .history-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .batch-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
/* =========================================
   Aspect Ratio Dropdown & Display
   ========================================= */

/* ─── Dropdown ─── */
#aspectRatio {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border, #e2e8f0);
  background: #ffffff;
  font-size: 14px;
  font-family: inherit;
  color: var(--text, #0f172a);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

#aspectRatio:hover {
  border-color: var(--text-muted, #94a3b8);
}

#aspectRatio:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #7c4dff;
}

#aspectRatio option {
  padding: 8px;
}

/* ─── Ratio Info Display ─── */
#ratioInfo {
  font-size: 14px;
  color: var(--text-muted, #64748b);
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}

#ratioInfo span {
  font-weight: 600;
  color: var(--text, #0f172a);
}

#ratioInfo .sep {
  color: var(--border, #e2e8f0);
}

/* ─── Hidden inputs (still visible in dev tools) ─── */
input[type="hidden"] {
  display: none;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  #ratioInfo {
    font-size: 13px;
    flex-wrap: wrap;
    gap: 2px 8px;
  }
}