:root {
  --bg: #0f1020;
  --card: #1b1d3a;
  --text: #ffffff;
  --muted: #cfd2ff;
  --primary: #6c63ff;
  --secondary: #ff6584;
  --bar: #14162e;
}

body.light {
  --bg: #f4f6ff;
  --card: #ffffff;
  --text: #0f1020;
  --muted: #555;
  --bar: #ffffff;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  transition: background 0.6s ease, color 0.6s ease;
}

/* TOP BAR */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: background 0.6s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #fff;
}

.brand span {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05rem;
}

.theme-toggle {
  border: none;
  background: var(--card);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.6s ease;
}

.theme-toggle:hover {
  transform: scale(1.08);
}

/* APP */
.app {
  max-width: 900px;
  margin: auto;
  padding: 2.5rem 1rem 1.5rem;
  text-align: center;
}

/* HEADER */
h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}
.subtitle {
  color: var(--muted);
  margin: 0.6rem 0 2.3rem;
}

/* FLOW */
.flow-card {
  background: var(--card);
  padding: 2rem;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  display: none;
  animation: fadeUp 0.8s cubic-bezier(.4, 0, .2, 1);
}

.flow-card.active {
  display: block;
}

.flow-card h2 {
  margin-bottom: 0.6rem;
}

.flow-card p {
  color: var(--muted);
  line-height: 1.7;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.controls button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 18px rgba(108, 99, 255, 0.6);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bbb;
  transition: background 0.3s ease;
}

.dots span.active {
  background: var(--secondary);
}

/* ACTIONS */
.actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

/* BUTTONS */
.btn {
  padding: 0.85rem 2.4rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(255, 101, 132, 0.45);
}

.secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

/* TEMP CHAT */
.temp-chat {
  width: 100%;
  max-width: 340px;
  padding: 1.1rem 2rem;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(108, 99, 255, 0.25),
    rgba(255, 101, 132, 0.25)
  );
  border: 1px solid rgba(108, 99, 255, 0.5);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: pulse 4s ease-in-out infinite;
}

footer {
  margin-top: 3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .flow-card {
    padding: 1.5rem;
  }

  .btn,
  .secondary,
  .temp-chat {
    width: 100%;
  }

  .brand span {
    display: none;
  }
}

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

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.25);
  }
  50% {
    box-shadow: 0 18px 45px rgba(255, 101, 132, 0.35);
  }
}

/* Chatbot launch button */
.chatbot-launch {
  width: 100%;
  max-width: 340px;
  padding: 1.1rem 2rem;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(108, 99, 255, 0.28),
    rgba(255, 101, 132, 0.28)
  );
  border: 1px solid rgba(108, 99, 255, 0.55);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: block;
}

.chatbot-launch:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 48px rgba(108, 99, 255, 0.45);
}

.chatbot-launch span {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}
