/* ============================================
   AI PPT Maker - Stylesheet
   ============================================ */

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

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --accent: #7c3aed;
  --dark: #0f172a;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid var(--gray-100);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}
.site-header .container {
  display: flex; justify-content: space-between; align-items: center;
  height: 70px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo-icon { font-size: 28px; }
.logo-text { background: linear-gradient(135deg, var(--primary), var(--accent)); 
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav { display: flex; gap: 32px; }
.nav a { color: var(--gray-700); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--primary); }

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, white 0%, var(--gray-50) 100%);
}
.hero-title { font-size: 56px; font-weight: 900; line-height: 1.1; margin-bottom: 20px; }
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 20px; color: var(--gray-600); max-width: 700px; margin: 0 auto 32px;
}
.btn-hero {
  display: inline-block; padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; text-decoration: none; border-radius: 12px;
  font-weight: 700; font-size: 18px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
  transition: all 0.3s;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4); }

.hero-badges { margin-top: 40px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge {
  padding: 6px 16px; background: white; border: 1px solid var(--gray-300);
  border-radius: 20px; font-size: 14px; font-weight: 600; color: var(--gray-700);
}

/* Sections */
.section-title { font-size: 40px; font-weight: 800; text-align: center; margin-bottom: 16px; }
.section-subtitle { text-align: center; color: var(--gray-600); font-size: 18px; margin-bottom: 40px; }

/* How It Works */
.how-it-works { padding: 80px 0; background: white; }
.agents-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px; margin-top: 48px;
}
.agent-card {
  background: var(--gray-50); padding: 32px 24px; border-radius: 16px;
  text-align: center; transition: all 0.3s; border: 2px solid transparent;
}
.agent-card:hover { 
  border-color: var(--primary); transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.agent-number {
  width: 50px; height: 50px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 24px;
}
.agent-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--dark); }
.agent-card p { font-size: 14px; color: var(--gray-600); }

/* Generator Form */
.generator-section { padding: 80px 0; background: var(--gray-50); }
.generator-form {
  background: white; padding: 40px; border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); max-width: 900px; margin: 0 auto;
}
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 8px; color: var(--gray-900); font-size: 14px;
}
.required { color: var(--error); }
.hint { font-size: 13px; color: var(--gray-500); margin-top: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--gray-300);
  border-radius: 10px; font-size: 15px; font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

.quick-templates { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-template {
  padding: 10px 16px; background: var(--gray-100); border: 1px solid var(--gray-300);
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
  color: var(--gray-700); transition: all 0.2s;
}
.quick-template:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Template Cards with Visual Previews */
.template-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.hint-inline { font-weight: 400; color: var(--gray-500); font-size: 12px; }
.template-card {
  cursor: pointer; border: 2px solid var(--gray-300); border-radius: 12px;
  padding: 12px; transition: all 0.2s; background: white;
}
.template-card input[type="radio"] { display: none; }
.template-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.template-card:has(input:checked) { 
  border-color: var(--primary); background: var(--primary-light); 
  box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}
.template-preview {
  height: 80px; background: white; border-radius: 6px; padding: 10px;
  display: flex; flex-direction: column; gap: 4px; 
  border: 1px solid var(--gray-100); margin-bottom: 8px; position: relative; overflow: hidden;
}
.preview-bar { height: 3px; background: var(--primary); border-radius: 2px; margin-bottom: 4px; }
.preview-title { height: 8px; background: var(--gray-900); border-radius: 2px; width: 70%; }
.preview-title.bold { height: 10px; background: var(--primary); width: 80%; }
.preview-title.thin { height: 6px; background: var(--gray-600); width: 60%; }
.preview-title.gradient { height: 9px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px; width: 75%; }
.preview-line { height: 4px; background: var(--gray-300); border-radius: 2px; width: 90%; }
.preview-line.short { width: 60%; }
.preview-accent { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.preview-block { height: 20px; background: var(--primary); border-radius: 4px; width: 40%; margin-top: 4px; }
.preview-gradient-circle { 
  position: absolute; top: -20px; right: -20px; width: 50px; height: 50px; 
  border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); opacity: 0.2;
}
.template-preview-bold { background: var(--primary-light); }
.template-preview-minimal { background: white; border: 1px solid var(--gray-300); }
.template-preview-creative { background: linear-gradient(135deg, #f5f3ff, white); }

/* Executive Dark */
.template-preview-executive { background: #0a0f1e; }
.preview-title-dark { height: 8px; background: white; border-radius: 2px; width: 70%; }
.preview-line-dark { height: 4px; background: #374151; border-radius: 2px; width: 90%; }
.preview-line-dark.short { width: 60%; }
.preview-gold-dot { position: absolute; top: 8px; right: 8px; width: 12px; height: 3px; background: #fbbf24; border-radius: 2px; }

/* Startup */
.template-preview-startup { background: #fafafa; padding-top: 14px; }
.preview-rainbow-bar { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary)); }
.preview-card-shadow { height: 25px; background: white; border-radius: 6px; margin-top: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.08); border-top: 2px solid var(--primary); }

/* Tech */
.template-preview-tech { 
  background: #0f172a;
  background-image: linear-gradient(rgba(148,163,184,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,0.1) 1px, transparent 1px);
  background-size: 12px 12px;
}
.preview-grid-bg { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #06b6d4, transparent); }
.preview-title-mono { height: 7px; background: #f8fafc; width: 65%; border-radius: 1px; margin-top: 8px; }
.preview-line-mono { height: 3px; background: #334155; width: 80%; border-radius: 1px; }

/* Elegant */
.template-preview-elegant { background: #fdfcf9; }
.preview-serif-line { position: absolute; top: 50%; left: 8px; width: 2px; height: 30px; background: var(--primary); transform: translateY(-50%); }
.preview-title-serif { height: 9px; background: #1f2937; width: 70%; border-radius: 1px; margin-left: 14px; font-style: italic; }

/* Magazine */
.template-preview-magazine { background: white; padding-left: 14px; }
.preview-mag-bar { width: 20px; height: 3px; background: var(--primary); margin-bottom: 3px; }
.preview-title-big { height: 12px; background: #1f2937; width: 75%; border-radius: 1px; }

/* Geometric */
.template-preview-geometric { background: white; }
.preview-geo-shape { position: absolute; top: 0; left: 0; width: 30%; height: 100%; background: var(--primary); opacity: 0.08; clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%); }
.preview-geo-tri { position: absolute; bottom: 0; right: 0; width: 25px; height: 25px; background: var(--accent); opacity: 0.2; clip-path: polygon(100% 0, 100% 100%, 0 100%); }

/* Split Screen */
.template-preview-split { background: white; padding: 0; overflow: hidden; }
.preview-split-left { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: var(--primary); }
.preview-split-right { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); width: 40px; height: 6px; background: var(--gray-900); border-radius: 1px; }

/* Gradient Pro */
.template-preview-gradient-pro { background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, #7c3aed 100%); }
.preview-title-white { height: 8px; background: white; border-radius: 2px; width: 70%; margin-top: 10px; }
.preview-line-white { height: 4px; background: rgba(255,255,255,0.6); border-radius: 2px; width: 90%; }
.preview-line-white.short { width: 60%; }

.template-name { font-weight: 700; font-size: 13px; color: var(--gray-900); }
.template-desc { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* Color Theme Swatches */
.color-themes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px;
}
.color-theme {
  cursor: pointer; border: 2px solid var(--gray-300); border-radius: 10px;
  padding: 10px; transition: all 0.2s; background: white; text-align: center;
}
.color-theme input[type="radio"] { display: none; }
.color-theme:hover { border-color: var(--primary); transform: translateY(-2px); }
.color-theme:has(input:checked) { 
  border-color: var(--primary); 
  box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}
.color-swatch {
  width: 100%; height: 40px; border-radius: 6px; margin-bottom: 6px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.color-name { font-size: 11px; font-weight: 600; color: var(--gray-700); }

.btn-submit {
  width: 100%; padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; border: none; border-radius: 12px;
  font-size: 18px; font-weight: 700; cursor: pointer;
  transition: all 0.3s; margin-top: 10px;
}
.btn-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* Progress Panel */
.progress-panel {
  background: white; padding: 32px; border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); max-width: 900px;
  margin: 32px auto 0;
}
.progress-panel h3 { margin-bottom: 24px; color: var(--dark); }
.progress-steps { display: flex; flex-direction: column; gap: 12px; }
.progress-step {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--gray-50); border-radius: 12px;
  transition: all 0.3s;
}
.progress-step.active { background: var(--primary-light); border-left: 4px solid var(--primary); }
.progress-step.completed { background: #d1fae5; border-left: 4px solid var(--success); }
.progress-step.failed { background: #fee2e2; border-left: 4px solid var(--error); }
.step-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gray-300); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.progress-step.active .step-icon { background: var(--primary); animation: pulse 1.5s infinite; }
.progress-step.completed .step-icon { background: var(--success); }
.progress-step.failed .step-icon { background: var(--error); }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.step-content { flex: 1; }
.step-name { font-weight: 600; color: var(--dark); }
.step-status { font-size: 13px; color: var(--gray-600); margin-top: 2px; }

.regen-notice {
  margin-top: 20px; padding: 16px; background: #fef3c7;
  border-left: 4px solid var(--warning); border-radius: 8px;
  font-size: 14px; color: #92400e;
}

/* Result Panel */
.result-panel {
  background: white; padding: 32px; border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06); max-width: 900px;
  margin: 32px auto 0; border: 2px solid var(--success);
}
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
.result-header h3 { color: var(--success); font-size: 24px; }
.quality-score { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.score-badge {
  padding: 6px 14px; background: var(--success); color: white;
  border-radius: 20px; font-weight: 800; font-size: 16px;
}
.score-badge.warn { background: var(--warning); }
.score-badge.low { background: var(--error); }
.result-details { padding: 20px; background: var(--gray-50); border-radius: 12px; margin-bottom: 20px; font-size: 14px; }
.result-details strong { color: var(--dark); }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-action {
  padding: 12px 24px; border-radius: 10px; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; font-size: 15px;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--gray-100); color: var(--gray-900); }
.btn-secondary:hover { background: var(--gray-300); }

/* Error Panel */
.error-panel {
  background: #fee2e2; padding: 32px; border-radius: 16px;
  max-width: 900px; margin: 32px auto 0; border: 2px solid var(--error);
}
.error-panel h3 { color: var(--error); margin-bottom: 16px; }

/* Features */
.features { padding: 80px 0; background: white; }
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px; margin-top: 48px;
}
.feature-card {
  padding: 32px; background: var(--gray-50); border-radius: 16px;
  text-align: center; transition: all 0.3s;
}
.feature-card:hover { background: white; box-shadow: 0 10px 40px rgba(0,0,0,0.08); transform: translateY(-4px); }
.feature-icon { font-size: 48px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--gray-600); font-size: 14px; }

/* Footer */
.site-footer { padding: 32px 0; background: var(--dark); color: var(--gray-300); text-align: center; font-size: 14px; }

/* Mobile */
@media (max-width: 1024px) {
  .template-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .section-title { font-size: 28px; }
  .form-row { grid-template-columns: 1fr; }
  .nav { display: none; }
  .generator-form { padding: 24px; }
  .quick-templates { gap: 8px; }
  .quick-template { font-size: 12px; padding: 8px 12px; }
  .template-cards { grid-template-columns: repeat(2, 1fr); }
  .color-themes { grid-template-columns: repeat(3, 1fr); }
}