body {
  font-family: Arial, sans-serif;
  background-color: #00FFFF;
  text-align: center;
  padding: 20px;
  margin: 0;
}

h1 {
  color: #005f5f;
  margin-bottom: 10px;
}

.pouring-img {
  position: relative;
  top: 20px;
  left: -40px;
  margin-bottom: -20px;
  width: 180px;
  height: auto;
  animation: sway 2s infinite ease-in-out;
  z-index: 10;
}

@keyframes sway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

.main-area {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.pipe {
  width: 80px;
  height: 40px;
  background: #555;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.3);
}

.container {
  margin: 0 auto;
  border: 5px solid #004d40;
  border-radius: 10px;
  width: 270px;
  position: relative;
  height: 380px;
  background-color: white;
  user-select: none;
}

.tap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 420px;
  width: 30px;
  height: 30px;
  background: #888;
  border-radius: 50% 50% 40% 40%;
  border: 3px solid #444;
  z-index: 5;
}

.tap::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 10px;
  width: 10px;
  height: 15px;
  background: #555;
  border-radius: 2px;
}

.collection-tank {
  width: 320px;
  height: 150px;
  background: #e0f7fa;
  margin: 160px auto 0 auto;
  border: 5px solid #004d40;
  border-radius: 50%/30%;
  position: relative;
  overflow: hidden;
}

.water-level {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  background-color: #0288d1;
  transition: height 0.5s ease;
}

.layer {
  height: 60px;
  line-height: 60px;
  color: white;
  font-weight: bold;
  position: relative;
  border-radius: 4px;
  transition: background-color 0.4s ease;
}

.gap {
  height: 20px;
  background: #e0f0f2;
  position: relative;
}

.gravel { background-color: #6d4c41; }
.sand { background-color: #fbc02d; color: black; }
.charcoal { background-color: #212121; }
.ro { background-color: #90ee90; }
.clean { background-color: #0288d1; color: white; }

.drop-container {
  position: absolute;
  width: 12px;
  height: 14px;
  transition: top 1s ease, opacity 1s ease;
  z-index: 10;
}

.circle-drop {
  width: 10px;
  height: 10px;
  position: relative;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.dust-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.8;
  z-index: 2;
}

.buttons {
  margin-top: 20px;
}

button {
  padding: 10px 20px;
  font-size: 16px;
  margin: 0 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.start { background-color: #4caf50; color: white; }
.reset { background-color: #f44336; color: white; }

.popup {
  position: fixed;
  top: 100px;
  right: 30px;
  width: 260px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #004d40;
  border-radius: 8px;
  padding: 12px;
  color: #004d40;
  font-weight: bold;
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.popup.visible {
  opacity: 1;
  pointer-events: auto;
}
