/* ----------------------------------------
   Global Layout
----------------------------------------- */

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, Arial, sans-serif;
  background: #f7f7f9;
  color: #111;
  margin: 0;
  padding: 0;
}

.page-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 20px;
}


/* ----------------------------------------
   Branding / Header
----------------------------------------- */

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.brand-icon {
  background: #111;
  color: #fff;
  font-weight: 700;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.title {
  font-size: 26px;
  margin: 8px 0 4px;
  font-weight: 700;
}

.subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: #555;
}


/* ----------------------------------------
   Tool Card
----------------------------------------- */

.tool-card {
  background: #fff;
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 32px;
}

#inputMessage {
  margin-bottom: 20px; /* NEW spacing for better flow */
  width: 100%;
  height: 200px;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  font-size: 15px;
  font-family: inherit;
  box-sizing: border-box !important; /* <-- forced fix */
}

/* Subtle focus styling for textarea */
#inputMessage:focus {
  outline: none;
  border-color: #703fe0;
  box-shadow: 0 0 0 2px rgba(112, 63, 224, 0.12);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.controls {
  margin-top: 24px; /* increased from 20px for smoother vertical rhythm */
}


/* ----------------------------------------
   Tone & Persona Rows
----------------------------------------- */

.control-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.tone-row,
.persona-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tone-btn,
.persona-btn {
  border: 1px solid #ccc;
  background: #fafafa;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: 0.15s;
}

.tone-btn:hover,
.persona-btn:hover {
  background-color: #f2efff;       /* soft purple tint */
  border-color: #703fe0;
  color: #333;
  transform: translateY(-1px);     /* NEW: subtle lift */
  box-shadow: 0 2px 6px rgba(0,0,0,0.06); /* NEW: gentle shadow */
}

.tone-btn.active,
.persona-btn.active {
  background: #703fe0;             /* brand purple */
  border-color: #703fe0;
  color: #fff;
}


/* ----------------------------------------
   Unfiltered Toggle + Tooltip
----------------------------------------- */

.unf-row {
  margin-bottom: 18px;
}

.unf-label {
  font-size: 14px;
  cursor: pointer;
}

.tooltip-icon {
  font-size: 13px;
  cursor: help;
  color: #703fe0;                  /* subtle brand accent */
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  margin-right: 8px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 30px;
  transition: 0.25s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.25s;
}

/* Checked State */
.switch input:checked + .slider {
  background-color: #703fe0; /* brand purple */
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}


/* ----------------------------------------
   Primary Button
----------------------------------------- */

.primary-btn {
  width: 240px;                   /* button-like width */
  background: #703fe0;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s ease, box-shadow 0.15s ease, transform 0.1s ease;
  margin: 28px auto 0;            /* slightly more breathing room */
  display: block;                 /* ensures centering works */
}

.primary-btn:hover {
  background: #5e33c0; /* slightly darker purple */
  box-shadow: 0 4px 12px rgba(112, 63, 224, 0.28);
  transform: translateY(-1px);
}

/* ----------------------------------------
   Output Section
----------------------------------------- */

.output-section {
  display: none; /* hide on first page load */
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 24px;        /* increased from 18px */
  border-radius: 8px;
  min-height: 60px;
  margin-top: 24px;
  white-space: pre-wrap;
  overflow-y: auto;
  max-height: 380px;
}

/* Prevent sideways scroll bug */
.output-section pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 18px;      /* extra breathing room */
  line-height: 1.45;
}


/* ----------------------------------------
   Loader Dots
----------------------------------------- */

.loader-dots::after {
  content: "...";
  animation: dots 1.4s steps(4, end) infinite;
  font-weight: 400;
  opacity: 0.6;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}


/* ----------------------------------------
   Info Sections / SEO Blocks
----------------------------------------- */

.info-section {
  margin-top: 50px;
}

.info-section h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.info-section p {
  color: #444;
  line-height: 1.55;
  margin-bottom: 18px;
}


/* Feature Boxes */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.feature-card {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.feature-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
}


/* ----------------------------------------
   How It Works – Step Cards
----------------------------------------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.step-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.step-num {
  display: inline-block;
  background: #703fe0;             /* brand purple */
  color: #fff;
  padding: 6px 10px;
  border-radius: 50%;
  font-weight: 600;
  margin-bottom: 8px;
}


/* ----------------------------------------
   FAQ
----------------------------------------- */

.faq-section .faq-item {
  margin-bottom: 22px;
}

.faq-section h4 {
  margin-bottom: 6px;
}

.faq-section p {
  margin: 0;
  color: #444;
}


/* ----------------------------------------
   Footer
----------------------------------------- */

.footer {
  margin-top: 60px;
  text-align: center;
  font-size: 13px;
  color: #666;
}

.footer-links a {
  color: #703fe0;                  /* brand purple links */
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}


/* --------------------------------------------------
   HERO HEADER — Center aligned branding (Purple Brand)
-------------------------------------------------- */

.hero-header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.logo-badge {
  background: #703fe0;             /* brand purple */
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  display: inline-block;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 4px;
  color: #111;
}

.hero-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* Fade-in animation for output text */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.18s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fade-in animation for output text */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.18s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* --------------------------------------------------
   ACTIVE BUTTON STYLES — BRAND PURPLE (override)
-------------------------------------------------- */

.tone-btn.active,
.persona-btn.active {
  background-color: #703fe0;       /* brand purple */
  color: #ffffff !important;
  border-color: #703fe0;
}

/* When active, keep solid purple on hover */
.tone-btn.active:hover,
.persona-btn.active:hover {
  background-color: #703fe0;
  color: #fff;
}
