/* public/garden.css */

.garden-app {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, #0f182b 0%, #17243b 50%, #0a0f18 100%);
  overflow: hidden;
}

/* ── Sky & Background ── */
.garden-sky {
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  pointer-events: none;
}

.garden-moon {
  position: absolute;
  top: 10%; right: 20%;
  width: 100px; height: 100px;
  background: #fff8dc;
  border-radius: 50%;
  box-shadow: 0 0 80px 20px rgba(255, 248, 220, 0.4), inset -10px -10px 20px rgba(0,0,0,0.1);
}

.garden-stars {
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="0.8" fill="rgba(255,255,255,0.7)"/><circle cx="100" cy="50" r="1.2" fill="rgba(255,255,255,0.9)"/><circle cx="160" cy="120" r="0.5" fill="rgba(255,255,255,0.5)"/><circle cx="40" cy="150" r="1" fill="rgba(255,255,255,0.8)"/></svg>') repeat;
  background-size: 300px 300px;
  opacity: 0.6;
}

/* ── UI ── */
.garden-ui {
  position: absolute;
  top: 40px; left: 0; right: 0;
  text-align: center;
  z-index: 20;
  pointer-events: none;
}

.garden-title {
  font-family: var(--font-display);
  color: var(--accent-garden);
  font-size: clamp(2rem, 5vw, 3rem);
  font-style: italic;
  font-weight: 400;
  text-shadow: 0 2px 10px rgba(165,214,167,0.4);
}

.garden-subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 3px;
  margin-top: 8px;
  text-transform: uppercase;
}

.garden-hint {
  position: absolute;
  bottom: 80px; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-body);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
  animation: hint-pulse 2s infinite;
  z-index: 30;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ── The Ground ── */
.garden-ground {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 45vh;
  z-index: 10;
}

.garden-grass {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 100%;
  background: linear-gradient(to top, #09120b 0%, #112615 50%, transparent 100%);
}

/* ── Flower Element ── */
.flower {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  z-index: 15;
}

.flower:hover {
  z-index: 20;
}

/* Stem */
.flower-stem {
  width: 6px; 
  height: clamp(60px, 15vh, 120px);
  background: linear-gradient(to top, #1b5e20, #4caf50);
  border-radius: 3px;
  position: relative;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.3);
  transition: all 0.5s ease;
}

/* Leaves */
.flower-stem::before, .flower-stem::after {
  content: '';
  position: absolute;
  width: 20px; height: 10px;
  background: #4caf50;
  border-radius: 0 100% 0 100%;
  transition: all 0.5s ease;
  transform: scale(0);
}

.flower-stem::before { top: 40%; left: -18px; transform-origin: right bottom; }
.flower-stem::after { top: 60%; right: -18px; border-radius: 100% 0 100% 0; transform-origin: left bottom; }

/* Bloom container */
.flower-bloom {
  position: relative;
  font-size: clamp(3rem, 8vh, 5rem);
  line-height: 1;
  transform-origin: bottom center;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Bud state */
.flower.is-bud .flower-bloom {
  transform: scale(0.4) translateY(20px);
  filter: grayscale(0.8) brightness(0.6);
}

.flower.is-bud .flower-stem {
  height: 30px;
}

/* Bloom state */
.flower.is-bloom .flower-bloom {
  transform: scale(1) translateY(5px);
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.4));
  animation: gentle-sway 4s infinite ease-in-out alternate;
}

.flower.is-bloom .flower-stem::before, 
.flower.is-bloom .flower-stem::after {
  transform: scale(1);
}

.flower:hover.is-bloom .flower-bloom {
  transform: scale(1.1) translateY(0);
  filter: drop-shadow(0 0 30px rgba(255,255,255,0.8));
}

@keyframes gentle-sway {
  0% { transform: rotate(-3deg); }
  100% { transform: rotate(3deg); }
}

/* ── Modal ── */
.flower-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.flower-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.flower-modal-content {
  background: linear-gradient(135deg, #1b2838, #0a0f18);
  border: 1px solid rgba(165,214,167,0.3);
  border-radius: 20px;
  padding: 50px 30px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: translateY(30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 0 40px rgba(165,214,167,0.1);
}

.flower-modal.is-visible .flower-modal-content {
  transform: translateY(0) scale(1);
}

.flower-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.3s;
}

.flower-close:hover {
  color: #fff;
}

.flower-art {
  font-size: 5rem;
  margin-bottom: 25px;
  filter: drop-shadow(0 0 30px rgba(255,255,255,0.3));
  animation: float-emoji 3s infinite ease-in-out alternate;
}

@keyframes float-emoji {
  0% { transform: translateY(-5px); }
  100% { transform: translateY(5px); }
}

.flower-message {
  font-family: 'Caveat', cursive;
  font-size: 2.2rem;
  color: var(--text-primary);
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
