@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Jost';
  src: local('Jost');
}

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

body {
  font-family: 'Jost', sans-serif;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: #FCF5EB;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  overflow-x: hidden;
  overflow-y: auto;
}

.top-bar {
  width: 100%;
  flex-shrink: 0;
  line-height: 0;
  position: relative;
}

.header-svg {
  width: 100%;
  height: auto;
  display: block;
}

.bottom-bar {
  width: 100%;
  flex-shrink: 0;
  z-index: 10;
  background-color: #FCF5EB;
  padding: 16px;
  text-align: center;
}

.footer-legal {
  text-align: center;
  font-size: 12px;
  color: #8A94A6;
  line-height: 1.4;
}

.disclaimer-text {
  margin-bottom: 8px;
}

.legal-links a {
  color: #273859;
  text-decoration: none;
  font-weight: 500;
}

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

.logo {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 25px;
    width: auto;
    z-index: 5;
}

.text-section {
  margin: 5% 5% 2% 5%;
  text-align: center;
}

.title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  color: #273859;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 18px;
  color: #273859;
  line-height: 110%;
}

.illustration-container {
  width: 100%;
  display: block;
  margin: 5% auto;
}

.illustration {
    width: 80%;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0 auto;
}

.button-section {
  padding: 24px;
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-direction: column-reverse;
}

.primary-btn {
  background-color: #FFD867;
  color: #273859;
  border-radius: 50px;
  padding: 10px 24px;
  font-family: 'Jost', sans-serif;
  font-size: 22px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  width: 70%;
  margin: 0 auto;
  border: 2px solid #273859;
}

.primary-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.arrow {
  font-size: 20px;
}

.quiz-step {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.options-container {
  display: flex;
  gap: 16px;
  margin: 8% 5% 4% 5%;
  justify-content: space-between;
}

.option-card {
  flex: 1;
  background-color: #FFF;
  border-radius: 20px;
  padding: 30px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-card.active {
  border: 2px solid #273859;
}

.option-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}

.option-label {
  font-size: 20px;
  font-weight: 600;
  color: #273859;
}

.disclaimer {
  text-align: center;
  font-size: 15px;
  color: #273859;
  margin: 0 10%;
  line-height: 1.4;
  font-style: italic;
}

.occasions-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 5% 3% 5%;
  flex-grow: 1;
  padding: 5px;
  align-content: start;
}

.occasion-btn {
  background-color: #FFF;
  border-radius: 50px;
  padding: 8px;
  border: 2px solid transparent;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.occasion-btn.active {
  border: 2px solid #273859;
}

.occasion-btn .emoji {
  font-size: 22px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 4px 10px rgba(39, 56, 89, 0.08);
  flex-shrink: 0;
}

.occasion-btn .text {
  font-size: 16px;
  font-weight: 600;
  color: #273859;
}

.vibes-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 5% 5% 0 5%;
  flex-grow: 1;
  padding: 5px;
  align-content: start;
}

.vibe-card {
  background-color: #FFF;
  border-radius: 16px;
  padding: 10px 4px;
  border: 2px solid transparent;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  aspect-ratio: 1 / 1;
  min-width: 0;
  word-wrap: break-word;
}

.vibe-card.active {
  border: 2px solid #273859;
}

.vibe-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.vibe-label {
  font-size: 15px;
  font-weight: 500;
  color: #273859;
  line-height: 1.15;
}

.power-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.power-card {
  background-color: #FFF;
  border: 2px solid #EBEBEB;
  border-radius: 12px;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.power-card img {
  width: 60px;
  height: auto;
  margin-bottom: 12px;
}

.power-card.active {
  border-color: #273859;
  background-color: #FFF;
}

.power-label {
  font-size: 14px;
  font-weight: 600;
  color: #273859;
}

.results-container {
  margin: 5% 5% 0 5%;
  flex-grow: 1;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.category-header {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 16px;
}

.category-header img {
  width: 48px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.category-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.category-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  line-height: 1.1;
}

.category-desc {
  font-size: 14px;
  color: #273859;
  margin: 0;
  line-height: 110%;
  font-weight: 400;
}

.budget-low .category-title { color: #5BB17F; }
.budget-mid .category-title { color: #6A4C93; }
.budget-high .category-title { color: #DDA77B; }

.cards-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.result-card {
  background-color: #FFF;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.04);
}

.img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.budget-low .img-wrapper { background-color: #F2F9F4; }
.budget-mid .img-wrapper { background-color: #F4F0F9; }
.budget-high .img-wrapper { background-color: #FFF5F0; }

.img-wrapper img {
  width: 100%;
  height: 20vh;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.frag-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.frag-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 4px;
}

.frag-brand {
  font-size: 11px;
  font-weight: 600;
  color: #8A94A6;
  text-transform: uppercase;
}

.frag-name {
  font-size: 14px;
  font-weight: 800;
  color: #273859;
  line-height: 1.2;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}

.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}

.store-btn {
  font-size: 11px;
  font-weight: 800;
  padding: 8px 0;
  border-radius: 20px;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.notino-btn {
  background-color: #000;
  color: #FFF;
}

.psn-btn {
  background-color: #DCC7B2;
  color: #273859;
}

.empty-card {
  background-color: #F8F9FA;
  border-radius: 16px;
  padding: 30px 10px;
  text-align: center;
  font-size: 13px;
  color: #8A94A6;
  grid-column: span 2;
}

.outline-btn {
  background-color: transparent;
  border: 2px solid #273859;
  margin-top: 20px;
}

.result-category:not(:last-child) {
  border-bottom: 2px solid #EBEBEB;
  padding-bottom: 32px;
}

.smart-alert {
  background-color: #FFF8E7;
  border-left: 4px solid #E6A100;
  color: #5C4300;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.5;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.shake-error {
  animation: shakeError 0.4s ease-in-out;
}

.input-error {
  border: 2px solid #E63946 !important;
}

.inline-error-msg {
  color: #E63946;
  font-size: 17px;
  font-weight: 400;
  text-align: center;
  margin-top: 12px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.back-btn {
  background: transparent;
  border: none;
  color: #888888;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  padding: 8px 12px;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.back-btn:hover {
  color: #333333;
  text-decoration: underline;
}

@media (min-width: 768px) {
  body {
    padding: 40px 0;
    background-color: #EBE5DB;
  }

  .app-container {
    max-width: 65vw;
    min-height: auto;
    border-radius: 28px;
    box-shadow: 0 12px 40px rgba(39, 56, 89, 0.12);
    transition: max-width 0.3s ease;
  }

  .illustration-container {
    width: 100%;
    display: block;
    margin: 0 auto;
  }

  h1.title br {
    display: none;
  }

  .text-section {
    margin: 3% auto;
    text-align: center;
  }

  .app-container:has(#step-6.active),
  .app-container:has(#step-6[style*="display: flex"]) {
    max-width: 900px;
  }

  .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 56, 89, 0.15);
  }

  .option-card:hover,
  .occasion-btn:hover,
  .vibe-card:hover,
  .power-card:hover {
    border-color: #273859;
    transform: translateY(-2px);
  }

  .occasions-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .vibes-container {
    grid-template-columns: repeat(5, 1fr);
    margin: 3%;
    gap: 15px;
  }

  .vibe-card {
    aspect-ratio: auto;
  }

  .footer-legal {
    padding: 12px 20px 20px 20px;
    margin-top: 2%;
  }

  .illustration {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    margin: 0 auto;
  }

  .top-bar {
    width: 75%;
    flex-shrink: 0;
    line-height: 0;
    position: relative;
    margin: 0 auto;
  }

  .primary-btn {
    background-color: #FFD867;
    color: #273859;
    border-radius: 50px;
    padding: 10px 15px;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    width: 35%;
    margin: 0 auto;
    border: 2px solid #273859;
  }

  .button-section {
    padding: 1vh;
    margin-top: auto;
    flex-shrink: 0;
  }

  .options-container {
    gap: 10%;
    justify-content: center;
  }

  #step-2 .option-card {
    flex: none;
    width: 30%;
  }

  .img-wrapper img {
    height: 30vh;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  .img-wrapper {
    aspect-ratio: 9 / 5;
  }

  .frag-brand {
    font-size: 1rem;
    font-weight: 200;
    color: #8A94A6;
    text-transform: uppercase;
  }

  .frag-name {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  .store-btn {
    font-size: 10px;
    font-weight: 600;
    padding: 8px 0;
    border-radius: 20px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    width: 33%;
  }

  .results-container {
    margin: 2% 5%;
    flex-grow: 1;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .store-buttons {
    flex-direction: row;
    gap: 2vw;
  }

  .options-container {
    margin: 3% 5% 1% 5%;
  }

  p.disclaimer {
    margin-bottom: 5%;
  }

  .logo {
    top: 45%;
    width: 45%;
  }

  .header-svg {
    width: 78%;
    margin: 0 auto;
  }

  div#step-4 section.vibes-container {
    margin-top: 0;
  }

  .vibes-container {
    grid-template-columns: repeat(6, 1fr);
  }

  .power-grid {
    margin: 2% auto;
  }
}