@font-face {
  font-family: 'Marionette';
  src: url('MarioNett.ttf') format('truetype');
  ascent-override: 80%;
  descent-override: 20%;
  line-gap-override: 0%;
}

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

body {
  font-family: 'Marionette', cursive;
  min-height: 100vh;
  background: url('images/bg_vertical.png') center center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 4rem;
}

h1 {
  color: #fff;
  font-size: clamp(3.75rem, 16vw, 8rem);
  text-shadow: 4px 4px 2px black;
  -webkit-text-stroke: #b34def 2px;
  margin-bottom: 0.5rem;
  text-align: center;
  letter-spacing: 2px;
  font-weight: 500;
}

.score-bar {
  color: #000;
  font-size: 2.25rem;
  margin-bottom: 1rem;
  text-align: center;
  background: #e0e0e0;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
}

.score-egg {
  height: 2.25rem;
  width: auto;
  flex-shrink: 0;
}

.result-yoshi {
  display: block;
  height: 7rem;
  width: auto;
  margin: 0 auto 0.5rem;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 1.75rem;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 10px 40px rgba(0,0,0,.22);
}

.card-right {
  display: flex;
  flex-direction: column;
}

/* ── image ── */
.yoshi-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 4px solid #b34def;
  margin-bottom: 1.5rem;
  background: #e8f5e9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yoshi-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px);
  transition: filter 0.6s ease;
}

/* ── autocomplete input ── */
.guess-section {
  position: relative;
}

.guess-section label {
  display: block;
  font-size: 2.063rem;
  color: #444;
  margin-bottom: 0.5rem;
  text-align: center;
}

.guess-input {
  width: 100%;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 2.25rem;
  border: 3px solid #b34def;
  border-radius: 6px;
  outline: none;
  color: #222;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.guess-input:focus {
  border-color: #b34def;
  box-shadow: 0 0 0 3px rgba(134, 76, 175, 0.2);
}

.guess-input:disabled {
  background: #f5f5f5;
  color: #888;
}

/* ── dropdown ── */
.suggestions {
  display: none;
  position: absolute;
  top: calc(100% - 3px);
  left: 0;
  right: 0;
  background: #fff;
  border: 3px solid #b34def;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 210px;
  overflow-y: auto;
  z-index: 20;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.suggestion-item {
  padding: 0.65rem 1rem;
  font-size: 1.5rem;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 1px solid #e0e0e0;
  line-height: 1.6;
  color: #333;
  transition: background 0.1s;
}

.suggestion-item:last-child { border-bottom: none; }

.suggestion-item:hover,
.suggestion-item.active {
  background: #e8f5e9;
  color: #4e1b5e;
}

.suggestion-item b {
  color: #b34def;
  font-weight: 500;
}

/* ── buttons ── */
.btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  flex: 1;
  padding: 1.1rem 0.5rem;
  font-family: inherit;
  font-size: 2.25rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.5px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.08s, filter 0.08s;
}

.btn:active { transform: translateY(2px); filter: brightness(0.9); }

.btn-submit {
  background: #b34def;
  color: #fff;
  box-shadow: 0 4px 0 #571c70;
}

.btn-submit:hover { background: #df53f7; }

.btn-next {
  background: #ff9800;
  color: #fff;
  box-shadow: 0 4px 0 #e65100;
  display: none;
}

.btn-next:hover { background: #fb8c00; }

/* ── wrong guesses box ── */
.wrong-guesses-list {
  margin-top: 1rem;
}

.guesses-header {
  text-align: center;
  font-size: 1.75rem;
  color: #444;
  margin-bottom: 0.5rem;
}

.guess-slots {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem;
  background: #fafafa;
}

.guess-slot {
  min-height: 3.75rem;
  border: 2px dashed #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  font-size: 1.75rem;
}

.guess-slot.filled {
  background: #ffebee;
  border: 2px solid #ef5350;
  color: #b71c1c;
  gap: 0.6rem;
}

.guess-slot.filled i {
  flex-shrink: 0;
  color: #ef5350;
}

.guess-slot.correct {
  background: #e8f5e9;
  border: 2px solid #4caf50;
  color: #1b5e20;
  gap: 0.6rem;
}

.guess-slot.correct i {
  flex-shrink: 0;
  color: #4caf50;
}

/* ── result banner ── */
.result {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 1.95rem;
  line-height: 1.1;
  text-align: center;
}

.result i {
  display: block;
  font-size: 6rem;
  margin-bottom: 0.5rem;
}

.result.correct {
  background: #e8f5e9;
  color: #1b5e20;
  border: 2px solid #4caf50;
}

.result.wrong {
  background: #ffebee;
  color: #b71c1c;
  border: 2px solid #ef5350;
}

/* ── mobile ── */
@media (max-width: 600px) {
  html, body {
    height: auto;
    overflow-y: auto;
  }

  .suggestions {
    top: auto;
    bottom: calc(100% - 3px);
    border-top: 3px solid #4caf50;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
  }


  .score-bar {
    padding: 0.7rem 1rem 0.3rem;
  }

  .score-egg {
    transform: translateY(-0.2rem);
  }

  .guess-input {
    padding: 1rem 1rem 0.4rem;
  }

  .suggestion-item {
    padding: 0.85rem 1rem 0.45rem;
  }

  .btn {
    padding: 1.4rem 0.5rem 0.8rem;
  }
}

/* ── desktop two-column ── */
@media (min-width: 700px) {
  body {
    background-image: url('images/bg_wide.png');
  }

  .card {
    flex-direction: row;
    align-items: flex-start;
    max-width: 960px;
    gap: 1.5rem;
    display: flex;
  }

  .yoshi-img-wrap {
    flex: 3;
    min-width: 0;
    margin-bottom: 0;
  }

  .card-right {
    flex: 2;
    min-width: 0;
  }
}