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

body {
  font-family: system-ui, sans-serif;
  background: #f8fafc;
  color: #111827;
}

/* SECTION */
.visualizer-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
}

.title {
  font-size: 1.6rem;
  margin-bottom: 20px;
}

/* VISUALIZER */
.visualizer {
  position: relative;
  height: 320px;
  max-width: 420px;
  margin: 0 auto;
  overflow: hidden;          
}


/* CAR */
.car {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  z-index: 5;
  transition: filter 0.4s ease, transform 0.4s ease;
}

/* PIPE */
.pipe {
  position: absolute;
  bottom: 0;
  height: 180px;
  background: #e5e7eb;
  overflow: hidden;
  border-radius: 4px;
}

.pipe.thin {
  width: 8px;
  left: 42px;
}

.pipe.thick {
  width: 50px;
  right: 0;
}

/* WATER */
.water {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0;
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.4s ease;
  overflow: hidden;
}

/* WAVE EFFECT */
.water::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  width: 200%;
  height: 24px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  animation: wave 3s linear infinite;
}

@keyframes wave {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* CONTROLS */
.controls {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.level-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: white;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease, color 0.3s ease;
}

.level-btn.active {
  background: #2563eb;
  color: white;
}

.level-btn:active {
  transform: scale(0.96);
}

/* TEXT */
.depth-text {
  margin-top: 16px;
  font-size: 0.95rem;
  color: #374151;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .visualizer {
    transform: scale(0.85);
    padding: 0 24px;
  }

  .car {
    width: 200px;
  }

  .controls {
    flex-direction: column;
  }
}



/* WATER OVER CAR (TRANSPARENT) */
.car-water {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 0;
  pointer-events: none;

  z-index: 7;
  mix-blend-mode: multiply;

  transition: height 0.4s ease, background 0.4s ease;
}

.car {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  z-index: 5;
  transition: filter 0.4s ease, transform 0.4s ease;
}



/* PAGE CONTENT (outside wrapper) */
.page-header {
  text-align: center;
  margin: 40px 20px 20px;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #111;
}

.subtitle {
  color: #555;
  font-size: 15px;
}

/* INFO SECTION */
.info {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
  color: #444;
  line-height: 1.6;
}

.info h3 {
  margin-bottom: 10px;
  color: #222;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 13px;
  color: #777;
  border-top: 1px solid #eee;
}

