/* ============================================================
   HollyPrez — Fast + Smart. Présentations IA
   ============================================================ */

/* --- Variables --- */
:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --primary-light: #A29BFE;
  --primary-glow: rgba(108, 92, 231, 0.15);
  --accent: #FF6B6B;
  --accent2: #FECA57;
  --bg: #0F0E1A;
  --bg-card: #1A1930;
  --bg-card-hover: #222145;
  --bg-input: #12112A;
  --text: #F0F0F8;
  --text-dim: #8B89B0;
  --text-muted: #5E5C80;
  --border: #2A2950;
  --border-focus: #6C5CE7;
  --success: #2ED573;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --glow: 0 0 40px rgba(108, 92, 231, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-light); text-decoration: none; }
img { max-width: 100%; }

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.nav-logo-text span { color: var(--primary-light); font-weight: 300; }

.nav-logo-badge {
  font-size: 10px;
  font-weight: 700;
  background: var(--primary-glow);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(108, 92, 231, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-link:hover { color: var(--text); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
}

.mobile-menu.open { display: flex; }

.mobile-link {
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

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

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 15px; border-radius: var(--radius); }

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 68px;
}

.hero-bg {
  position: absolute;
  top: -50%;
  right: -30%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(108,92,231,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-bg::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,107,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-glow);
  border: 1px solid rgba(108, 92, 231, 0.2);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 32px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(46, 213, 115, 0); }
}

.hero-title {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-dim);
  font-weight: 400;
  max-width: 640px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

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

.hero-tag {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-sep { color: var(--border); opacity: 0.5; }

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.desktop-only { display: block; }

/* --- SECTION COMMON --- */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--primary-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 40px;
}

/* --- FEATURES --- */
.features {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.features .section-title {
  max-width: 500px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all var(--transition);
  animation: fadeUp 0.6s ease-out var(--card-delay) both;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow);
  border-color: var(--primary);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --- WIZARD / STEP 4 --- */
.wizard {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  position: relative;
}

.wizard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.wizard-header {
  text-align: center;
  margin-bottom: 48px;
}

.wizard-desc {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 32px;
}

/* Steps progress */
.steps-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
}

.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
}

.step-dot.active {
  background: rgba(108, 92, 231, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

.step-dot.current {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 16px rgba(108, 92, 231, 0.4);
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
}

.step-dot.active + .step-line { background: var(--primary-dim, #3A2D8A); }

/* --- WIZARD GRID --- */
.wizard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
}

.wizard-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- FORM ELEMENTS --- */
.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group-inline {
  flex-direction: row;
  gap: 16px;
}

.form-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.label-opt {
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

.label-icon {
  cursor: help;
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.6;
}

.ai-suggest {
  font-size: 14px;
  color: var(--accent2);
  opacity: 0.7;
  cursor: help;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}

.form-input::placeholder { color: var(--text-muted); }

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* --- SELECT --- */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 12px;
}

/* --- AI ICON --- */
.input-with-ai {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.input-with-ai .form-input {
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-with-ai .input-with-ai .form-input:focus {
  border-right: none;
}

.ai-btn {
  width: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--accent2);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.ai-btn:hover {
  background: rgba(254, 202, 87, 0.08);
  border-color: var(--accent2);
}

.ai-icon { line-height: 1; }

/* --- TAG SELECTOR --- */
.tag-selector, .format-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag, .format-btn {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.tag:hover, .format-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.tag.selected, .format-btn.selected {
  background: rgba(108, 92, 231, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
}

/* --- FILE DROP --- */
.file-drop-zone {
  position: relative;
}

.file-drop-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 24px;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.file-drop-label:hover {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.05);
}

.file-icon { font-size: 24px; }

.file-drop-label span:nth-child(2) {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.file-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- WIZARD ACTIONS --- */
.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-direction: column;
}

.generate-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 32px;
  line-height: 1.3;
}

.btn-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
}

/* --- ABOUT / FOOTER --- */
.about {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.about-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.about-logo span { color: var(--primary-light); font-weight: 300; }

.about-tagline {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin: 8px 0 12px;
}

.about-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

.about-links h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.about-links a {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
  transition: color var(--transition);
}

.about-links a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- PANELS (multi-step) --- */
.panel { transition: opacity 0.3s ease, transform 0.3s ease; }
.panel.hidden { display: none !important; }

/* --- FORM HINT --- */
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: -2px; }

/* --- RANGE SLIDER --- */
.input-with-ai { display: flex; align-items: center; gap: 12px; }
.form-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--primary-light);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.3);
}
.range-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-light);
  min-width: 28px;
  text-align: center;
}

/* --- URL INSPIRATION --- */
.url-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.url-input-group .form-input { flex: 1; }
.url-fetch-btn { flex-shrink: 0; white-space: nowrap; }

.url-result {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.url-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.url-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: white;
  border: 1px solid var(--border);
}
.url-brand-info { display: flex; flex-direction: column; gap: 1px; }
.url-domain { font-size: 13px; font-weight: 600; color: var(--text); }
.url-status { font-size: 11px; color: var(--success); }
.url-colors { margin-top: 6px; }
.url-colors-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; display: block; }
.url-color-swatches { display: flex; gap: 6px; }
.url-swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.url-swatch:hover { transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.url-swatch.selected {
  border-color: white;
  box-shadow: 0 0 0 2px var(--primary), 0 2px 8px rgba(0,0,0,0.3);
}
.url-swatch .swatch-check {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.url-swatch.selected .swatch-check { display: block; }

.url-detecting {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}
.url-spinner { 
  display: inline-block;
  animation: spin 1s linear infinite;
  font-size: 16px;
}

/* --- STRUCTURE EDITOR --- */
.structure-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.structure-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  transition: all var(--transition);
}
.structure-item:hover { border-color: var(--text-muted); }

.struct-up, .struct-down {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all var(--transition);
  line-height: 1;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.struct-up:hover, .struct-down:hover {
  color: var(--primary-light);
  background: rgba(108,92,231,0.1);
}
.struct-up:active, .struct-down:active {
  transform: scale(0.9);
}

.struct-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary-light);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.struct-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  padding: 4px 0;
  outline: none;
  min-width: 0;
}
.struct-input::placeholder { color: var(--text-muted); font-style: italic; }
.struct-input:focus { color: var(--text); }

.struct-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.struct-del:hover { color: var(--accent); background: rgba(255,107,107,0.1); }

.struct-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.struct-actions .btn { font-size: 12px; padding: 6px 14px; }

.ai-icon-small { font-weight: 700; }

/* Drag states */
.structure-item.dragging {
  opacity: 0.4;
  border-style: dashed;
}
.structure-item.drag-over {
  border-color: var(--primary);
  border-style: dashed;
  background: rgba(108, 92, 231, 0.08);
}

/* --- OPTIMISATION PANEL --- */
.panel-optim {
  max-width: 600px;
  margin: 0 auto;
}
.optim-header { text-align: center; margin-bottom: 32px; }
.optim-ai-icon { font-size: 48px; margin-bottom: 12px; }
.optim-title { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.optim-sub { font-size: 14px; color: var(--text-dim); }
.optim-questions { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.optim-q {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
}
.optim-q.current {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(108,92,231,0.08);
}
.optim-q-text { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }

.optim-options { display: flex; flex-direction: column; gap: 8px; }
.optim-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.optim-option:hover { border-color: var(--text-muted); }
.optim-option.selected {
  border-color: var(--primary);
  background: rgba(108,92,231,0.06);
}
.optim-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.optim-option.selected .optim-radio {
  border-color: var(--primary);
}
.optim-option.selected .optim-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.optim-option-text { font-size: 13px; color: var(--text-dim); }
.optim-option.selected .optim-option-text { color: var(--text); }

.optim-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.optim-progress span { font-size: 12px; color: var(--text-muted); min-width: 100px; }
.optim-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.optim-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: 2px; transition: width 0.4s ease; }

.optim-actions { display: flex; justify-content: flex-end; gap: 12px; }

/* --- GENERATION PANEL --- */
.panel-gen { max-width: 560px; margin: 0 auto; text-align: center; }
.gen-header { margin-bottom: 32px; }
.gen-spinner { font-size: 42px; margin-bottom: 12px; animation: spin 2s linear infinite; display: inline-block; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.gen-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.gen-sub { font-size: 14px; color: var(--text-dim); }

.gen-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto 32px;
  text-align: left;
}
.gen-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  transition: all var(--transition);
}
.gen-step.done {
  border-color: var(--success);
  color: var(--text);
}
.gen-step.active {
  border-color: var(--primary);
  color: var(--text);
  box-shadow: 0 0 12px rgba(108,92,231,0.08);
}
.gen-check { font-size: 18px; flex-shrink: 0; }
.gen-step.done .gen-check { color: var(--success); }
.gen-step.active .gen-check { color: var(--primary-light); animation: pulse-check 1.5s infinite; }
@keyframes pulse-check {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* --- RESULT --- */
.gen-result { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--border); }
.result-icon { font-size: 48px; margin-bottom: 8px; }
.result-title { font-size: 22px; font-weight: 700; color: var(--success); margin-bottom: 4px; }
.result-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 20px; }
.result-preview { max-width: 400px; margin: 0 auto 24px; display: flex; flex-direction: column; gap: 8px; }
.preview-slide {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.preview-slide::before {
  content: '';
  width: 20px;
  height: 14px;
  background: var(--primary-light);
  border-radius: 3px;
  flex-shrink: 0;
  opacity: 0.3;
}
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.result-actions .btn { min-width: 200px; }

/* --- CORRECTION PANEL --- */
.panel-correct { max-width: 720px; margin: 0 auto; }
.correct-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
}
.correct-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition);
}
.correct-close:hover { color: var(--text); background: var(--bg-card); }
.correct-title { font-size: 20px; font-weight: 700; }
.correct-sub { font-size: 14px; color: var(--text-dim); margin-top: 4px; }

.correct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.correct-col { display: flex; flex-direction: column; gap: 8px; }

.correct-upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.correct-upload-zone:hover,
.correct-upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(108,92,231,0.03);
}
.correct-upload-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.correct-upload-text { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 4px; }
.correct-upload-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

.correct-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.correct-buttons .btn { font-size: 12px; padding: 8px 16px; position: relative; overflow: hidden; }
.correct-buttons input[type="file"] { position: absolute; opacity: 0; pointer-events: none; }

.correct-uploaded { margin-top: 12px; }
.correct-thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.correct-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.correct-thumb img { width: 100%; height: 100%; object-fit: cover; }
.correct-thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.correct-prompt {
  flex: 1;
  min-height: 150px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: all var(--transition);
}
.correct-prompt:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}
.correct-prompt::placeholder { color: var(--text-muted); font-size: 13px; }

.correct-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.suggestion-tag {
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.suggestion-tag:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108,92,231,0.06);
}

.correct-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.correct-regenerating {
  text-align: center;
  padding: 32px;
  color: var(--text-dim);
}
.correct-regenerating .gen-spinner { font-size: 32px; }
.correct-regenerating p { font-size: 14px; margin-top: 8px; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .desktop-only { display: none; }

  .hero-title {
    font-size: 36px;
    letter-spacing: -1px;
  }

  .hero-actions { flex-direction: column; align-items: stretch; }

  .wizard-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .form-group-inline {
    flex-direction: column;
    gap: 20px;
  }

  .wizard-actions { flex-direction: column; }

  .about-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .steps-progress .step-line { width: 40px; }

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

  /* Mobile corrections */
  .correct-grid { grid-template-columns: 1fr; }
  .correct-actions { flex-direction: column; }
  .correct-actions .btn { width: 100%; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .optim-actions { flex-direction: column-reverse; }
  .optim-actions .btn { width: 100%; }
  .struct-actions { flex-direction: column; }
  .struct-actions .btn { width: 100%; }
}
