:root {
  --bg: #1a1a2e;
  --card-bg: #16213e;
  --text: #eef0f2;
  --accent: #ff6b9d;
  --accent-hover: #ff85ad;
  --gold: #ffd700;
  --rose-gold: #e0b4a9;
  --success: #4ade80;
  --error: #ef4444;
  --hint: #fbbf24;
}

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

body {
  background: linear-gradient(135deg, var(--bg) 0%, #0f0f1e 100%);
  color: var(--text);
  font-family: 'Georgia', 'Times New Roman', serif;
  min-height: 100vh;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(255, 107, 157, 0.1);
  border: 1px solid rgba(255, 107, 157, 0.2);
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease-out;
}

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

h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: normal;
  letter-spacing: 2px;
}

h2 {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--rose-gold);
}

p {
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.1rem;
}

.progress {
  text-align: center;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
}

button {
  background: linear-gradient(135deg, var(--accent) 0%, #ff4d7d 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: Georgia, serif;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
  width: 100%;
  margin-top: 1rem;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 157, 0.5);
}

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

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

button.hint-btn {
  background: linear-gradient(135deg, var(--hint) 0%, #f59e0b 100%);
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
}

input[type="text"] {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid rgba(255, 107, 157, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  margin-top: 1rem;
  font-family: Georgia, serif;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  animation: slideDown 0.3s ease-out;
}

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

.feedback.success {
  background: rgba(74, 222, 128, 0.2);
  color: var(--success);
  border: 2px solid var(--success);
}

.feedback.error {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  border: 2px solid var(--error);
}

.feedback.hint {
  background: rgba(251, 191, 36, 0.2);
  color: var(--hint);
  border: 2px solid var(--hint);
}

.heart {
  display: inline-block;
  color: var(--accent);
  animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  position: absolute;
  animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.puzzle-content {
  margin: 2rem 0;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 2rem;
}

.word {
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 4px;
  user-select: none;
}

.word:hover {
  transform: scale(1.1);
  color: var(--accent);
}

.word.clickable {
  background: rgba(255, 107, 157, 0.1);
  border: 1px solid var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.word.selected {
  background: var(--accent);
  color: white;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.photo {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.photo:hover {
  transform: scale(1.05) rotate(2deg);
  border-color: var(--accent);
}

.photo.correct {
  border-color: var(--success);
  box-shadow: 0 0 20px var(--success);
}

.flavor-list {
  list-style: none;
  padding: 2rem 1rem;
}

.flavor-list li {
  font-size: 1.5rem;
  padding: 1rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-align: left;
  transition: all 0.3s ease;
  cursor: pointer;
}

.flavor-list li:hover {
  background: rgba(255, 107, 157, 0.1);
  transform: translateX(10px);
}

.poem {
  background: rgba(139, 69, 19, 0.1);
  border: 2px solid rgba(139, 69, 19, 0.3);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  font-family: 'Brush Script MT', cursive;
  font-size: 1.3rem;
  line-height: 2;
  position: relative;
}

.poem::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence baseFrequency="0.9" /></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>');
  pointer-events: none;
  border-radius: 8px;
}

.blank {
  display: inline-block;
  min-width: 100px;
  border-bottom: 2px solid var(--accent);
  margin: 0 5px;
  color: var(--gold);
  font-weight: bold;
}

.map {
  width: 100%;
  max-width: 500px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px solid rgba(255, 107, 157, 0.3);
}

.map-marker {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 50%;
  animation: heartbeat 1.5s infinite;
  cursor: pointer;
  box-shadow: 0 0 20px var(--accent);
}

.packing-reminder {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.packing-reminder h3 {
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.packing-reminder p {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.packing-reminder ul {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.packing-reminder li {
  color: var(--text);
  font-size: 1rem;
  padding: 0.5rem;
  margin: 0.25rem 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  text-align: center;
}

@media (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .card {
    padding: 1.5rem;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .poem {
    font-size: 1.1rem;
    padding: 1.5rem;
  }
}

.hidden {
  display: none;
}

.steam {
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: 4px;
  height: 40px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: steam-rise 3s infinite;
}

@keyframes steam-rise {
  0% {
    transform: translateY(0) translateX(-50%);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-100px) translateX(-50%);
    opacity: 0;
  }
}
