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

@font-face {
  font-family: 'Motor';
  src: local('Motor'), local('Motor-Regular');
  font-weight: 400;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Motor', 'Poppins', sans-serif;
  margin: 0;
  background-color: #fff4f8;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 214, 225, 0.9) 0,
    rgba(255, 214, 225, 0.9) 14px,
    transparent 14px,
    transparent 28px
  );
  background-size: cover;
  color: #5a4a42;
  min-height: 100vh;
}

header {
  background: #fff1f6;
  color: #674d5f;
  padding: 60px 40px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(255, 205, 217, 0.16);
  border-bottom: 1px solid rgba(90, 134, 203, 0.14);
  position: relative;
  overflow: hidden;
}

h1 {
  margin: 0 0 12px 0;
  font-size: 3.5em;
  font-weight: 800;
  letter-spacing: -1.5px;
  position: relative;
  z-index: 1;
  text-shadow: none;
  color: #4a3d38;
  line-height: 1.1;
}

header > p {
  margin: 0;
  font-size: 1.1em;
  opacity: 0.85;
  font-weight: 400;
  position: relative;
  z-index: 1;
  color: #6b5350;
  letter-spacing: 0.3px;
}

main {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

#inputs {
  background: #fff6fb;
  padding: 36px;
  border-radius: 26px;
  margin-bottom: 40px;
  box-shadow: 0 14px 40px rgba(255, 205, 217, 0.2);
  border: 1px dashed rgba(90, 134, 203, 0.35);
  transition: all 0.3s ease;
  position: relative;
}

#inputs::before {
  content: "✨";
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 2.4rem;
  opacity: 0.15;
}

#inputs:hover {
  box-shadow: 0 18px 55px rgba(255, 205, 217, 0.3);
  transform: translateY(-2px);
}

.inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 20px;
}

.input-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff7fb;
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 10px 20px rgba(255, 205, 217, 0.16);
  border: 1px solid rgba(90, 134, 203, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.input-card:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 190, 205,0.4), 0 12px 18px rgba(255, 205, 217, 0.18);
}

.input-card small {
  display: block;
  color: #8a6c6b;
  font-size: 0.88em;
  line-height: 1.4;
}

label {
  display: block;
  margin: 0;
  font-weight: 700;
  color: #4a3d38;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select, button {
  padding: 14px 16px;
  margin-left: 0;
  font-size: 0.95em;
  border-radius: 14px;
  border: 1px solid #f4d7e4;
  font-family: 'Poppins', sans-serif;
  transition: all 0.25s ease;
}

select {
  background: #fff;
  cursor: pointer;
  color: #4a3d38;
  font-weight: 600;
}

select:hover,
select:focus {
  border-color: #ffccd8;
  box-shadow: none;
}

select:hover {
  border-color: #ffccd8;
}

select:focus {
  outline: none;
  border-color: #ffccd8;
}

button {
  background: #ffc9db;
  color: #3b2f44;
  border: none;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-top: 10px;
  min-width: 220px;
  font-size: 1em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: none;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: none;
  background: #ffe3ec;
}

button:active {
  transform: translateY(0px);
}

button.secondary {
  background: #fff1f6;
  color: #6b4b5e;
  border: 1px solid rgba(255, 181, 213, 0.8);
}

button.secondary:hover {
  background: #ffe7f1;
}

.actions-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.input-help {
  margin: 0;
  color: #9d7a7c;
  font-size: 0.95em;
}

#output {
  background: #fff4f8;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(255, 205, 217, 0.18);
  animation: slideUp 0.5s ease-out;
  border: 1px solid rgba(90, 134, 203, 0.14);
}

.output-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border: 1px dashed rgba(90, 134, 203, 0.14);
  padding: 24px;
  border-radius: 26px;
  background: #fff5fb;
}

.output-badge {
  align-self: center;
  background: #ffd6e8;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.output-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.glaze-gallery {
  display: none;
  margin-top: 0;
}

.glaze-preview-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(30, 0, 0, 0.08);
  background: #fff;
  border: 1px solid rgba(90, 134, 203, 0.14);
}

.glaze-preview-card img {
  width: 100%;
  display: block;
}

.glaze-preview-card p {
  margin: 0;
  padding: 14px 16px;
  font-weight: 700;
  color: #3b2f44;
  font-size: 0.95em;
  background: #fff8fb;
}

.glaze-section {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(90, 134, 203, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 20px 60px rgba(255, 205, 217, 0.16);
  margin-top: 26px;
}

.glaze-section__body {
  position: relative;
}

.glaze-section__body h3 {
  margin-top: 0;
  color: #382a32;
  font-size: 1.9em;
}

.glaze-section__body p {
  margin: 12px 0 24px 0;
  color: #695454;
  line-height: 1.7;
}

.glaze-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  position: relative;
}

.glaze-hero::before,
.glaze-hero::after {
  content: "✨";
  position: absolute;
  font-size: 2rem;
  color: rgba(255, 222, 235, 0.85);
  opacity: 0.7;
  animation: sparkle 1.8s ease-in-out infinite;
}

.glaze-hero::before {
  top: -18px;
  left: -10px;
}

.glaze-hero::after {
  bottom: -18px;
  right: -10px;
  animation-delay: 0.9s;
}

.glaze-hero img {
  width: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid rgba(90, 134, 203, 0.12);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
}

.glaze-hero__subtitle {
  margin: 0 0 12px 0;
  font-size: 1.1em;
  font-weight: 700;
  color: #4a3d38;
}

.glaze-hero__text {
  margin: 0;
  color: #5a3d52;
  line-height: 1.8;
}

@keyframes sparkle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: translate(4px, -8px) scale(1.1);
    opacity: 1;
  }
}

.close-info {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 205, 217, 0.35);
  color: #3b2f44;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(255, 205, 217, 0.18);
  padding: 0;
}

.close-info:hover {
  background: rgba(255, 205, 217, 0.45);
}

.output-guidance {
  margin-top: 16px;
  padding: 18px 22px;
  background: #fff6f5;
  border-left: 1px solid rgba(90, 134, 203, 0.14);
  border-radius: 16px;
  color: #5a3d52;
  line-height: 1.7;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hidden {
  display: none;
}

#wallTitle {
  margin: 0 0 16px 0;
  font-size: 2.5em;
  color: #4a3d38;
  font-weight: 800;
  letter-spacing: -0.5px;
}

#wallNotes {
  font-size: 1em;
  color: #5a3d52;
  margin: 0 0 32px 0;
  line-height: 1.8;
  padding: 20px;
  background: #fff4fb;
  border-left: 1px solid rgba(90, 134, 203, 0.14);
  border-radius: 6px;
  font-weight: 500;
}

#output > h3 {
  font-size: 1.6em;
  color: #4a3d38;
  margin: 32px 0 20px 0;
  border: 1px solid rgba(90, 134, 203, 0.14);
  background: #fff4fb;
  padding: 16px 22px;
  border-radius: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

#output > h3::before,
#output > h3::after {
  content: "~";
  position: absolute;
  color: #d4aaca;
  font-size: 1.4em;
  top: 16px;
}

#output > h3::before {
  left: 14px;
}

#output > h3::after {
  right: 14px;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.ingredient-category-header {
  flex-basis: 100%;
  font-weight: 700;
  font-size: 0.95em;
  color: #3b2f44;
  background: #fff4fb;
  padding: 16px 18px;
  border-radius: 18px;
  margin-top: 24px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 6px 18px rgba(255, 205, 217, 0.16);
  border-left: 1px solid rgba(90, 134, 203, 0.14);
}

.ingredient-category-header:first-child {
  margin-top: 0;
}

.ingredient-card {
  background: #fff6fb;
  border-radius: 24px;
  padding: 18px;
  width: 170px;
  min-height: 220px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(255, 205, 217, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border: 1px solid rgba(90, 134, 203, 0.14);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0, rgba(255, 255, 255, 0.6) 1px, transparent 1px), radial-gradient(circle at 80% 85%, rgba(255, 225, 232, 0.65) 0, rgba(255, 225, 232, 0.4) 1px, transparent 1px);
  background-size: 24px 24px;
}

.ingredient-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px rgba(255, 205, 217, 0.22);
  border-color: rgba(90, 134, 203, 0.18);
  background: #fff8fb;
}

.ingredient-card img {
  max-width: 100%;
  height: 90px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 18px;
  background: #fff4f7;
  padding: 12px;
  border: 1px solid rgba(90, 134, 203, 0.12);
  filter: contrast(0.92) saturate(0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}
.ingredient-card p {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.5;
  color: #4a3d38;
  font-weight: 600;
}

#stepsList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#stepsList li {
  background: #fff5fb;
  margin-bottom: 14px;
  padding: 20px;
  border-left: 1px solid rgba(90, 134, 203, 0.14);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(255, 205, 217, 0.12);
  counter-increment: step-counter;
  position: relative;
  padding-left: 58px;
  line-height: 1.7;
  transition: all 0.25s ease;
  color: #3b2f44;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
}

#stepsList li:hover {
  box-shadow: 0 8px 22px rgba(255, 205, 217, 0.18);
  transform: translateX(2px);
  border-left-color: rgba(90, 134, 203, 0.14);
  background: #fff;
}

#stepsList li.completed-step {
  opacity: 0.65;
  text-decoration: line-through;
}

#stepsList li::before {
  content: counter(step-counter);
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: #ffd6e8;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95em;
  box-shadow: 0 2px 6px rgba(255, 205, 217, 0.18);
}

#stepsList {
  counter-reset: step-counter;
}

.ingredient-info {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.3);
  padding: 24px;
  z-index: 900;
}

.ingredient-info.hidden,
.glaze-modal.hidden {
  display: none;
}

.ingredient-info__body {
  position: relative;
  background: #fff6fb;
  border-radius: 32px;
  max-width: 420px;
  width: 100%;
  padding: 34px;
  box-shadow: 0 20px 50px rgba(255, 205, 217, 0.18);
  border: 1px solid rgba(90, 134, 203, 0.14);
}

.close-info {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 205, 217, 0.35);
  color: #3b2f44;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(255, 205, 217, 0.18);
  padding: 0;
}

.close-info:hover {
  background: rgba(255, 205, 217, 0.28);
}

.ingredient-info h3 {
  margin-top: 0;
  color: #3c2d2f;
}

.ingredient-info p {
  margin: 16px 0;
  color: #695454;
  line-height: 1.7;
}

.ingredient-info__tag {
  display: inline-block;
  color: #d78ea3;
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 14px;
}

.ingredient-info__link {
  display: inline-block;
  color: #fff;
  background: #f8cdd7;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.ingredient-info__link.hidden {
  display: none;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.2em;
  }
  
  #inputs {
    padding: 20px;
  }
  
  label {
    margin-bottom: 16px;
  }
  
  select, button {
    padding: 10px 12px;
    margin-left: 8px;
    font-size: 0.9em;
  }
  
  button {
    min-width: 140px;
  }
  
  #output {
    padding: 20px;
  }
  
  #wallTitle {
    font-size: 1.8em;
  }
  
  .ingredient-card {
    width: 140px;
  }
}