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

:root {
  --bg: #070b14;
  --card: #101725;
  --card2: #151e2e;
  --border: #263249;
  --text: #f5f7fb;
  --muted: #8d99ad;
  --primary: #6c63ff;
  --primary2: #8b5cf6;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(108, 99, 255, 0.18), transparent 35%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* =========================
   HEADER
========================= */

.topbar {
  width: 100%;
  padding: 18px 6%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  font-size: 20px;
  box-shadow: 0 8px 30px rgba(108,99,255,0.3);
}

.brand h1 {
  font-size: 18px;
  font-weight: 800;
}

.brand p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.status {
  border: 1px solid rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.08);
  color: #86efac;
  padding: 8px 12px;
  border-radius: 30px;
  font-size: 11px;
  white-space: nowrap;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  margin-right: 5px;
  box-shadow: 0 0 10px rgba(34,197,94,0.8);
}

/* =========================
   MAIN
========================= */

.container {
  width: min(1100px, 92%);
  margin: auto;
  padding: 35px 0 60px;
}

/* =========================
   HERO
========================= */

.hero {
  padding: 45px 30px;
  border: 1px solid var(--border);
  border-radius: 24px;
  margin-bottom: 25px;
  background:
    linear-gradient(
      135deg,
      rgba(108,99,255,0.15),
      rgba(139,92,246,0.04)
    );
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  top: -80px;
  background: rgba(108,99,255,0.15);
  filter: blur(50px);
  border-radius: 50%;
}

.badge {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 30px;
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.25);
  color: #b8b3ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero h2 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
  max-width: 750px;
  margin: 18px 0 14px;
}

.hero p {
  color: var(--muted);
  max-width: 700px;
  font-size: 15px;
}

/* =========================
   CARD
========================= */

.card {
  background: rgba(16,23,37,0.88);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.18);
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.section-title h2 {
  font-size: 20px;
}

.section-title p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.step {
  font-size: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(108,99,255,0.1);
  color: #b8b3ff;
  border: 1px solid rgba(108,99,255,0.2);
}

/* =========================
   FORM
========================= */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0b111d;
  color: white;
  outline: none;
  font-size: 14px;
  transition: 0.25s;
}

.input-group input::placeholder {
  color: #5f6b7e;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}

/* =========================
   BUTTON
========================= */

.generate-btn {
  width: 100%;
  border: 0;
  margin-top: 25px;
  padding: 16px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(
    135deg,
    var(--primary),
    var(--primary2)
  );
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 35px rgba(108,99,255,0.25);
  transition: 0.25s;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(108,99,255,0.35);
}

.generate-btn:active {
  transform: scale(0.98);
}

/* =========================
   PIPELINE
========================= */

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: #0c1320;
  border: 1px solid var(--border);
  border-radius: 15px;
  transition: 0.3s;
}

.agent:hover {
  border-color: #3b4860;
  transform: translateX(2px);
}

.agent-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #151e2e;
  font-size: 20px;
  flex-shrink: 0;
}

.agent-info {
  flex: 1;
}

.agent-info h3 {
  font-size: 14px;
}

.agent-info p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.agent-status {
  font-size: 10px;
  padding: 6px 9px;
  border-radius: 20px;
  background: #151e2e;
  color: var(--muted);
  white-space: nowrap;
}

/* RUNNING */

.agent.running {
  border-color: rgba(108,99,255,0.5);
  background: rgba(108,99,255,0.07);
}

.agent.running .agent-status {
  color: #c4b5fd;
  background: rgba(108,99,255,0.15);
}

.agent.running .agent-icon {
  animation: pulse 1.3s infinite;
}

/* COMPLETED */

.agent.completed {
  border-color: rgba(34,197,94,0.35);
}

.agent.completed .agent-status {
  color: #86efac;
  background: rgba(34,197,94,0.1);
}

.agent.completed .agent-icon {
  background: rgba(34,197,94,0.1);
}

/* ERROR */

.agent.error {
  border-color: rgba(239,68,68,0.4);
}

.agent.error .agent-status {
  color: #fca5a5;
  background: rgba(239,68,68,0.1);
}

/* =========================
   PROGRESS
========================= */

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.progress-header h2 {
  font-size: 18px;
}

.progress-header p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

#progressPercent {
  font-size: 22px;
  color: #b8b3ff;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: #0a101b;
  border-radius: 20px;
  overflow: hidden;
}

#progressFill {
  width: 0%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary2)
  );
  transition: width 0.5s ease;
}

/* =========================
   RESULT
========================= */

.result-card {
  border-color: rgba(34,197,94,0.3);
}

.complete-badge {
  padding: 7px 10px;
  border-radius: 20px;
  background: rgba(34,197,94,0.1);
  color: #86efac;
  font-size: 10px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-grid div {
  padding: 15px;
  background: #0c1320;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}

.result-grid strong {
  font-size: 13px;
}

.export-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 12px;
  background: rgba(34,197,94,0.08);
  color: #86efac;
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none;
}

/* =========================
   FOOTER
========================= */

footer {
  text-align: center;
  padding: 25px 15px 40px;
  color: #596579;
  font-size: 10px;
}

footer p + p {
  margin-top: 5px;
}

/* =========================
   ANIMATION
========================= */

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(108,99,255,0.5);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(108,99,255,0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(108,99,255,0);
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

  .topbar {
    padding: 14px 4%;
  }

  .brand h1 {
    font-size: 15px;
  }

  .brand p {
    font-size: 9px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
  }

  .status {
    font-size: 9px;
    padding: 7px 9px;
  }

  .container {
    width: 94%;
    padding-top: 20px;
  }

  .hero {
    padding: 30px 20px;
    border-radius: 18px;
  }

  .hero h2 {
    font-size: 29px;
  }

  .hero p {
    font-size: 13px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .section-title {
    margin-bottom: 20px;
  }

  .section-title h2 {
    font-size: 17px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .agent {
    padding: 12px;
    gap: 10px;
  }

  .agent-icon {
    width: 38px;
    height: 38px;
    font-size: 17px;
  }

  .agent-info h3 {
    font-size: 12px;
  }

  .agent-info p {
    font-size: 9px;
  }

  .agent-status {
    font-size: 8px;
    padding: 5px 7px;
  }

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

/* SMALL PHONES */

@media (max-width: 380px) {

  .brand p {
    display: none;
  }

  .status {
    display: none;
  }

  .hero h2 {
    font-size: 25px;
  }

  .agent-info p {
    display: none;
  }

  .agent-status {
    font-size: 7px;
  }
}