:root {
  --game-bg: linear-gradient(180deg, #b0bec5 0%, #e0f2f1 45%, #c8e6c9 85%, #a5d6a7 100%);
}

.rain-field {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Sky Header & Interactive Cloud */
.sky-header {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 25;
  pointer-events: none;
}

.rainbow-arc {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: min(20vw, 110px);
  line-height: 1;
  filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 0.45));
  animation: rainbow-shimmer 2.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 5;
}

@keyframes rainbow-shimmer {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.9; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 1; }
}

.cloud-btn {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 40px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.cloud-btn:hover {
  transform: scale(1.06);
}

.cloud-btn:active {
  transform: scale(0.92);
}

.cloud-btn:focus-visible {
  outline: 4px solid #ffb300;
  outline-offset: 4px;
}

.sun-icon {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: min(12vw, 55px);
  line-height: 1;
  animation: sun-spin 12s linear infinite;
  filter: drop-shadow(0 4px 10px rgba(255, 179, 0, 0.4));
}

@keyframes sun-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cloud-icon {
  font-size: min(22vw, 110px);
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.1));
  animation: cloud-float 3s infinite ease-in-out;
}

@keyframes cloud-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.cloud-hint {
  position: absolute;
  bottom: -4px;
  font-size: 26px;
  opacity: 0.7;
  animation: drop-pulse 1.6s infinite ease-in-out;
}

@keyframes drop-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(6px); opacity: 0.85; }
}

/* Rain Area & Droplets */
.rain-area {
  position: absolute;
  inset: 0;
  z-index: 10;
}

.drop-btn {
  position: absolute;
  top: 0;
  left: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  line-height: 1;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  z-index: 15;
  touch-action: none;
  will-change: transform;
}

.drop-btn:focus-visible {
  outline: 3px solid #ffb300;
  border-radius: 50%;
}

.drop-golden {
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
}

/* Splash and Ripple animations */
.splash-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 30;
}

.water-ripple {
  position: absolute;
  width: 50px;
  height: 20px;
  border: 3px solid rgba(129, 212, 250, 0.8);
  border-radius: 50%;
  pointer-events: none;
  animation: ripple-expand 0.65s ease-out forwards;
}

@keyframes ripple-expand {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.splash-particle {
  position: absolute;
  font-size: 24px;
  pointer-events: none;
  animation: splash-burst 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes splash-burst {
  0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
  100% { transform: translate(var(--tx, 0px), var(--ty, -50px)) scale(1.2); opacity: 0; }
}

/* Meadow and Flower Bed */
.meadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  background: linear-gradient(180deg, #66bb6a 0%, #388e3c 100%);
  border-radius: 36px 36px 0 0;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
  z-index: 20;
  overflow: hidden;
}

.grass-decor {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  font-size: 20px;
  opacity: 0.5;
  pointer-events: none;
}

.flower-bed {
  display: flex;
  gap: clamp(4px, 1.8vw, 12px);
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  padding: 0 12px;
  flex-wrap: nowrap;
  max-height: 85px;
  overflow-x: auto;
  overflow-y: hidden;
  z-index: 2;
  scrollbar-width: none;
}

.flower-bed::-webkit-scrollbar {
  display: none;
}

.flower-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  font-size: clamp(28px, 6.5vw, 46px);
  line-height: 1;
  flex-shrink: 0;
  animation: bloom-grow 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.flower-btn:hover,
.flower-btn:active {
  transform: scale(1.25) rotate(8deg);
}

.flower-btn:focus-visible {
  outline: 3px solid #ffee58;
  border-radius: 50%;
}

@keyframes bloom-grow {
  0% { transform: scale(0.1) translateY(20px); opacity: 0; }
  60% { transform: scale(1.2) translateY(-6px); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .rainbow-arc,
  .sun-icon,
  .cloud-icon,
  .cloud-hint,
  .flower-btn,
  .splash-particle,
  .water-ripple {
    animation: none !important;
    transition: none !important;
  }
}
