:root {
  --honey-deep: #b8860b;
  --honey-gold: #daa520;
  --honey-cream: #fff8dc;
  --honey-soft: #ffe8af;
  --love-red: #c41e3a;
  --love-rose: #ffb6c1;
  --text-dark: #3e2723;
  --bg-dark: #2c1810;
  --card: rgba(255, 255, 255, 0.9);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  color: var(--text-dark);
  background: linear-gradient(180deg, #fff4d6 0%, #fff7ea 55%, #fff3f7 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.honeycomb-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23DAA520' stroke-width='2'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23DAA520' stroke-width='2'/%3E%3C/svg%3E");
}

#floating-emojis {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.floating {
  position: absolute;
  bottom: -40px;
  opacity: 0.2;
  animation: floatUp linear forwards;
}

@keyframes floatUp {
  to { transform: translateY(-120vh) rotate(360deg); opacity: 0; }
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, var(--bg-dark), #4a2c1a);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}

.logo {
  font-family: 'Dancing Script', cursive;
  color: var(--honey-soft);
  font-size: 1.6rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: #fcebc8;
  text-decoration: none;
  font-size: 0.95rem;
}

.hamburger {
  display: none;
  border: 1px solid var(--honey-gold);
  background: transparent;
  color: var(--honey-soft);
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
}

header, main, footer { position: relative; z-index: 1; }

.hero {
  text-align: center;
  padding: 3.2rem 1rem 2rem;
  background: linear-gradient(180deg, #2c1810 0%, #6b3a1f 65%, #b8860b 100%);
  color: var(--honey-cream);
}

.honey-drop { font-size: 3rem; }

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--honey-soft);
  margin: 0;
}

.subtitle {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  margin: 0.3rem 0;
  color: var(--love-rose);
}

.tagline {
  margin: 0.4rem auto 1rem;
  max-width: 700px;
  line-height: 1.6;
}

.language-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.language-badges span {
  background: rgba(255, 191, 0, 0.14);
  border: 1px solid var(--honey-gold);
  border-radius: 999px;
  padding: 0.36rem 0.7rem;
  font-family: 'Dancing Script', cursive;
  font-size: 1.05rem;
}

main {
  width: min(1050px, 92%);
  margin: 1rem auto 3.5rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid rgba(218, 165, 32, 0.45);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 25px rgba(184, 134, 11, 0.16);
}

.map-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 0.5rem;
}

.map-stop {
  padding: 0.58rem;
  border-radius: 10px;
  text-align: center;
  background: #efe7d6;
  opacity: 0.58;
  font-size: 0.9rem;
}

.map-stop.unlocked {
  background: linear-gradient(135deg, var(--honey-soft), #fff2c6);
  opacity: 1;
  font-weight: 700;
}

.bee-marker {
  margin-top: 0.65rem;
  font-size: 1.45rem;
  transition: transform 0.35s ease;
}

.puzzle-card {
  background: #fffef9;
  border: 1px solid #f4dba5;
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 0.9rem;
  position: relative;
}

.puzzle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.puzzle-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.puzzle-story {
  margin: 0 0 0.8rem;
  color: #5e3b11;
}

.puzzle-clue {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  background: #fff5dd;
  border: 1px dashed #e7bf69;
}

.puzzle-clue.snow-clue {
  justify-content: flex-start;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.snow-key {
  width: 86px;
  text-align: right;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.snow-arrow {
  width: 20px;
  text-align: center;
}

.snow-cells {
  display: inline-flex;
  gap: 4px;
}

.snow-char {
  width: 42px;
  height: 42px;
  border: 1px solid #d7a84b;
  border-radius: 8px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.05rem;
  background: #fff;
}

.puzzle-input-area {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
  align-items: center;
}

.puzzle-input {
  flex: 1;
  min-width: 210px;
  padding: 0.55rem 0.7rem;
  border: 1px solid #dfca98;
  border-radius: 9px;
}

.short-input {
  width: 90px;
  height: 36px;
  border-radius: 8px;
}

.puzzle-submit {
  background: linear-gradient(135deg, var(--honey-gold), #f59f77);
}

.puzzle-hint-btn {
  background: #fff;
  border: 1px solid var(--honey-gold);
  color: #6b3f00;
}

.puzzle-hint {
  display: none;
  margin-top: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #fff1c9;
  border: 1px solid #ecc66d;
}

.puzzle-result {
  display: none;
  margin-top: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-weight: 700;
}

.puzzle-result.correct {
  display: block;
  background: #e7f7df;
  border: 1px solid #6cb06c;
  color: #225a22;
}

.puzzle-result.incorrect {
  display: block;
  background: #ffe5eb;
  border: 1px solid #dd7893;
  color: #a43f60;
}

.puzzle-locked {
  pointer-events: auto;
}

.puzzle-locked > *:not(.puzzle-lock-overlay) {
  filter: blur(2px);
  opacity: 0.45;
}

.puzzle-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(30, 18, 10, 0.6);
  color: #ffe8ac;
  font-weight: 700;
}

.lock-icon { font-size: 2rem; }

.cipher-display {
  font-family: 'Playfair Display', serif;
  letter-spacing: 2px;
  background: #fff4de;
  border: 1px solid #e9c26e;
  border-radius: 10px;
  padding: 0.6rem;
}

.cipher-display.decoded {
  margin-top: 0.55rem;
  color: #b7365d;
}

.shift-control {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.55rem;
}

.shift-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
}

.shift-value {
  font-weight: 700;
  color: #7a3d00;
}

.crossword-grid {
  display: inline-grid;
  grid-template-columns: repeat(6, 36px);
  gap: 3px;
  margin: 0.65rem 0;
}

.crossword-cell {
  width: 36px;
  height: 36px;
  border: 1px solid #d7a84b;
  border-radius: 6px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  background: #fff;
}

.crossword-cell.gold {
  background: #fff2bf;
}

.crossword-cell.blocked {
  background: #b88a43;
}

.puzzle-clue select {
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid #d7a84b;
}

button {
  border: none;
  border-radius: 10px;
  padding: 0.52rem 0.9rem;
  background: linear-gradient(135deg, var(--honey-gold), #ff9ec4);
  color: #462300;
  font-weight: 700;
  cursor: pointer;
}

.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.feedback { min-height: 1.3rem; font-weight: 600; }
.hidden { display: none; }
.final-buttons { display: flex; gap: 0.7rem; justify-content: center; }
.final-question { text-align: center; margin-bottom: 0.3rem; }
.final-subline {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0 0 0.8rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

figure { margin: 0; }

figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #edcc7a;
  background: #fff5db;
}

figcaption {
  text-align: center;
  font-weight: 600;
  margin-top: 0.25rem;
}

.egg-field {
  position: relative;
  min-height: 190px;
  background: linear-gradient(135deg, #fff3b7, #ffd6ec);
  border-radius: 14px;
}

.egg-zone { position: relative; }

.hidden-egg {
  position: absolute;
  width: 28px;
  height: 36px;
  cursor: pointer;
  transition: transform 0.3s;
  z-index: 50;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  border: none;
  background: transparent;
  padding: 0;
}

.hidden-egg svg {
  width: 100%;
  height: 100%;
}

.hidden-egg:hover {
  transform: scale(1.3) rotate(10deg);
}

.hidden-egg.found {
  opacity: 0.35;
  filter: grayscale(0.6);
}

.egg-nav { top: 8px; left: 180px; }
.egg-hero { top: 18px; right: 10%; }
.egg-map-a { top: 18px; right: 18px; }
.egg-map-b { bottom: 18px; left: 14px; }
.egg-puzzles { top: 14px; right: 18px; }
.egg-snow { top: 14px; right: 14px; }
.egg-asia { bottom: 14px; left: 14px; }
.egg-europe { top: 14px; left: 14px; }
.egg-latam { bottom: 14px; right: 14px; }
.egg-gallery { top: 14px; right: 16px; }
.egg-eggs { top: 16px; right: 16px; }
.egg-footer { top: 8px; right: 14%; }

/* Keep Bali egg visible but out of the input flow */
#puzzle-asia .egg-asia {
  left: 54%;
  bottom: 54px;
  z-index: 0;
  opacity: 0.95;
}

#puzzle-asia .puzzle-input-area {
  position: relative;
  z-index: 2;
}

/* Hide Europe egg behind clue rows near "Sei il mio tutto" */
#puzzle-europe .egg-europe {
  left: 56%;
  top: 178px;
  z-index: 0;
  opacity: 0.92;
}

#puzzle-europe .puzzle-clue {
  position: relative;
  z-index: 2;
}

.egg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16, 10, 6, 0.8);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.egg-modal.active {
  display: flex;
}

.egg-modal-content {
  position: relative;
  width: min(560px, 94vw);
  background: #fffaf0;
  border: 1px solid #eac778;
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}

.egg-modal-content img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #efcc7a;
  margin-bottom: 0.6rem;
}

.egg-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: #5a3000;
}

.egg-tracker {
  position: fixed;
  right: 12px;
  bottom: 52px;
  z-index: 31;
  background: #2f1a11;
  color: var(--honey-soft);
  border: 1px solid var(--honey-gold);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.confetti {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  top: -15px;
  z-index: 100;
  animation: fall 2.9s linear forwards;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.9; }
}

.celebration-emoji {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 120;
  will-change: transform;
}

.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(218, 165, 32, 0.2);
  z-index: 30;
}

.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
  background: linear-gradient(90deg, var(--honey-gold), var(--love-red));
}

.puzzle-tracker {
  position: fixed;
  right: 12px;
  bottom: 14px;
  z-index: 31;
  background: #2f1a11;
  color: var(--honey-soft);
  border: 1px solid var(--honey-gold);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

footer {
  background: linear-gradient(180deg, var(--bg-dark), #1a0e08);
  color: var(--honey-soft);
  text-align: center;
  padding: 2.2rem 1rem;
  font-size: 0.92rem;
}

footer h3 {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  margin: 0.35rem 0 0.9rem;
  color: var(--honey-gold);
}

.footer-honey {
  font-size: 2.3rem;
}

.footer-poem {
  max-width: 520px;
  margin: 0 auto 0.8rem;
  line-height: 1.8;
  font-style: italic;
}

@media (max-width: 780px) {
  .map-track { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 1rem;
    background: #2c1810;
    border-top: 1px solid rgba(218, 165, 32, 0.35);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: inline-flex; }
  .puzzle-tracker { font-size: 0.78rem; }
  .egg-tracker { font-size: 0.78rem; bottom: 48px; }
  .egg-nav { left: 140px; }
}
