/* ============== Google Fonts ============== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* ============== General / Body ============== */
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: "Poppins", sans-serif;
}

.woop-body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #1f2937;
}

/* ============== Main Container ============== */
.main-container {
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(0deg, rgba(34,193,195,1) 0%, rgba(253,187,45,1) 100%);
}

.step-content {
  width: 100%;
  padding: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============== Question Sections ============== */
.question-section {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 800px;
}

#step-7.question-section {
  max-width: none;
}

#step-9.question-section {
  max-width: none;
}

.question-section.active {
  display: flex;
}

.question-container {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
}

.question-box {
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  max-height: 100%;
  overflow-y: auto;
}

/* ============== Typography ============== */
.question-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #1f2937;
}

.question-example {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  font-style: italic;
  color: #4b5563;
}

/* ============== Form Fields ============== */
.form-field-container {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

/* ============== Inputs ============== */
.answer-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  padding: 1rem;
  font-size: 1.125rem;
  margin-bottom: 1rem;
  resize: vertical;
}

.answer-input:focus {
  outline: none;
  border-color: #ee092d;
  box-shadow: 0 0 0 2px rgba(238, 9, 45, 0.25);
}

.answer-input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* ============== Buttons ============== */
.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prev-button {
  color: #3b82f6;
  font-size: 1.125rem;
  background: none;
  border: none;
  cursor: pointer;
}

.next-button,
.generate-button,
.confirm-button,
.regenerate-button,
.approve-button {
  background-color: #ee092d;
  color: #ffffff;
  font-weight: bold;
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.next-button:hover,
.generate-button:hover,
.confirm-button:hover,
.regenerate-button:hover,
.approve-button:hover {
  background-color: #ff1a3e;
}

.get-started-button {
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  background-color: #ee092d;
  color: #ffffff;
  font-weight: bold;
  padding: 1rem;
  border-radius: 9999px;
  font-size: 1.25rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.get-started-button:hover {
  background-color: #ff1a3e;
}

/* ============== Welcome Screen ============== */
.welcome-container {
  text-align: center;
}

.welcome-title {
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.welcome-text {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  color: #4b5563;
}

/* ============== Review and Summary Sections ============== */
.review-item {
  margin-bottom: 1rem;
  text-align: left;
}

.review-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.review-text,
.summary-text {
  font-size: 1.125rem;
  color: #4b5563;
}

.summary-container {
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

#generated-summary > * {
  margin-bottom: 1rem;
}

#brainstorm-content {
  text-align: left;
}

#brainstorm-content > * {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.creative-elements-container {
  text-align: left;
}

.creative-elements-container > * {
  margin-bottom: 1rem;
  font-size: 18px;
}

#brainstorm-content li,
.creative-elements-container li {
  display: flex;
  align-items: center;
  font-size: 18px;
  color: #51180F;
  font-family: 'Poppins';
  padding: 16px 20px;
  margin: 10px 0;
  border: 2px solid #51180F;
  border-radius: 10px;
  background-color: #f4f4f42e;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

#brainstorm-content li:hover,
.creative-elements-container li:hover {
  background-color: #51180f31;
}

#brainstorm-content input[type="checkbox"].brainstorm-checkbox,
.creative-elements-container input[type="checkbox"].creative-elements-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-right: 16px;
  border: 2px solid #51180F;
  border-radius: 10%;
  outline: none;
  cursor: pointer;
  display: block;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
}

#brainstorm-content input[type="checkbox"].brainstorm-checkbox:checked,
.creative-elements-container input[type="checkbox"].creative-elements-checkbox:checked {
  background-color: #EE092D;
  border-color: #51180F;
}

#brainstorm-content input[type="checkbox"].brainstorm-checkbox::after,
.creative-elements-container input[type="checkbox"].creative-elements-checkbox::after {
  content: '✓';
  color: white;
  font-size: 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

#brainstorm-content input[type="checkbox"].brainstorm-checkbox:checked::after,
.creative-elements-container input[type="checkbox"].creative-elements-checkbox:checked::after {
  display: block;
}

#brainstorm-content li strong,
.creative-elements-container li strong {
  font-weight: bold;
  margin-left: 8px;
}

/* ============== Dark Mode Styles ============== */
.dark .form-label {
  color: #f3f4f6;
}

.dark #brainstorm-content ol,
.dark .creative-elements-container ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dark #brainstorm-content li,
.dark .creative-elements-container li {
  display: flex;
  align-items: center;
  font-size: 18px;
  color: #F5EDEB;
  font-family: 'Poppins';
  padding: 16px 20px;
  margin: 10px 0;
  border: 2px solid #F5EDEB;
  border-radius: 10px;
  background-color: #333333;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark #brainstorm-content li:hover,
.dark .creative-elements-container li:hover {
  background-color: #51180f80;
}

.dark #brainstorm-content input[type="checkbox"].brainstorm-checkbox,
.dark .creative-elements-container input[type="checkbox"].creative-elements-checkbox {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-right: 16px;
  border: 2px solid #F5EDEB;
  border-radius: 10%;
  outline: none;
  cursor: pointer;
  display: block;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.dark #brainstorm-content input[type="checkbox"].brainstorm-checkbox:checked,
.dark .creative-elements-container input[type="checkbox"].creative-elements-checkbox:checked {
  background-color: #EE092D;
  border-color: #F5EDEB;
}

.dark #brainstorm-content input[type="checkbox"].brainstorm-checkbox::after,
.dark .creative-elements-container input[type="checkbox"].creative-elements-checkbox::after {
  content: '✓';
  color: white;
  font-size: 16px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
}

.dark #brainstorm-content input[type="checkbox"].brainstorm-checkbox:checked::after,
.dark .creative-elements-container input[type="checkbox"].creative-elements-checkbox:checked::after {
  display: block;
}

.dark #brainstorm-content li strong,
.dark .creative-elements-container li strong {
  font-weight: bold;
  margin-left: 8px;
}

#woop-flow-ai-text {
  text-align: left;
}

#woop-flow-ai-text > * {
  margin-bottom: 1rem;
}

#woop-outline {
  text-align: left;
}

/* ============== Action Buttons ============== */
.action-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ============== Error Message ============== */
.error-message {
  color: #ef4444;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* ============== Theme Toggle ============== */
.theme-toggle-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.theme-toggle-button {
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* ============== Animations ============== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

/* ============== Dark Mode Body ============== */
body.dark {
  background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
  color: #ffffff;
}

body.dark .main-container {
  background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(41, 85, 142, 1) 54%, rgba(2, 230, 237, 1) 100%);
}

body.dark .question-box {
  background-color: rgba(34, 34, 34, 0.7);
}

body.dark .question-title,
body.dark .welcome-title {
  color: #ffffff;
}

body.dark .question-example,
body.dark .welcome-text,
body.dark .review-subtitle,
body.dark .review-text,
body.dark .summary-text,
body.dark .question-description,
body.dark .screen-description {
  color: #e0e0e0;
}

body.dark .answer-input,
body.dark .summary-container,
body.dark .creative-elements-container,
body.dark .ai-generated-text,
body.dark .outline-container,
body.dark .json-container,
body.dark .screens-container {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: #444444;
}

body.dark .theme-toggle-button {
  color: #d1d5db;
}

body.dark .answer-input::placeholder {
  color: #9ca3af;
}

/* ============== Wide Container for Later Screens ============== */
.wide-container {
  max-width: 1000px;
}

#step-7 .wide-container {
  max-width: 80vw;
}

#step-9 .wide-container {
  max-width: 80vw;
}

/* ============== Outline Container ============== */
.outline-container {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.outline-container table {
  border-collapse: collapse;
  width: 100%;
}

.outline-container table td,
.outline-container table th {
  border: 1px solid #e0e0e0;
  padding: 8px;
  text-align: left;
}

.outline-container table th {
  background-color: #f9f9f9;
}

.outline-container table tr:nth-child(even) {
  background-color: #f6f6f6;
}

/* ============== AI Generated Text ============== */
.ai-generated-text {
  font-size: 1.2rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: left;
}

/* ============== Feedback Input ============== */
.feedback-input {
  height: 100px;
  resize: vertical;
}

/* ============== JSON Container ============== */
.json-container {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
  font-family: monospace;
  white-space: pre-wrap;
}

/* ============== Screens Container ============== */
.screens-container {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}

.screen-description {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #4b5563;
}

/* ============== Layout Adjustments for Later Screens ============== */
.wide-container .question-box,
#step-3 .question-box,
#step-4 .question-box,
#step-5 .question-box,
#step-6 .question-box,
#step-7 .question-box,
#step-8 .question-box {
  display: flex;
  flex-direction: column;
  min-height: 70vh;
}

.wide-container .question-box > *:not(.button-container):not(.feedback-input) {
  flex: 1;
}

.wide-container .button-container,
#step-3 .button-container,
#step-4 .button-container,
#step-5 .button-container,
#step-6 .button-container,
#step-7 .button-container,
#step-8 .button-container {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
}

#step-6 .question-description,
#step-8 .screen-description {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: #4b5563;
}

#step-3 .question-title,
#step-4 .question-title,
#step-5 .question-title,
#step-6 .question-title,
#step-7 .question-title,
#step-8 .question-title {
  margin-bottom: 1.25rem;
}

#step-3 .summary-container,
#step-4 .creative-elements-container,
#step-5 .ai-generated-text,
#step-6 .outline-container,
#step-7 .json-container,
#step-8 .screens-container,
#step-5 .ai-generated-text,
#step-6 .outline-container,
#step-8 .screens-container,
#step-7 .generated-media-container {
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: left;
}

#step-3 .feedback-input,
#step-4 .answer-input,
#step-5 .feedback-input,
#step-6 .feedback-input,
#step-7 .feedback-input,
#step-8 .feedback-input {
  height: 100px;
  resize: vertical;
  margin-bottom: 1rem;
}

#step-4 .answer-input,
#step-6 .feedback-input,
#step-4 .answer-input,
#step-5 .feedback-input,
#step-6 .feedback-input,
#step-8 .feedback-input {
  height: 160px;
  resize: vertical;
  margin-top: auto;
  margin-bottom: 1rem;
}

.regenerate-button {
  background-color: #6b7280 !important;
  color: #ffffff;
}

.regenerate-button:hover {
  background-color: #4b5563 !important;
}

#step-4 .question-box,
#step-6 .question-box,
#step-8 .question-box {
  justify-content: flex-start;
}

#step-4 .creative-elements-container,
#step-6 .outline-container,
#step-8 .screens-container {
  margin-top: 1rem;
}

/* ============== Mobile Styles ============== */
@media screen and (max-width: 1000px) {
  /* Make the theme toggle icon larger on mobile */
  .theme-toggle-icon {
    width: 3rem;
    height: 3rem;
  }

  /* Double the font sizes of all paragraphs */
  p {
    font-size: 2.5rem;
  }

  /* Double the font sizes of all list items */
  input[type="checkbox"] {
    width: 48px !important;
    height: 48px !important;
  }

  input[type="checkbox"]::after {
    font-size: 32px !important;
  }

  /* Double the text sizes inside of the list */
  li {
    font-size: 2.5rem !important;
  }

  /* Double the header sizes */
  #step-5 h1 {
    font-size: 5rem !important;
  }

  #step-5 h2 {
    font-size: 4rem !important;
  }

  #step-5 h3 {
    font-size: 3rem !important;
  }

  #step-5 h4 {
    font-size: 2.5rem !important;
  }

  #step-5 h5 {
    font-size: 2rem !important;
  }

  /* Make question-section take 100% width on mobile */
  .question-section {
    max-width: 100% !important;
    margin-bottom: 500px !important;
  }

  /* Make question-box auto height on mobile */
  .question-box {
    min-height: auto !important;
  }

  /* Increase all font sizes ~50% from your current values */
  .welcome-title {
    /* from 4.2rem to 6rem */
    font-size: 6rem;
  }

  .welcome-text {
    /* from 1.75rem to ~2.625rem */
    font-size: 2.625rem;
  }

  .get-started-button {
    font-size: 2.625rem;
  }

  .question-title {
    /* from 2.625rem to ~4rem */
    font-size: 4rem;
  }

  .question-description,
  .question-example,
  .screen-description {
    /* from 1.575rem to ~2.4rem */
    font-size: 2.4rem;
  }

  .next-button,
  .generate-button,
  .confirm-button,
  .regenerate-button,
  .approve-button,
  .prev-button {
    /* from 1.575rem to ~2.4rem */
    font-size: 2.4rem;
  }

  .answer-input,
  .feedback-input {
    /* from 1.575rem to ~2.4rem */
    font-size: 2.4rem;
  }
  
  .form-label {
    font-size: 2.4rem;
  }
}
