/* =========================
   ROOT VARIABLES
========================= */
:root {
  --primary: #3bbfad;
  --primary-soft: #e6f6f3;
  --text-main: #1f2937;
  --text-soft: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
}

/* =========================
   CONTAINER
========================= */
#youmind-form {
  max-width: 520px;
  margin: 40px auto;
  padding: 32px;
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
}

/* =========================
   HEADINGS
========================= */
#youmind-form h3 {
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 600;
}

#youmind-form p {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* =========================
   INPUTS
========================= */
#youmind-form input[type="email"],
#youmind-form input[type="file"] {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  margin-bottom: 18px;
  transition: border 0.2s, box-shadow 0.2s;
}

#youmind-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,191,173,0.15);
}

/* =========================
   BUTTONS
========================= */
#youmind-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: white;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}

#youmind-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59,191,173,0.35);
}

#youmind-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary button (record / stop) */
#youmind-form button#record {
  /* background: #ef4444; */
}

#youmind-form button#stop {
  background: #111827;
}

/* =========================
   STATUS TEXT
========================= */
#youmind-status,
#status {
  font-size: 14px;
  color: var(--text-soft);
  margin-top: 10px;
}

/* =========================
   AUDIO PLAYER
========================= */
#youmind-form audio {
  width: 100%;
  margin-top: 16px;
  border-radius: 10px;
}

/* =========================
   PROGRESS BAR - NEW DESIGN
========================= */
.youmind-progress-bar {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  position: relative;
}

.youmind-progress-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 2px;
  width: 100%;
  background-color: var(--border);
  z-index: 1;
}

.youmind-progress-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 2px;
  width: 0;
  background-color: var(--primary);
  z-index: 2;
  transition: width 0.4s ease;
}

.youmind-progress-step {
  position: relative;
  z-index: 3;
  text-align: center;
}

.youmind-progress-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--primary-soft);
  color: var(--text-soft);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.youmind-progress-step-label {
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-soft);
  width: 100px;
}

/* Active State */
.youmind-progress-step.active .youmind-progress-step-number {
  background-color: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

.youmind-progress-step.active .youmind-progress-step-label {
  font-weight: 600;
  color: var(--text-main);
}

/* Completed State */
.youmind-progress-step.completed .youmind-progress-step-number {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* =========================
   INPUT CHOICES
========================= */
.youmind-input-choices {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

#youmind-form .youmind-input-choices button {
  flex: 1;
  background-color: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#youmind-form .youmind-input-choices button:hover {
  background-color: #d8f1ec;
  box-shadow: none;
  transform: none;
}

#youmind-form .youmind-input-choices button.active {
  background-color: var(--primary);
  color: #fff;
}

#youmind-form #record.recording {
    background-color: #ef4444; /* Red for recording */
    color: #fff;
    animation: youmind-pulse 1.5s infinite;
}

@keyframes youmind-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

.youmind-input-area {
  padding: 20px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}

#youmind-form #audio-player-container {
    margin-top: 15px;
}

/* =========================
   UPLOAD PROGRESS BAR
========================= */
.youmind-upload-progress {
  width: 100%;
  height: 4px;
  background-color: var(--primary-soft);
  border-radius: 4px;
  margin-top: 15px;
  display: none; /* Hidden by default */
}

.youmind-upload-progress-bar {
  width: 0;
  height: 100%;
  background-color: var(--primary);
  border-radius: 4px;
  transition: width 0.2s ease-out;
}

/* =========================
   BUTTON SPINNER
========================= */
.youmind-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: youmind-spin 1s linear infinite;
}

@keyframes youmind-spin {
  to {
    transform: rotate(360deg);
  }
}

#youmind-form button:disabled {
  opacity: 0.8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* =========================
   THANK YOU SCREEN
========================= */
#youmind-form h2 {
  text-align: center;
  font-size: 26px;
  margin-bottom: 12px;
}

#youmind-form h2::after {
  content: "🌿";
  display: block;
  font-size: 32px;
  margin-top: 8px;
}

#youmind-form p.final {
  text-align: center;
  font-size: 15px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 600px) {
  #youmind-form {
    padding: 24px;
    margin: 20px;
  }

  #youmind-form h3 {
    font-size: 20px;
  }
}
