@keyframes slideInUp{
  from{
    opacity:0;
    transform:translateY(20px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}
@keyframes slideOutLeft{
  from{
    opacity:1;
    transform:translateX(0);
  }
  to{
    opacity:0;
    transform:translateX(-30px);
  }
}
@keyframes slideInRight{
  from{
    opacity:0;
    transform:translateX(30px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}
@keyframes slideOutRight{
  from{
    opacity:1;
    transform:translateX(0);
  }
  to{
    opacity:0;
    transform:translateX(30px);
  }
}
@keyframes slideInLeft{
  from{
    opacity:0;
    transform:translateX(-30px);
  }
  to{
    opacity:1;
    transform:translateX(0);
  }
}
@keyframes gradientShift{
  0%{background-position:0% 50%;}
  50%{background-position:100% 50%;}
  100%{background-position:0% 50%;}
}

/* Plan Banner Styles */
.wizard-plan-banner {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 16px 24px;
  margin: 0 0 24px 0;
  animation: slideInUp 0.4s ease-out;
}

.wizard-plan-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wizard-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #22d3ee;
}

.wizard-plan-limit {
  font-size: 14px;
  color: #94a3b8;
}

.wizard-plan-upgrade {
  margin-left: auto;
  padding: 8px 16px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.wizard-plan-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

@keyframes float{
  0%,100%{transform:translateY(0px) rotate(0deg);}
  50%{transform:translateY(-20px) rotate(5deg);}
}
@keyframes pulse{
  0%,100%{opacity:0.4;transform:scale(1);}
  50%{opacity:0.6;transform:scale(1.05);}
}
@keyframes orbitSlow{
  from{transform:rotate(0deg) translateX(100px) rotate(0deg);}
  to{transform:rotate(360deg) translateX(100px) rotate(-360deg);}
}
@keyframes orbitFast{
  from{transform:rotate(0deg) translateX(150px) rotate(0deg);}
  to{transform:rotate(-360deg) translateX(150px) rotate(360deg);}
}
@keyframes stepFadeIn{
  from{opacity:0;transform:translateX(-20px);}
  to{opacity:1;transform:translateX(0);}
}
@keyframes stepSlideIn{
  from{opacity:0;transform:scale(0.8);}
  to{opacity:1;transform:scale(1);}
}
.wizard-background{
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:-1;
  overflow:hidden;
  background:linear-gradient(135deg,#0a0e1a 0%,#1a0b2e 25%,#16123f 50%,#0d1424 75%,#0a0e1a 100%);
  background-size:400% 400%;
  animation:gradientShift 20s ease infinite;
}
html[data-theme="light"] .wizard-background{
  background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 25%,#cbd5e1 50%,#e2e8f0 75%,#f8fafc 100%);
}
.wizard-gradient-orb{
  position:absolute;
  border-radius:50%;
  filter:blur(80px);
  opacity:0.3;
  mix-blend-mode:screen;
}
.wizard-gradient-orb--1{
  width:600px;
  height:600px;
  top:10%;
  left:20%;
  background:radial-gradient(circle,rgba(124,58,237,0.6),transparent 70%);
  animation:float 15s ease-in-out infinite,pulse 8s ease-in-out infinite;
}
.wizard-gradient-orb--2{
  width:500px;
  height:500px;
  top:60%;
  right:15%;
  background:radial-gradient(circle,rgba(6,182,212,0.5),transparent 70%);
  animation:float 20s ease-in-out infinite reverse,pulse 10s ease-in-out infinite;
  animation-delay:2s;
}
.wizard-gradient-orb--3{
  width:400px;
  height:400px;
  bottom:10%;
  left:40%;
  background:radial-gradient(circle,rgba(168,139,250,0.4),transparent 70%);
  animation:float 18s ease-in-out infinite,pulse 12s ease-in-out infinite;
  animation-delay:4s;
}
.wizard-geometric-pattern{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  opacity:0.08;
}
.wizard-geometric-shape{
  position:absolute;
  border:1px solid rgba(124,58,237,0.3);
  border-radius:12px;
}
.wizard-geometric-shape--1{
  width:200px;
  height:200px;
  top:15%;
  right:10%;
  animation:orbitSlow 40s linear infinite;
}
.wizard-geometric-shape--2{
  width:150px;
  height:150px;
  top:50%;
  left:5%;
  animation:orbitFast 30s linear infinite reverse;
}
.wizard-geometric-shape--3{
  width:100px;
  height:100px;
  bottom:20%;
  right:30%;
  border-radius:50%;
  animation:orbitSlow 35s linear infinite reverse;
}
.wizard-geometric-shape--4{
  width:120px;
  height:120px;
  top:70%;
  left:50%;
  animation:orbitFast 25s linear infinite;
}
.wizard-header{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1.25rem 1.5rem;
  border-bottom:1px solid var(--border);
  background:linear-gradient(90deg,rgba(124,58,237,0.1),rgba(6,182,212,0.05));
  backdrop-filter:blur(12px);
}
.wizard-stepper{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:1.5rem 2rem;
  background:var(--surface-lighter);
  backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border-light);
}
.wizard-stepper-step{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.5rem;
  position:relative;
  z-index:1;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-stepper-circle{
  width:40px;
  height:40px;
  border-radius:50%;
  border:2px solid var(--border);
  background:var(--surface-light);
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:600;
  font-size:1rem;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-stepper-label{
  font-size:0.875rem;
  font-weight:500;
  color:var(--muted);
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-stepper-connector{
  height:2px;
  width:120px;
  background:var(--border-light);
  position:relative;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-stepper-step--active .wizard-stepper-circle{
  border-color:#7C3AED;
  background:linear-gradient(135deg,#7C3AED,#6D28D9);
  color:#ffffff;
  box-shadow:0 4px 16px rgba(124,58,237,0.4), 0 0 0 4px rgba(124,58,237,0.2);
  animation:stepSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-stepper-step--active .wizard-stepper-label{
  color:#7C3AED;
  font-weight:600;
  animation:stepFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-stepper-step--completed .wizard-stepper-circle{
  border-color:#16A34A;
  background:#16A34A;
  color:#ffffff;
}
.wizard-stepper-step--completed .wizard-stepper-circle::after{
  content:"✓";
  position:absolute;
  font-size:1.1rem;
  font-weight:700;
}
.wizard-stepper-step--completed .wizard-stepper-label{
  color:var(--text-secondary);
}
.wizard-stepper-connector--completed{
  background:linear-gradient(90deg,#16A34A,#7C3AED);
}

.wizard-top-controls{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:0.75rem;
  margin:1rem 1.5rem;
  flex-wrap:wrap;
}
.wizard-mode-toggle{
  margin:0;
  padding:0.75rem;
  border:1px solid var(--border-lighter);
  background:var(--surface-lighter);
  backdrop-filter:blur(8px);
  border-radius:14px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:0.75rem;
  box-shadow:0 12px 30px rgba(0,0,0,0.12);
  flex:1;
  min-width:260px;
}
.wizard-mode-option{
  border:1px solid var(--border-lighter);
  background:linear-gradient(145deg,rgba(30,41,59,0.95),var(--surface-light));
  border-radius:12px;
  padding:0.75rem 0.9rem;
  cursor:pointer;
  transition:all 0.2s ease;
  outline:none;
  display:flex;
  flex-direction:column;
  gap:0.25rem;
  color:var(--text);
  box-shadow:0 12px 30px rgba(0,0,0,0.16);
  position:relative;
}
.wizard-mode-option:hover{
  border-color:var(--border-hover);
  box-shadow:0 10px 24px rgba(124,58,237,0.16);
  transform:translateY(-1px);
}
.wizard-mode-option.is-selected{
  border-color:rgba(34,211,238,0.9);
  box-shadow:0 0 0 2px rgba(34,211,238,0.18),0 12px 26px rgba(6,182,212,0.18);
  background:linear-gradient(135deg,rgba(34,211,238,0.16),rgba(124,58,237,0.16));
}
.wizard-mode-option:focus-visible{
  outline:2px solid rgba(34,211,238,0.6);
  outline-offset:2px;
}
/* Premium badge for modes that require upgrade */
.wizard-mode-premium-badge{
  position:absolute;
  top:0.5rem;
  right:0.5rem;
  background:linear-gradient(135deg,#f59e0b,#d97706);
  color:#fff;
  font-size:0.7rem;
  font-weight:700;
  padding:0.2rem 0.5rem;
  border-radius:999px;
  display:none;
  box-shadow:0 2px 8px rgba(245,158,11,0.4);
}
.wizard-mode-option[data-requires-premium="true"] .wizard-mode-premium-badge{
  display:inline-block;
}
/* Disabled state for free users trying to use premium modes */
.wizard-mode-option.is-disabled{
  opacity:0.5;
  cursor:not-allowed;
  pointer-events:none;
}
.wizard-mode-option.is-disabled .wizard-mode-premium-badge{
  background:linear-gradient(135deg,#94a3b8,#64748b);
}
.wizard-mode-option[data-requires-premium="true"]:not(.is-disabled):hover .wizard-mode-premium-badge{
  transform:scale(1.05);
  box-shadow:0 4px 12px rgba(245,158,11,0.6);
}
.wizard-mode-option-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.75rem;
  font-weight:700;
  color:var(--text-high, #e5e7eb);
}
.wizard-mode-tier{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(124,58,237,0.25);
  color:#c084fc;
  border:1px solid rgba(124,58,237,0.4);
  border-radius:999px;
  padding:0.2rem 0.6rem;
  font-size:0.75rem;
  font-weight:700;
  letter-spacing:0.02em;
}
.wizard-mode-desc{
  margin:0;
  font-size:0.85rem;
  color:var(--text-high, #e5e7eb);
}
html[data-theme="light"] .wizard-mode-toggle{
  background:rgba(255, 255, 255, 0.8);
  border-color:var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
html[data-theme="light"] .wizard-mode-option{
  background:#ffffff;
  border-color:#cbd5e1;
  box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .wizard-mode-option.is-selected{
  border-color:var(--primary);
  box-shadow:0 0 0 2px rgba(124,58,237,0.15), 0 10px 25px rgba(124,58,237,0.15);
  background:linear-gradient(135deg,rgba(124,58,237,0.05),rgba(6,182,212,0.05));
}
.wizard-header-main{
  display:flex;
  align-items:center;
  gap:1rem;
}
.wizard-logo{
  width:32px;
  height:32px;
}
.wizard-title{
  font-size:1.1rem;
  margin:0;
}
.wizard-subtitle{
  margin:0.15rem 0 0;
  font-size:0.9rem;
  opacity:0.8;
}
.wizard-header-meta{
  font-size:0.8rem;
  opacity:0.8;
}
.wizard-tag{
  padding:0.2rem 0.5rem;
  border-radius:999px;
  border:1px solid var(--input-border);
}
.wizard-main{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1.6fr);
  grid-template-rows:auto auto;
  gap:1rem;
  padding:1rem 1.5rem 1.5rem;
  z-index:1;
}
@keyframes fadeOutLeft{
  from{opacity:1;transform:translateX(0);}
  to{opacity:0;transform:translateX(-30px);}
}
@keyframes fadeInRight{
  from{opacity:0;transform:translateX(30px);}
  to{opacity:1;transform:translateX(0);}
}
.wizard-panel{
  position:relative;
  border-radius:0.75rem;
  border:1px solid var(--border);
  padding:1rem 1.1rem;
  background:var(--surface-lighter);
  backdrop-filter:blur(12px);
  transition:all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-theme="light"] .wizard-panel{
  background:#ffffff;
  border-color:#cbd5e1;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}
/* Enhanced visual hierarchy for QA panel in light mode */
html[data-theme="light"] .wizard-panel--qa {
  border-left: 1px solid #cbd5e1; /* Reset border */
  border-top: 4px solid var(--primary); /* Top accent */
}
.wizard-panel::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:0.85rem;
  padding:2px;
  background:linear-gradient(135deg,rgba(124,58,237,0.3),rgba(6,182,212,0.2),transparent,transparent);
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  opacity:0;
  transition:opacity 0.4s ease;
  pointer-events:none;
}
.wizard-panel:hover::before{
  opacity:1;
}
.wizard-panel::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:0.75rem;
  box-shadow:0 0 40px rgba(124,58,237,0.15),0 0 80px rgba(6,182,212,0.1);
  opacity:0;
  transition:opacity 0.4s ease;
  pointer-events:none;
  z-index:-1;
}
.wizard-panel:hover::after{
  opacity:1;
}
.wizard-panel--idea.is-starting{
  opacity: 0.7;
  transform: scale(0.985);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  filter: blur(0.25px);
}
.wizard-panel--qa.is-appearing{
  animation:fadeInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.wizard-panel--idea{
  grid-column:1/2;
  grid-row:1/2;
}
.wizard-panel--qa{
  grid-column:2/3;
  grid-row:1/3;
}
.wizard-panel--result{
  grid-column:1/2;
  grid-row:2/3;
}
.wizard-panel--log{
  grid-column:1/3;
  grid-row:3/4;
}
.wizard-panel-header h2{
  margin:0 0 0.25rem;
}
.wizard-panel-desc{
  margin:0;
  font-size:0.85rem;
  opacity:0.85;
}
.wizard-label{
  display:flex;
  flex-direction:column;
  gap:0.35rem;
  margin-top:0.75rem;
  font-size:0.85rem;
}
.wizard-label textarea,
.wizard-label select{
  border-radius:0.5rem;
  border:1px solid var(--input-border);
  padding:0.5rem 0.6rem;
  background:var(--surface-light);
  color:inherit;
  resize:vertical;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-theme="light"] .wizard-label textarea,
html[data-theme="light"] .wizard-label select{
  background:var(--text);
  color:var(--surface);
  border-color:var(--border);
}
.wizard-label textarea{
  caret-color:#7C3AED;
}
.wizard-label textarea:focus,
.wizard-label select:focus{
  outline:none;
  border-color:var(--primary-hover);
  background:var(--surface);
  box-shadow:0 0 0 3px rgba(124,58,237,0.2), 0 0 20px rgba(124,58,237,0.15);
  transform:translateY(-2px);
}
.wizard-panel--idea.is-focused h2{
  transform:translateY(-4px);
  color:#7C3AED;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes shimmer{
  0%{background-position:200% 0;}
  100%{background-position:-200% 0;}
}
.wizard-button-primary,
.wizard-button-secondary{
  margin-top:0.9rem;
  padding:0.45rem 0.9rem;
  border-radius:999px;
  border:none;
  font-size:0.85rem;
  cursor:pointer;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position:relative;
  overflow:hidden;
}
.wizard-button-primary{
  background:linear-gradient(120deg,#7C3AED,#06B6D4);
  color:white;
}
.wizard-button-primary:hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 4px 16px rgba(124,58,237,0.4);
}
.wizard-button-primary:disabled{
  opacity:0.6;
  cursor:not-allowed;
  background:linear-gradient(90deg,#7C3AED 0%,#06B6D4 50%,#7C3AED 100%);
  background-size:200% 100%;
  animation:shimmer 2s linear infinite;
}
.wizard-button-secondary{
  background:transparent;
  border:1px solid var(--border);
  color:inherit;
}
.wizard-button-secondary:hover{
  background:rgba(124,58,237,0.1);
  border-color:rgba(124,58,237,0.6);
  transform:translateY(-1px);
}
.wizard-button-nav{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  padding:0.625rem 1.125rem;
  border-radius:8px;
  border:1.5px solid var(--border);
  background:var(--surface-lighter);
  color:var(--text-secondary);
  font-size:0.9rem;
  font-weight:500;
  cursor:pointer;
  transition:all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
}
.wizard-button-nav:hover:not(:disabled){
  background:rgba(124,58,237,0.15);
  border-color:rgba(124,58,237,0.6);
  box-shadow:0 4px 16px rgba(124,58,237,0.25);
  transform:translateY(-2px);
}
.wizard-button-nav:disabled{
  opacity:0.5;
  cursor:not-allowed;
}
.wizard-button-nav--next:active:not(:disabled){
  animation:slideRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-button-nav .wizard-button-icon{
  font-size:1.1rem;
  font-weight:700;
  transition:transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-button-nav--back:hover .wizard-button-icon{
  transform:translateX(-3px);
}
.wizard-button-nav--next:hover .wizard-button-icon{
  transform:translateX(3px);
}
.wizard-button-finalize{
  background:linear-gradient(135deg,#16A34A 0%,#15803D 100%);
  border:none;
  font-weight:600;
  box-shadow:0 4px 12px rgba(22,163,74,0.3);
}
.wizard-button-finalize:hover:not(:disabled){
  background:linear-gradient(135deg,#15803D 0%,#166534 100%);
  box-shadow:0 6px 20px rgba(22,163,74,0.4);
  transform:translateY(-2px) scale(1.02);
}
.wizard-empty{
  margin-top:0.75rem;
  font-size:0.9rem;
  opacity:0.8;
}
.wizard-questions{
  margin-top:0.75rem;
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}
.wizard-questions--slide-out-left{
  animation:slideOutLeft 0.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.wizard-questions--slide-in-right{
  animation:slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.wizard-questions--slide-out-right{
  animation:slideOutRight 0.2s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.wizard-questions--slide-in-left{
  animation:slideInLeft 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.wizard-question-card{
  border-radius:12px;
  border:1px solid var(--border-light);
  padding:1.25rem 1.5rem;
  background:rgba(10,14,25,0.97);
  backdrop-filter:blur(10px);
  box-shadow:0 4px 18px rgba(0,0,0,0.15);
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation:slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
  position:relative;
  color:var(--text-high, #e5e7eb);
}
html[data-theme="light"] .wizard-question-card{
  background:#ffffff;
  border-color:var(--border-light);
  box-shadow:0 2px 18px rgba(0,0,0,0.08);
}
.wizard-question-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(124,58,237,0.2), 0 6px 18px rgba(0,0,0,0.18);
  border-color:var(--border-hover);
}
.wizard-question-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:0.75rem;
  margin-bottom:0.6rem;
}
.wizard-question-title-group{
  display:flex;
  align-items:center;
  gap:0.75rem;
  flex-wrap:wrap;
}
.wizard-question-number{
  font-weight:700;
  font-size:0.875rem;
  color:#7C3AED;
  padding:0.25rem 0.75rem;
  background:linear-gradient(135deg, rgba(124,58,237,0.12), rgba(6,182,212,0.12));
  border-radius:999px;
  border:1px solid rgba(124,58,237,0.35);
}
.wizard-question-type{
  font-size:0.75rem;
  text-transform:none;
  opacity:0.75;
  letter-spacing:0.08em;
  color:var(--muted);
}
.wizard-question-text{
  margin:0 0 1.2rem;
  font-size:1.1rem;
  line-height:1.7;
  font-weight:500;
  color:var(--text);
}
.wizard-answer-area{
  margin-top:0.5rem;
  padding:1rem;
  border-radius:10px;
  border:1px solid rgba(124,58,237,0.2);
  background:rgba(124,58,237,0.05);
}
.wizard-question-card.is-answered{
  border-color:#22C55E;
  box-shadow:0 10px 28px rgba(34,197,94,0.15), 0 5px 16px rgba(0,0,0,0.15);
}
.wizard-answer-badge{
  font-size:0.7rem;
  letter-spacing:0.1em;
  text-transform:uppercase;
  padding:0.15rem 0.7rem;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--border-lighter);
  color:var(--text-secondary);
}
.wizard-answer-badge.answered{
  border-color:#22C55E;
  background:rgba(34,197,94,0.12);
  color:#C7F0DA;
}
.wizard-answer-badge.pending{
  border-color:var(--border);
  background:var(--border-lighter);
  color:var(--text-secondary);
}
.wizard-regenerate-icon{
  border:none;
  background:var(--border-lighter);
  color:var(--muted);
  width:32px;
  height:32px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all 0.2s ease;
  opacity:0.7;
  position:relative;
}
.wizard-regenerate-icon:hover{
  opacity:1;
  background:rgba(124,58,237,0.25);
  transform:scale(1.05);
}
.wizard-regenerate-icon svg{
  width:18px;
  height:18px;
}
@keyframes pillSelect{
  0%{transform:scale(1);}
  50%{transform:scale(1.03);}
  100%{transform:scale(1);}
}
@keyframes checkPop{
  0%{transform:translateY(-50%) scale(0);opacity:0;}
  50%{transform:translateY(-50%) scale(1.2);opacity:1;}
  100%{transform:translateY(-50%) scale(1);opacity:1;}
}
.wizard-pill--multi::before{
  border-radius:4px;
}
.wizard-pill--multi.is-selected::before{
  border-radius:4px;
}
.wizard-choice-row{
  display:flex;
  flex-wrap:wrap;
  gap:0.75rem;
  margin-top:0.5rem;
  align-items:flex-start;
}
.wizard-pill{
  position:relative;
  padding:0.65rem 1.25rem;
  padding-left:2.5rem;
  border-radius:999px;
  border:1.5px solid var(--border-light);
  font-size:0.9rem;
  font-weight:500;
  cursor:pointer;
  background:transparent;
  color:var(--text-secondary);
  transition:all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select:none;
  white-space:normal;
  text-align:left;
  max-width:220px;
}
.wizard-pill span{
  display:inline-flex;
  align-items:center;
  gap:0.35rem;
}
.wizard-pill:hover{
  border-color:var(--border-hover);
  background:rgba(124,58,237,0.12);
  color:var(--text);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(124,58,237,0.15);
}
.wizard-pill.is-selected{
  background:linear-gradient(135deg,#7C3AED 0%,#6D28D9 100%);
  border-color:var(--primary-hover);
  color:#ffffff;
  font-weight:600;
  box-shadow:0 4px 16px rgba(124,58,237,0.35), 0 2px 8px rgba(124,58,237,0.2);
  animation:pillSelect 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-pill::before{
  content:"";
  position:absolute;
  left:0.875rem;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid var(--border);
  background:transparent;
  transition:all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-pill:hover::before{
  border-color:rgba(124,58,237,0.6);
  background:rgba(124,58,237,0.08);
}
.wizard-pill.is-selected::before{
  border-color:var(--text-secondary);
  background:#ffffff;
}
.wizard-pill.is-selected::after{
  content:"✓";
  position:absolute;
  left:0.875rem;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#7C3AED;
  font-size:12px;
  font-weight:700;
  animation:checkPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-pill--multi::before{
  border-radius:4px;
}
.wizard-pill--multi.is-selected::before{
  border-radius:4px;
}
.wizard-pill-icon{
  width:16px;
  height:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:0.85rem;
}
.wizard-pill--yes{
  border-color:rgba(34,197,94,0.5);
  background:rgba(34,197,94,0.08);
  color:#A1F5C4;
}
.wizard-pill--no{
  border-color:rgba(100,116,139,0.6);
  background:rgba(100,116,139,0.12);
  color:#E2E8F0;
}
.wizard-pill--yes.is-selected,
.wizard-pill--no.is-selected{
  background:linear-gradient(135deg,rgba(34,197,94,0.8),rgba(16,185,129,0.9));
  border-color:rgba(34,197,94,0.9);
  color:#fff;
}
.wizard-pill--no.is-selected{
  background:linear-gradient(135deg,rgba(71,85,105,0.9),rgba(55,65,81,0.9));
  border-color:rgba(71,85,105,0.9);
}
.wizard-input-short{
  width:100%;
  border-radius:8px;
  border:1px solid var(--border);
  padding:0.75rem 1rem;
  background:var(--surface-light);
  color:inherit;
  font-size:0.9rem;
  transition:all 0.2s ease;
}
.wizard-input-short:focus{
  outline:none;
  border-color:rgba(124,58,237,0.6);
  background:var(--surface-light);
  box-shadow:0 0 0 3px rgba(124,58,237,0.1);
}
@keyframes slideRight{
  0%{transform:translateX(0);}
  50%{transform:translateX(5px);}
  100%{transform:translateX(0);}
}
@keyframes progressSlide{
  from{transform:scaleX(0);transform-origin:left;}
  to{transform:scaleX(1);transform-origin:left;}
}
.wizard-qa-actions{
  display:flex;
  flex-direction:column;
  gap:0;
  margin-top:1.25rem;
  margin-left:-1.1rem;
  margin-right:-1.1rem;
  margin-bottom:-1rem;
  background:var(--surface-light);
  backdrop-filter:blur(8px);
  border-top:1px solid var(--border-light);
  border-radius:0 0 0.75rem 0.75rem;
}
.wizard-progress-indicator{
  display:flex;
  flex-direction:column;
  gap:0.625rem;
  padding:1rem 1.5rem 0.75rem;
  border-bottom:1px solid var(--border-lighter);
}
.wizard-progress-bar-container{
  width:100%;
  height:4px;
  background:var(--border-lighter);
  border-radius:999px;
  overflow:hidden;
}
.wizard-progress-bar{
  height:100%;
  background:linear-gradient(90deg,#7C3AED,#06B6D4);
  border-radius:999px;
  transition:width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation:progressSlide 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-progress-info{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}
.wizard-progress-text{
  font-size:0.8rem;
  font-weight:500;
  color:var(--muted);
}
.wizard-progress-dots{
  font-size:0.75rem;
  color:var(--primary-hover);
  letter-spacing:0.25rem;
}
.wizard-qa-actions-buttons{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0.75rem;
  padding:1rem 1.5rem;
}
.wizard-qa-actions-left{
  display:flex;
  gap:0.75rem;
  align-items:center;
}
.wizard-qa-actions-right{
  display:flex;
  gap:0.75rem;
  align-items:center;
  margin-left:auto;
}
.wizard-result{
  margin-top:0.5rem;
  display:flex;
  flex-direction:column;
  gap:0.75rem;
}
.wizard-result-section h3{
  margin:0 0 0.35rem;
}
.wizard-code{
  max-height:220px;
  overflow:auto;
  border-radius:0.5rem;
  border:1px solid var(--border);
  padding:0.5rem 0.6rem;
  font-size:0.8rem;
  background:var(--surface);
}
.wizard-code--plain{
  white-space:pre-wrap;
}
.wizard-log{
  max-height:180px;
  overflow:auto;
  border-radius:0.5rem;
  border:1px dashed var(--input-border);
  padding:0.5rem 0.6rem;
  font-size:0.75rem;
  background:var(--surface);
}
.wizard-error{
  margin-top:0.4rem;
  color:#f97373;
  font-size:0.8rem;
}
.hidden{
  display:none !important;
}
.wizard-button-mini{
  font-size:0.8rem;
  padding:0.5rem 0.9rem;
  border-radius:8px;
  border:1px solid var(--border);
  background:rgba(124,58,237,0.08);
  color:rgba(124,58,237,1);
  cursor:pointer;
  transition:all 0.2s ease;
  font-weight:500;
  margin-top:1rem;
}
.wizard-button-mini:hover{
  background:rgba(124,58,237,0.15);
  border-color:var(--border-hover);
  transform:translateY(-1px);
  box-shadow:0 2px 8px rgba(124,58,237,0.2);
}
/* Loading spinner in question panel - P1: Enhanced visibility */
.wizard-loading-overlay{
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:var(--surface);
  backdrop-filter:blur(12px);
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1rem;
  border-radius:0.75rem;
  z-index:1000;
  animation:fadeIn 0.3s ease;
}
.wizard-loading-overlay.hidden {
  display:none !important;
}
.wizard-loading-spinner{
  width:48px;
  height:48px;
  border:4px solid rgba(124,58,237,0.2);
  border-top-color:#7C3AED;
  border-radius:50%;
  animation:spin 0.8s linear infinite;
}
.wizard-loading-text{
  font-size:0.875rem;
  color:var(--muted);
  font-weight:500;
}
@keyframes spin{
  to{transform:rotate(360deg);}
}
@keyframes fadeIn{
  from{opacity:0;}
  to{opacity:1;}
}
/* Warning box animation - very prominent */
@keyframes pulse-attention{
  0%, 100%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(245,158,11,0.7), 0 0 0 0 rgba(245,158,11,0.4);
  }
  50%{
    transform:scale(1.05);
    box-shadow:0 0 0 8px rgba(245,158,11,0), 0 0 30px 10px rgba(245,158,11,0.8);
  }
}

/* Fixed top warning banner */
.wizard-running-warning{
  position:fixed;
  top:60px;
  left:0;
  right:0;
  z-index:2000;
  background:linear-gradient(135deg, rgba(245,158,11,0.95), rgba(251,191,36,0.95));
  border-bottom:3px solid #F59E0B;
  box-shadow:0 4px 20px rgba(245,158,11,0.6), 0 0 40px rgba(245,158,11,0.4);
  animation:slideDown 0.3s ease-out, pulse-glow-banner 2s ease-in-out infinite;
  backdrop-filter:blur(8px);
}
.wizard-running-warning.hidden{
  display:none;
}
.wizard-running-warning-content{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:1rem;
  padding:1rem 2rem;
  color:#FFF;
  font-size:1.1rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.15em;
  text-shadow:0 2px 4px rgba(0,0,0,0.3);
}
.wizard-running-warning-icon{
  font-size:1.8rem;
  animation:bounce-icon 1s ease-in-out infinite;
}
.wizard-running-warning-text{
  flex:1;
  text-align:center;
}
@keyframes slideDown{
  from{
    transform:translateY(-100%);
    opacity:0;
  }
  to{
    transform:translateY(0);
    opacity:1;
  }
}
@keyframes pulse-glow-banner{
  0%, 100%{
    box-shadow:0 4px 20px rgba(245,158,11,0.6), 0 0 40px rgba(245,158,11,0.4);
  }
  50%{
    box-shadow:0 4px 30px rgba(245,158,11,0.9), 0 0 60px rgba(245,158,11,0.7);
  }
}
@keyframes bounce-icon{
  0%, 100%{
    transform:translateY(0) scale(1);
  }
  50%{
    transform:translateY(-4px) scale(1.1);
  }
}
.wizard-loading-warning{
  display:flex !important;
  align-items:center;
  justify-content:center;
  gap:0.75rem;
  margin-top:2rem !important;
  padding:1.25rem 2rem !important;
  background:rgba(245,158,11,0.3) !important;
  border:4px solid #F59E0B !important;
  border-radius:16px;
  font-size:1.3rem !important;
  font-weight:900 !important;
  color:#FFF !important;
  text-shadow:0 2px 4px rgba(0,0,0,0.3);
  animation:pulse-attention 1.5s ease-in-out infinite !important;
  text-transform:uppercase;
  letter-spacing:0.1em;
  box-shadow:0 0 30px rgba(245,158,11,0.8), 0 4px 20px rgba(0,0,0,0.5) !important;
  position:relative;
  z-index:1000;
  min-width:400px;
  backdrop-filter:blur(4px);
}
.wizard-loading-warning span:first-child,
.wizard-loading-warning span:last-child{
  font-size:2rem !important;
  animation:none;
}

/* Modern regenerate icon with SVG */
.wizard-regenerate-icon{
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
  font-size:0.8rem;
  padding:0.5rem 0.9rem;
  border-radius:8px;
  border:1px solid var(--border-light);
  background:var(--surface-lighter);
  color:var(--muted);
  cursor:pointer;
  transition:all 0.2s ease;
  font-weight:500;
}
.wizard-regenerate-icon svg{
  width:14px;
  height:14px;
  transition:transform 0.3s ease;
}
.wizard-regenerate-icon:hover{
  background:rgba(124,58,237,0.12);
  border-color:var(--border-hover);
  color:#A78BFA;
  transform:scale(1.05);
}
.wizard-regenerate-icon:hover svg{
  transform:rotate(180deg);
}

/* Other input field */
.wizard-other-input-container{
  margin-top:0.75rem;
  padding-top:0.75rem;
  border-top:1px solid var(--border-light);
  animation:slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-other-input{
  width:100%;
  padding:0.625rem 0.875rem;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--surface-light);
  color:#eaf0fb;
  font-size:0.875rem;
  transition:all 0.2s ease;
}
.wizard-other-input:focus{
  outline:none;
  border-color:#7C3AED;
  box-shadow:0 0 0 3px rgba(124,58,237,0.15);
}
.wizard-other-input::placeholder{
  color:var(--border);
}
@keyframes slideDown{
  from{
    opacity:0;
    max-height:0;
    transform:translateY(-10px);
  }
  to{
    opacity:1;
    max-height:100px;
    transform:translateY(0);
  }
}

/* Missing options fallback UI */
.wizard-missing-options{
  padding:1rem 1.25rem;
  border-radius:8px;
  background:rgba(251,146,60,0.1);
  border:1px solid rgba(251,146,60,0.3);
  color:rgba(251,146,60,0.9);
  font-size:0.875rem;
  margin-top:0.75rem;
  display:flex;
  align-items:center;
  gap:0.75rem;
}
.wizard-missing-options-icon{
  font-size:1.25rem;
  flex-shrink:0;
}

/* Enhanced page indicators */
.wizard-page-indicator{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:0.5rem;
  padding:0.625rem 1rem;
  background:var(--surface-lighter);
  border-radius:8px;
  border:1px solid var(--border-light);
  margin-bottom:0.75rem;
  font-size:0.875rem;
  font-weight:600;
  color:var(--muted);
}
.wizard-page-indicator-number{
  color:#7C3AED;
  font-weight:700;
}

/* Colored question numbers */
.wizard-question-number{
  font-weight:700;
  font-size:0.875rem;
  color:#7C3AED;
  margin-bottom:0.75rem;
  display:inline-block;
  padding:0.25rem 0.75rem;
  background:linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.1));
  border-radius:999px;
  border:1px solid rgba(124,58,237,0.3);
  position:relative;
}
.wizard-question-number::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  transform:translateY(-50%);
  width:3px;
  height:60%;
  background:linear-gradient(180deg, #7C3AED, #06B6D4);
  border-radius:999px;
}

/* Card minimum height for regeneration stability */
.wizard-question-card{
  min-height:180px;
  position:relative;
  overflow:hidden;
}
.wizard-question-card.is-regenerating{
  pointer-events:none;
}
.wizard-question-card.is-regenerating > *:not(.wizard-regenerating-overlay){
  opacity:0.4;
  filter:blur(0.5px);
}
/* Stable loading overlay for regeneration */
.wizard-regenerating-overlay{
  position:absolute;
  top:0;
  left:0;
  right:0;
  bottom:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10;
  background:transparent;
  pointer-events:none;
}
.wizard-regenerating-spinner{
  width:40px;
  height:40px;
  border:4px solid rgba(124,58,237,0.2);
  border-top-color:#7C3AED;
  border-radius:50%;
  animation:spin 0.7s linear infinite;
  flex-shrink:0;
}

/* Ensure consistent top padding */
.wizard-questions{
  padding-top:0.5rem;
}

/* Smooth skeleton loader */
.wizard-skeleton{
  animation:pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.wizard-skeleton-card{
  height:200px;
  border-radius:12px;
  background:linear-gradient(90deg, var(--surface-lighter) 0%, rgba(124,58,237,0.1) 50%, var(--surface-lighter) 100%);
  background-size:200% 100%;
  animation:shimmer 2s infinite;
  margin-bottom:1.25rem;
}
@keyframes shimmer{
  0%{background-position:200% 0;}
  100%{background-position:-200% 0;}
}
@keyframes pulse{
  0%, 100%{opacity:1;}
  50%{opacity:0.5;}
}

/* Gentle success feedback for Save Snapshot */
.wizard-button-secondary.snapshot-saved{
  background:rgba(34,197,94,0.15);
  border-color:rgba(34,197,94,0.4);
  color:#86EFAC;
  box-shadow:0 0 12px rgba(34,197,94,0.2);
  animation:gentlePulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes gentlePulse{
  0%{transform:scale(1);}
  50%{transform:scale(1.03);}
  100%{transform:scale(1);}
}
/* Subtle checkmark tooltip */
.wizard-snapshot-tooltip{
  position:absolute;
  left:50%;
  top:calc(100% + 0.5rem);
  transform:translateX(-50%);
  padding:0.375rem 0.75rem;
  background:rgba(34,197,94,0.95);
  color:white;
  border-radius:6px;
  font-size:0.75rem;
  font-weight:600;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  animation:tooltipFadeInOut 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  box-shadow:0 2px 8px rgba(34,197,94,0.3);
  z-index:10000;
}
.wizard-snapshot-tooltip::after{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  transform:translateX(-50%) translateY(-100%);
  border:5px solid transparent;
  border-bottom-color:rgba(34,197,94,0.95);
}
@keyframes tooltipFadeInOut{
  0%{opacity:0;transform:translateX(-50%) translateY(-4px);}
  15%{opacity:1;transform:translateY(-50%) translateX(0);}
  85%{opacity:1;transform:translateY(-50%) translateX(0);}
  100%{opacity:0;transform:translateY(-50%) translateX(-8px);}
}

@media (max-width: 960px){
  .wizard-main{
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto;
  }
  .wizard-panel--qa,
  .wizard-panel--result,
  .wizard-panel--idea,
  .wizard-panel--log{
    grid-column:1/2;
  }
  /* Tooltip already positioned for mobile/desktop consistency */
}

/* Guided status + inline hints */
.wizard-inline-hint{margin:6px 0 10px;color:var(--text-low,#94a3b8);font-size:0.9rem;}
.wizard-status{
  margin:10px 0;
  padding:14px 16px;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface-light);
  color:var(--text-high,#E7EAF0);
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:0.75rem;
  box-shadow:0 14px 32px rgba(0,0,0,0.35);
  font-weight:500;
}
.wizard-status.wizard-status--info{border-color:rgba(6,182,212,0.6);background:var(--surface-light);}
.wizard-status.wizard-status--warn{border-color:rgba(245,158,11,0.6);}
.wizard-status.wizard-status--error{border-color:rgba(239,68,68,0.6);}
.wizard-status-icon{
  font-size:1.35rem;
  line-height:1;
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.wizard-status-text{
  flex:1;
  font-weight:600;
  min-width:0;
  word-wrap:break-word;
  overflow-wrap:break-word;
  white-space:normal;
}
.wizard-loading-ticks{
  width:18px;
  height:18px;
  border:2px solid var(--muted);
  border-top-color:var(--brand-b,#06B6D4);
  border-radius:50%;
  animation:spin 0.9s linear infinite;
  margin-top:2px;
}
.wizard-status-note{
  font-size:0.78rem;
  color:rgba(226,232,240,0.9);
  margin-top:0.2rem;
  opacity:0.9;
  flex-basis:100%;
  letter-spacing:0.02em;
  word-wrap:break-word;
  overflow-wrap:break-word;
  white-space:normal;
}
.wizard-status strong{font-weight:700;}
@keyframes spin{
  to{
    transform:rotate(360deg);
  }
}

/* ===== Phase 3 UX Enhancements ===== */

/* Mode-specific time estimates (Phase 3.3) */
.wizard-mode-time{
  display:inline-flex;
  align-items:center;
  gap:0.25rem;
  margin-top:0.5rem;
  padding:0.25rem 0.625rem;
  border-radius:999px;
  font-size:0.75rem;
  font-weight:600;
  background:var(--border-lighter);
  color:var(--muted);
  border:1px solid var(--border-light);
}
.wizard-mode-option[data-mode="fast"] .wizard-mode-time{
  background:rgba(34,197,94,0.12);
  color:#86EFAC;
  border-color:rgba(34,197,94,0.3);
}
.wizard-mode-option[data-mode="deep"] .wizard-mode-time{
  background:rgba(6,182,212,0.12);
  color:#67E8F9;
  border-color:rgba(6,182,212,0.3);
}
.wizard-mode-option[data-mode="ultra"] .wizard-mode-time{
  background:rgba(168,139,250,0.12);
  color:#C4B5FD;
  border-color:rgba(168,139,250,0.3);
}

/* Answer guidance banner (Phase 3.2) */
.wizard-answer-guidance{
  display:flex;
  align-items:center;
  gap:0.75rem;
  padding:0.875rem 1rem;
  margin-bottom:0.75rem;
  border-radius:10px;
  background:linear-gradient(135deg,rgba(124,58,237,0.08),rgba(6,182,212,0.05));
  border:1px solid rgba(124,58,237,0.25);
  animation:slideInUp 0.3s ease;
}
.wizard-answer-guidance-icon{
  font-size:1.25rem;
  flex-shrink:0;
}
.wizard-answer-guidance-text{
  display:flex;
  flex-direction:column;
  gap:0.125rem;
}
.wizard-answer-guidance-text span:first-child{
  font-size:0.875rem;
  font-weight:500;
  color:var(--text-secondary);
}
.wizard-answer-counter{
  font-size:0.75rem;
  color:var(--border);
}
.wizard-answer-guidance.guidance-met{
  background:linear-gradient(135deg,rgba(34,197,94,0.1),rgba(6,182,212,0.05));
  border-color:rgba(34,197,94,0.4);
}
.wizard-answer-guidance.guidance-met .wizard-answer-guidance-icon::after{
  content:"✓";
  margin-left:0.25rem;
  color:#86EFAC;
}

/* Auto-save indicator (Phase 3.1) */
.wizard-autosave-indicator{
  position:fixed;
  bottom:1.5rem;
  right:1.5rem;
  display:flex;
  align-items:center;
  gap:0.5rem;
  padding:0.625rem 1rem;
  background:rgba(34,197,94,0.95);
  color:white;
  border-radius:999px;
  font-size:0.8rem;
  font-weight:600;
  box-shadow:0 4px 16px rgba(34,197,94,0.35);
  z-index:1000;
  animation:autoSaveFadeIn 0.3s ease;
}
.wizard-autosave-indicator.hidden{
  opacity:0;
  pointer-events:none;
  animation:autoSaveFadeOut 0.3s ease forwards;
}
.wizard-autosave-icon{
  width:16px;
  height:16px;
}
@keyframes autoSaveFadeIn{
  from{opacity:0;transform:translateY(10px);}
  to{opacity:1;transform:translateY(0);}
}
@keyframes autoSaveFadeOut{
  from{opacity:1;transform:translateY(0);}
  to{opacity:0;transform:translateY(10px);}
}

/* Loading warning animation */
@keyframes pulse-attention{
  0%, 100%{
    transform:scale(1);
    box-shadow:0 0 0 0 rgba(245,158,11,0.4);
  }
  50%{
    transform:scale(1.02);
    box-shadow:0 0 20px 4px rgba(245,158,11,0.6);
  }
}

/* ============================================ */
/* FORGE CEREMONY - Ultimate Result Animation */
/* ============================================ */

/* Only apply forge effects when result container is visible */
.wizard-result--forge {
  position: relative;
}

/* Double-layer energy border (only visible when result shown) */
.wizard-result--forge:not(.hidden)::before {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: 
    linear-gradient(var(--surface-2, #1A1D29), var(--surface-2, #1A1D29)) padding-box,
    linear-gradient(135deg, 
      rgba(124, 58, 237, 0.4), 
      rgba(34, 211, 238, 0.4),
      rgba(251, 191, 36, 0.4)
    ) border-box;
  pointer-events: none;
  opacity: 0;
  animation: forgeBorderAppear 1.5s ease-out 0.5s forwards;
  z-index: 0;
}

/* Outer glow layer */
.wizard-result--forge:not(.hidden)::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 16px;
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.15), 
    rgba(34, 211, 238, 0.15),
    rgba(251, 191, 36, 0.15)
  );
  filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  animation: forgeGlowAppear 1.5s ease-out 0.7s forwards;
  z-index: -1;
}

/* Noise texture for premium feel */
.wizard-result--forge .wizard-result-section {
  position: relative;
  z-index: 1;
}

/* Corner decorations - L-shaped with gradient glow */
.forge-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
}

.wizard-result--forge:not(.hidden) .forge-corner {
  animation: forgeCornerAppear 0.8s ease-out forwards;
}

.forge-corner::before,
.forge-corner::after {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.9), 
    rgba(34, 211, 238, 0.9)
  );
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
}

.forge-corner::before {
  width: 2px;
  height: 100%;
}

.forge-corner::after {
  width: 100%;
  height: 2px;
}

.forge-corner--tl {
  top: 12px;
  left: 12px;
  animation-delay: 0.8s;
}

.forge-corner--tl::before { left: 0; top: 0; }
.forge-corner--tl::after { left: 0; top: 0; }

.forge-corner--tr {
  top: 12px;
  right: 12px;
  animation-delay: 0.9s;
}

.forge-corner--tr::before { right: 0; top: 0; }
.forge-corner--tr::after { right: 0; top: 0; }

.forge-corner--bl {
  bottom: 12px;
  left: 12px;
  animation-delay: 1s;
}

.forge-corner--bl::before { left: 0; bottom: 0; }
.forge-corner--bl::after { left: 0; bottom: 0; }

.forge-corner--br {
  bottom: 12px;
  right: 12px;
  animation-delay: 1.1s;
}

.forge-corner--br::before { right: 0; bottom: 0; }
.forge-corner--br::after { right: 0; bottom: 0; }

/* Scanline effect - sweeps from top to bottom */
.forge-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent,
    rgba(34, 211, 238, 0.9) 50%,
    transparent
  );
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.7);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.wizard-result--forge:not(.hidden) .forge-scanline {
  animation: forgeScanline 2s ease-out 0.3s;
}

/* SEALED badge - appears in top right */
.forge-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(145deg, 
    rgba(34, 197, 94, 0.25),
    rgba(16, 185, 129, 0.3),
    rgba(34, 211, 238, 0.2)
  );
  border: 2px solid rgba(34, 197, 94, 0.8);
  border-radius: 24px;
  box-shadow: 
    0 0 30px rgba(34, 197, 94, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  z-index: 30;
  transform-origin: top right;
  position: relative;
  overflow: hidden;
}

.forge-badge.visible {
  animation: forgeBadgeAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.5s forwards,
              forgeBadgePulse 2s ease-in-out 3.1s infinite;
}

.forge-badge-icon {
  font-size: 16px;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.8));
}

.forge-badge-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(34, 197, 94, 1);
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

/* Content blocks - staggered slide in with float */
.forge-block {
  opacity: 0;
  transform: translateX(-20px) translateY(10px);
}

.forge-block.forge-animate {
  animation: forgeBlockAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.forge-block[data-forge-delay="0"].forge-animate { animation-delay: 1.2s; }
.forge-block[data-forge-delay="1"].forge-animate { animation-delay: 1.5s; }
.forge-block[data-forge-delay="2"].forge-animate { animation-delay: 1.8s; }
.forge-block[data-forge-delay="3"].forge-animate { animation-delay: 2.1s; }

/* Content reveal - line by line illuminate */
.forge-content.forge-reveal {
  animation: forgeContentReveal 1.2s ease-out 1.8s forwards;
}

/* Enhanced code blocks with inner glow */
.forge-block.forge-animate .wizard-code {
  border: 1px solid rgba(124, 58, 237, 0.3);
  box-shadow: 
    0 0 16px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ============================================ */
/* KEYFRAME ANIMATIONS */
/* ============================================ */

@keyframes forgeBorderAppear {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes forgeGlowAppear {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes forgeCornerAppear {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  60% {
    opacity: 1;
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes forgeScanline {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  90% {
    opacity: 0.9;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes forgeBadgeAppear {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(-20px) rotate(-12deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.08) translateY(0) rotate(3deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

@keyframes forgeBadgePulse {
  0%, 100% {
    box-shadow: 
      0 0 24px rgba(34, 197, 94, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 
      0 0 36px rgba(34, 197, 94, 0.6),
      0 0 60px rgba(34, 197, 94, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

@keyframes forgeBlockAppear {
  0% {
    opacity: 0;
    transform: translateX(-20px) translateY(10px);
  }
  60% {
    opacity: 1;
    transform: translateX(3px) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes forgeContentReveal {
  0% {
    opacity: 0.4;
    filter: brightness(0.7);
  }
  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .forge-corner {
    width: 24px;
    height: 24px;
  }
  
  .forge-badge {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
  }
  
  .forge-badge-icon {
    font-size: 14px;
  }
  
  .forge-badge-text {
    font-size: 10px;
    letter-spacing: 1.5px;
  }
}


/* ============================================ */
/* PORTFOLIO-GRADE FORGE CEREMONY POLISH */
/* ============================================ */

/* Forge border wrapper - contains decorations OUTSIDE content */
.forge-border-wrapper {
  position: absolute;
  inset: -3px;
  pointer-events: none;
  z-index: 1;
  border-radius: 14px;
}

/* Corner decorations - NOW on outer border, not overlapping text */
.forge-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.wizard-result--forge:not(.hidden) .forge-corner {
  animation: forgeCornerAppear 0.8s ease-out forwards;
}

.forge-corner::before,
.forge-corner::after {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 1), 
    rgba(34, 211, 238, 0.9)
  );
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.8);
}

.forge-corner::before { width: 3px; height: 100%; }
.forge-corner::after { width: 100%; height: 3px; }

/* Position on OUTER border with perfect radius alignment */
.forge-corner--tl { top: -3px; left: -3px; }
.forge-corner--tl::before { left: 0; top: 0; }
.forge-corner--tl::after { left: 0; top: 0; }

.forge-corner--tr { top: -3px; right: -3px; animation-delay: 0.9s; }
.forge-corner--tr::before { right: 0; top: 0; }
.forge-corner--tr::after { right: 0; top: 0; }

.forge-corner--bl { bottom: -3px; left: -3px; animation-delay: 1s; }
.forge-corner--bl::before { left: 0; bottom: 0; }
.forge-corner--bl::after { left: 0; bottom: 0; }

.forge-corner--br { bottom: -3px; right: -3px; animation-delay: 1.1s; }
.forge-corner--br::before { right: 0; bottom: 0; }
.forge-corner--br::after { right: 0; bottom: 0; }

/* SEALED badge - Premium metal/glass finish */
.forge-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(145deg, 
    rgba(34, 197, 94, 0.25),
    rgba(16, 185, 129, 0.3),
    rgba(34, 211, 238, 0.2)
  );
  border: 2px solid rgba(34, 197, 94, 0.8);
  border-radius: 24px;
  box-shadow: 
    0 0 30px rgba(34, 197, 94, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  z-index: 30;
  transform-origin: top right;
  position: relative;
  overflow: hidden;
}

/* Metal shine effect on badge */
.forge-badge-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent,
    rgba(255, 255, 255, 0.3) 50%,
    transparent
  );
  animation: forgeBadgeShine 3s ease-in-out 3.5s infinite;
}

.forge-badge.visible {
  animation: forgeBadgeAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.5s forwards,
              forgeBadgePulse 3s ease-in-out 3.5s infinite;
}

.forge-badge-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, 1));
  position: relative;
  z-index: 1;
}

.forge-badge-text {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(34, 197, 94, 1);
  text-shadow: 
    0 0 15px rgba(34, 197, 94, 0.8),
    0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 1;
}

/* Section headers with visual hierarchy */
.forge-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  position: relative;
}

.forge-section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(124, 58, 237, 0.8), 
    transparent
  );
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.5);
}

/* Section titles - UPGRADED typography */
.forge-section-title {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 1),
    rgba(34, 211, 238, 0.9)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
  letter-spacing: 0.5px;
  position: relative;
}

.forge-section-title::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    rgba(124, 58, 237, 0.8),
    rgba(34, 211, 238, 0.8)
  );
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.6);
  transition: width 0.6s ease-out;
}

.forge-block.forge-animate .forge-section-title::before {
  width: 100%;
}

/* Hero title - even MORE prominent with GREEN */
.forge-section-title--hero {
  font-size: 22px;
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 1),
    rgba(74, 222, 128, 1),
    rgba(34, 211, 238, 1)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.6));
  animation: forgeHeroTitleGlow 3s ease-in-out infinite;
}

/* Copy buttons - subtle but accessible */
.forge-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 6px;
  color: rgba(200, 200, 220, 0.9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.forge-copy-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.2),
    rgba(34, 211, 238, 0.2)
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.forge-copy-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(124, 58, 237, 0.6);
  color: rgba(255, 255, 255, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.forge-copy-btn:hover::before {
  opacity: 1;
}

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

.forge-copy-btn.copied {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.6);
  color: rgba(34, 197, 94, 1);
}

.forge-copy-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.forge-copy-text {
  position: relative;
  z-index: 1;
}

/* Enhanced code blocks - Editor vibes */
.forge-code-enhanced {
  background: rgba(15, 18, 28, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 8px;
  padding: 20px;
  line-height: 1.7;
  font-size: 13px;
  color: rgba(220, 225, 235, 0.95);
  box-shadow: 
    0 0 20px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  max-height: 400px;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

/* Custom scrollbar */
.forge-code-enhanced::-webkit-scrollbar {
  width: 8px;
}

.forge-code-enhanced::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.forge-code-enhanced::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.forge-code-enhanced::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* Hero CTA button - THE MOST IMPORTANT ELEMENT */
.forge-hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 16px;
}

/* Animated gradient background - GREEN */
.forge-hero-cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.9),
    rgba(16, 185, 129, 1),
    rgba(5, 150, 105, 0.9)
  );
  border-radius: 12px;
  transition: all 0.3s ease;
  z-index: 0;
}

.forge-hero-cta::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.6),
    rgba(16, 185, 129, 0.8),
    rgba(5, 150, 105, 0.6)
  );
  border-radius: 14px;
  filter: blur(12px);
  opacity: 0.8;
  z-index: -1;
  transition: all 0.3s ease;
}

.forge-hero-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.forge-hero-cta-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover state - DRAMATIC GREEN */
.forge-hero-cta:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 20px 40px rgba(34, 197, 94, 0.5),
    0 10px 20px rgba(16, 185, 129, 0.4);
}

.forge-hero-cta:hover .forge-hero-cta-bg {
  background: linear-gradient(135deg, 
    rgba(74, 222, 128, 1),
    rgba(34, 197, 94, 1),
    rgba(16, 185, 129, 1)
  );
}

.forge-hero-cta:hover::before {
  filter: blur(20px);
  opacity: 1;
}

.forge-hero-cta:hover .forge-hero-cta-icon {
  transform: translateX(4px) translateY(-4px);
}

/* Active state */
.forge-hero-cta:active {
  transform: translateY(-2px) scale(1.02);
}

/* Focus state for accessibility */
.forge-hero-cta:focus-visible {
  outline: 3px solid rgba(34, 197, 94, 0.5);
  outline-offset: 4px;
}

/* Hide the external link icon */
.forge-hero-cta-icon {
  display: none;
}

/* Hero section - special styling with GREEN theme */
.wizard-result-section--hero {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.03),
    rgba(16, 185, 129, 0.05),
    rgba(34, 211, 238, 0.03)
  );
  border: 2px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.wizard-result-section--hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, 
    rgba(34, 197, 94, 0.1),
    transparent 60%
  );
  pointer-events: none;
}

.forge-hero-desc {
  color: rgba(200, 210, 230, 0.9);
  font-size: 15px;
  margin: 12px 0;
  position: relative;
  z-index: 1;
}

/* Improved spacing and breathing room */
.wizard-result-section {
  margin-bottom: 32px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  position: relative;
  z-index: 1;
}

/* Refined animations */
@keyframes forgeBadgeShine {
  0%, 100% { left: -100%; }
  50% { left: 200%; }
}

@keyframes forgeHeroTitleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.9));
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .forge-corner { width: 28px; height: 28px; }
  .forge-badge { top: 16px; right: 16px; padding: 8px 16px; }
  .forge-badge-text { font-size: 11px; letter-spacing: 2px; }
  .forge-section-title { font-size: 16px; }
  .forge-section-title--hero { font-size: 19px; }
  .forge-hero-cta { padding: 16px 32px; font-size: 15px; }
  .forge-copy-btn { padding: 5px 10px; font-size: 12px; }
  .forge-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
}


/* ============================================ */
/* LIGHT MODE FIXES - Theme-aware styles */
/* ============================================ */

[data-theme="light"] {
  /* Fix code block backgrounds */
}

[data-theme="light"] .forge-code-enhanced,
[data-theme="light"] .wizard-code {
  background: rgba(248, 250, 252, 0.9) !important;
  color: rgba(15, 23, 42, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  box-shadow: 
    0 0 20px rgba(124, 58, 237, 0.05),
    inset 0 1px 0 rgba(0, 0, 0, 0.03) !important;
}

/* Fix scrollbar for light mode */
[data-theme="light"] .forge-code-enhanced::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.5) !important;
}

[data-theme="light"] .forge-code-enhanced::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4) !important;
}

[data-theme="light"] .forge-code-enhanced::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.5) !important;
}

/* Fix section backgrounds */
[data-theme="light"] .wizard-result-section {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Fix wizard panels */
[data-theme="light"] .wizard-panel {
  background: var(--card) !important;
}

/* Fix various dark backgrounds */
[data-theme="light"] .wizard-question-option,
[data-theme="light"] .wizard-snapshot-tooltip,
[data-theme="light"] .wizard-status {
  background: rgba(248, 250, 252, 0.9) !important;
  color: var(--text) !important;
}

/* Fix loading overlay */
[data-theme="light"] .wizard-loading-overlay {
  background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .wizard-loading-text {
  color: rgba(15, 23, 42, 0.9) !important;
}

/* Fix copy button */
[data-theme="light"] .forge-copy-btn {
  background: rgba(124, 58, 237, 0.08) !important;
  border-color: rgba(124, 58, 237, 0.2) !important;
  color: rgba(30, 41, 59, 0.9) !important;
}

[data-theme="light"] .forge-copy-btn:hover {
  background: rgba(124, 58, 237, 0.15) !important;
  color: rgba(15, 23, 42, 1) !important;
}

/* Fix section titles */
[data-theme="light"] .forge-section-title {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 1),
    rgba(124, 58, 237, 0.8)
  ) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Fix hero section */
[data-theme="light"] .wizard-result-section--hero {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.05),
    rgba(16, 185, 129, 0.08),
    rgba(34, 211, 238, 0.05)
  ) !important;
  border-color: rgba(34, 197, 94, 0.25) !important;
}

/* Fix hero description text */
[data-theme="light"] .forge-hero-desc {
  color: rgba(51, 65, 85, 0.9) !important;
}

/* Fix border decorations for visibility in light mode */
[data-theme="light"] .forge-corner::before,
[data-theme="light"] .forge-corner::after {
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.8), 
    rgba(34, 211, 238, 0.7)
  ) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.4) !important;
}

/* Fix section header borders */
[data-theme="light"] .forge-section-header {
  border-bottom-color: rgba(148, 163, 184, 0.2) !important;
}

/* Fix result container border */
[data-theme="light"] .wizard-result--forge:not(.hidden)::before {
  background: 
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, 
      rgba(124, 58, 237, 0.3), 
      rgba(34, 211, 238, 0.3),
      rgba(251, 191, 36, 0.3)
    ) border-box !important;
}

/* Fix various text colors */
[data-theme="light"] .wizard-panel-desc,
[data-theme="light"] .wizard-label,
[data-theme="light"] .wizard-inline-hint,
[data-theme="light"] .wizard-question-type {
  color: var(--muted, rgba(51, 65, 85, 0.85)) !important;
}

[data-theme="light"] .wizard-question-text {
  color: var(--text, rgba(15, 23, 42, 0.95)) !important;
}

/* Fix question content backgrounds */
[data-theme="light"] .wizard-question {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Fix input fields */
[data-theme="light"] .wizard-question textarea,
[data-theme="light"] .wizard-question input {
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* Fix progress indicator */
[data-theme="light"] .wizard-progress-bar {
  background: linear-gradient(90deg, 
    rgba(124, 58, 237, 0.8), 
    rgba(34, 211, 238, 0.8)
  ) !important;
}

/* Fix status messages */
[data-theme="light"] .wizard-status-text {
  color: var(--text) !important;
}

/* Fix empty states */
[data-theme="light"] .wizard-empty {
  color: var(--muted) !important;
}

/* Fix mode cards */
[data-theme="light"] .wizard-mode-option {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .wizard-mode-option:hover {
  background: rgba(255, 255, 255, 1) !important;
  border-color: rgba(124, 58, 237, 0.4) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

/* Fix answer badges */
[data-theme="light"] .wizard-answer-badge {
  background: rgba(34, 197, 94, 0.15) !important;
  color: rgba(5, 150, 105, 1) !important;
}

/* Fix wizard-pill options in light mode - CRITICAL FIX */
[data-theme="light"] .wizard-pill {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.5) !important;
  color: rgba(15, 23, 42, 0.9) !important;
}

[data-theme="light"] .wizard-pill:hover {
  background: rgba(124, 58, 237, 0.08) !important;
  border-color: rgba(124, 58, 237, 0.6) !important;
  color: rgba(15, 23, 42, 1) !important;
}

[data-theme="light"] .wizard-pill::before {
  border-color: rgba(100, 116, 139, 0.5) !important;
  background: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .wizard-pill:hover::before {
  border-color: rgba(124, 58, 237, 0.7) !important;
  background: rgba(124, 58, 237, 0.15) !important;
}

[data-theme="light"] .wizard-pill.is-selected {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%) !important;
  border-color: rgba(124, 58, 237, 0.9) !important;
  color: #ffffff !important;
}

[data-theme="light"] .wizard-pill.is-selected::before {
  border-color: rgba(255, 255, 255, 0.9) !important;
  background: #ffffff !important;
}

[data-theme="light"] .wizard-pill.is-selected::after {
  color: #7C3AED !important;
}

/* Fix hero title glow in light mode */
[data-theme="light"] .forge-section-title--hero {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.9),
    rgba(16, 185, 129, 1),
    rgba(34, 211, 238, 0.8)
  ) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.3)) !important;
}


/* === Fixes for Light Mode Visual Hierarchy & Contrast === */

/* User Guidance (Tips) Styling - Replaces inline styles */
.wizard-user-guidance {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 8px;
  border-left: 3px solid #7C3AED;
}

.wizard-user-guidance p {
  margin: 0 0 0.5rem 0;
  font-weight: 600;
  color: var(--text-high, #E7EAF0);
}

.wizard-user-guidance ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-med, #A0A8B5);
  font-size: 0.9rem;
  line-height: 1.6;
}

html[data-theme="light"] .wizard-user-guidance {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

html[data-theme="light"] .wizard-user-guidance p {
  color: var(--primary-hover);
}

html[data-theme="light"] .wizard-user-guidance ul {
  color: var(--text-secondary);
}

html[data-theme="light"] .wizard-user-guidance ul li strong {
  color: var(--primary-active);
}

/* Empty State Styling - Enhanced for Light Mode */
html[data-theme="light"] .wizard-empty {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  padding: 2rem;
  border-radius: 0.75rem;
  color: var(--text-secondary); /* Darker than muted */
  font-weight: 500;
  text-align: center;
  margin-top: 1.5rem;
}

html[data-theme="light"] .wizard-panel-desc {
  color: var(--text-secondary);
  opacity: 1;
  font-weight: 400;
}

html[data-theme="light"] .wizard-inline-hint {
  color: var(--muted);
  opacity: 1;
  font-weight: 500;
}

/* Ensure step description is visible */
html[data-theme="light"] .wizard-stepper-label {
  color: var(--muted);
  font-weight: 500;
}

html[data-theme="light"] .wizard-stepper-step--active .wizard-stepper-label {
  color: var(--primary);
  font-weight: 700;
}

/* Timing Info Styling - Replaces inline styles */
.wizard-timing-info {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 8px;
  border-left: 3px solid #06B6D4;
  display: none; /* Controlled by JS */
}

.wizard-timing-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-med, #A0A8B5);
}

html[data-theme="light"] .wizard-timing-info {
  background: #ecfeff; /* Cyan-50 */
  border: 1px solid #cffafe;
  border-left: 3px solid var(--accent);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

html[data-theme="light"] .wizard-timing-info p {
  color: var(--text-secondary);
}

/* --- Light Mode Fixes for Thinking Modes & Header --- */

/* Fix Thinking Mode Text Contrast */
html[data-theme="light"] .wizard-mode-option-header {
  color: var(--text-secondary); /* Darker text for title */
}

html[data-theme="light"] .wizard-mode-desc {
  color: var(--muted); /* Readable grey for description */
}

html[data-theme="light"] .wizard-mode-tier {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.2);
}

/* Fix Wizard Header Text Contrast */
html[data-theme="light"] .wizard-title {
  color: var(--text);
}

html[data-theme="light"] .wizard-subtitle {
  color: var(--text-secondary);
  opacity: 1; /* Ensure full visibility */
}

html[data-theme="light"] .wizard-header-meta {
  color: var(--muted);
  opacity: 1;
}

html[data-theme="light"] .wizard-tag {
  border-color: var(--border);
  color: var(--text-secondary);
}

/* ==========================================================================
   WIZARD LIGHT MODE REDESIGN (Directionality & Contrast)
   ========================================================================== */

html[data-theme="light"] .wizard-stepper {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

/* Stepper: Clearer progress indication */
html[data-theme="light"] .wizard-stepper-circle {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
  font-weight: 700;
}

html[data-theme="light"] .wizard-stepper-step--active .wizard-stepper-circle {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15); /* Ring effect */
}

html[data-theme="light"] .wizard-stepper-step--active .wizard-stepper-label {
  color: #0f172a; /* Slate-900 */
  font-weight: 700;
}

html[data-theme="light"] .wizard-stepper-step--completed .wizard-stepper-circle {
  background: #dcfce7; /* Green-100 */
  border-color: #16a34a; /* Green-600 */
  color: #15803d; /* Green-700 */
}

/* Mode Options: Directional Selection */
html[data-theme="light"] .wizard-mode-option {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .wizard-mode-option:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
}

html[data-theme="light"] .wizard-mode-option.is-selected {
  background: #ffffff;
  border-color: var(--primary); /* Primary border color */
  border-left-width: 5px; /* Directional Indicator */
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.15);
  padding-left: calc(0.9rem - 4px); /* Adjust padding to prevent layout shift */
}

html[data-theme="light"] .wizard-mode-label {
  color: #0f172a;
}

html[data-theme="light"] .wizard-mode-desc {
  color: #475569;
}

/* Inputs: Focus Directionality */
html[data-theme="light"] .wizard-label textarea:focus,
html[data-theme="light"] .wizard-label select:focus {
  border-color: var(--primary);
  border-left-width: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Question Cards: Clearer Hierarchy */
html[data-theme="light"] .wizard-question-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

html[data-theme="light"] .wizard-question-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* Answer Area */
html[data-theme="light"] .wizard-answer-area {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* Pills: Crisp Selection */
html[data-theme="light"] .wizard-pill {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

html[data-theme="light"] .wizard-pill:hover {
  border-color: var(--primary);
  background: #f5f3ff; /* Violet-50 */
}

html[data-theme="light"] .wizard-pill.is-selected {
  background: #eff6ff; /* Blue-50 (or slight Violet tint) */
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.1);
}

html[data-theme="light"] .wizard-pill.is-selected::before {
  border-color: var(--primary);
  background: var(--primary);
}

html[data-theme="light"] .wizard-pill.is-selected::after {
  color: #ffffff;
}

/* Panels: Clean Separation */
html[data-theme="light"] .wizard-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .wizard-panel--qa {
  border-top: 4px solid var(--primary); /* Retain top accent for main QA panel */
}

