:root {
  --bg-color: #FFFFFF;
  --card-bg: #FFFFFF;
  --text-main: #2C2C2C;
  --text-muted: #6B6B6B;
  --accent: #2C2C2C;
  --accent-hover: #1A1A1A;
  --primary-font: 'Montserrat', sans-serif;
  --heading-font: 'Montserrat', cursive;
  --border-radius: 0px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--primary-font);
  font-size: 18px;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  /* Allow iframe resizing smoothly */
  min-height: 100vh;
}

.app-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 20px;
  position: relative;
}

h1,
h2,
h3 {
  font-family: var(--heading-font);
  font-weight: 400;
  /* Poiret One is designed at regular weight */
  letter-spacing: 0em;
}

.screen {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.active {
  display: block;
}

@keyframes fadeInSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Start Screen */
#start-screen {
  text-align: center;
  padding: 60px 0;
}

#start-screen h1 {
  font-size: 45px;
  margin-bottom: 20px;
  color: var(--text-main);
}

#start-screen p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-more-info {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1rem;
  font-family: var(--primary-font);
  font-weight: 500;
  border-radius: 0px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid #E5E5E5;
}

.btn-secondary:hover {
  background-color: #F0F0F0;
}

/* Quiz Screen */
.progress-bar-container {
  width: 100%;
  height: 4px;
  background-color: #EAEAEA;
  border-radius: 0px;
  margin-bottom: 40px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--accent);
  width: var(--progress, 0%);
  transition: width 0.4s ease;
}

.question-slide {
  text-align: left;
  animation: fadeInSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.question-title {
  font-size: 1.75rem;
  margin-bottom: 30px;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.option-btn {
  background-color: var(--card-bg);
  border: 1px solid #EAEAEA;
  padding: 20px 24px;
  border-radius: var(--border-radius);
  font-family: var(--primary-font);
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.option-btn:hover {
  border-color: #ccc;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.option-btn.selected {
  border-color: var(--accent);
  background-color: #FDFDFD;
}

.is-hidden {
  display: none !important;
}

.quiz-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #EAEAEA;
}

#question-counter {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
}

/* Results Screen */
#results-screen {
  text-align: center;
}

#results-screen h1 {
  font-size: 45px;
  margin-bottom: 40px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 50px;
}

.result-card {
  background-color: var(--card-bg);
  padding: 30px 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid #F0F0F0;
}

.result-card h3 {
  font-family: var(--primary-font);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.result-card h2 {
  font-size: 1.5rem;
  color: var(--accent);
}

/* Routine Section */
.routine-section {
  margin-bottom: 50px;
  text-align: left;
}

.routine-section-heading {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 30px;
}

.routine-card {
  background-color: var(--card-bg);
  border: 1px solid #F0F0F0;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 35px 30px;
  margin-bottom: 25px;
}

.routine-header {
  margin-bottom: 25px;
  border-bottom: 1px solid #F0F0F0;
  padding-bottom: 15px;
}

.routine-badge {
  display: inline-block;
  background-color: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.routine-name {
  font-size: 1.8rem;
  color: var(--text-main);
}

.routine-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.routine-detail strong {
  display: block;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.routine-detail p {
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 1.6;
}

.routine-product-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.routine-product-items li {
  background: #F9F9F9;
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-main);
  font-weight: 500;
}

.empty-products-msg {
  color: var(--text-muted);
  font-size: 1rem;
  padding: 20px;
  background: #FAFAFA;
  border: 1px dashed #E0E0E0;
  text-align: center;
}

.recommendations h2 {
  font-size: 2rem;
  margin-bottom: 30px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.product-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-align: left;
  transition: var(--transition);
  border: 1px solid #F0F0F0;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #F9F9F9;
}

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-family: var(--heading-font);
  flex-grow: 1;
}

.btn-more-info {
  background-color: var(--bg-color);
  color: var(--text-main);
  border: 1px solid #E5E5E5;
  padding: 10px 15px;
  font-size: 0.9rem;
  width: 100%;
}

.btn-more-info:hover {
  background-color: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}