:root {
  --bg-gradient: radial-gradient(circle at center, #f8fafc 0%, #cbd5e1 100%);
  --text-color: #1e293b;

  --sand-color: #d97706;
  --chlorine-color: #10b981;
  --bacteria-color: #e11d48;

  --filter-pp: #f8fafc;
  --filter-carbon: #334155;
  --filter-ro: #0ea5e9;
  --filter-carbon-post: #0f172a;
}


#mobile-container {
  width: 100vw;
  height: 100vh;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}

#mobile-container #subtitle-container {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  z-index: 90;
  pointer-events: none;
}

#mobile-container .subtitle-zh {
  font-size: 4.5vw;
  font-weight: 700;
  color: #0f172a;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
  letter-spacing: 1px;
  margin-bottom: 5px;
}

#mobile-container .subtitle-en {
  font-size: 2.8vw;
  font-weight: 400;
  color: #475569;
  letter-spacing: 0.5px;
}

#mobile-container .scene {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
}

#mobile-container #scene-intro {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

#mobile-container .main-drop {
  width: 40vw;
  height: 40vw;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  box-shadow: inset 10px 20px 30px rgba(100, 116, 139, 0.2),
    10px 10px 20px rgba(100, 116, 139, 0.1);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

#mobile-container .micro-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
}

#mobile-container .filter-station {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 25vw;
  height: 12vw;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.8);
  touch-action: manipulation;
}

#mobile-container .f-pp {
  top: 12vh;
  background: repeating-linear-gradient(
    0deg,
    var(--filter-pp),
    var(--filter-pp) 10px,
    #e2e8f0 10px,
    #e2e8f0 12px
  );
}

#mobile-container .f-carbon-pre {
  top: 28vh;
  background: var(--filter-carbon);
  background-image: radial-gradient(#475569 15%, transparent 16%),
    radial-gradient(#475569 15%, transparent 16%);
  background-size: 10px 10px;
  background-position: 0 0, 5px 5px;
  border-color: #1e293b;
}

#mobile-container .f-ro {
  top: 44vh;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
  border-color: #bae6fd;
}
#mobile-container .f-ro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.3) 2px,
    rgba(255, 255, 255, 0.3) 4px
  );
  z-index: 0;
  pointer-events: none;
}

#mobile-container .f-carbon-post {
  top: 60vh;
  background: var(--filter-carbon-post);
  background-image: linear-gradient(
      135deg,
      rgba(6, 182, 212, 0.2) 0%,
      transparent 100%
    ),
    radial-gradient(#1e293b 15%, transparent 16%);
  background-size: 100% 100%, 8px 8px;
  border-color: #06b6d4;
}

#mobile-container .filter-label {
  position: absolute;
  right: 110%;
  transform: translateY(-50%);
  top: 50%;
  font-size: 3.2vw;
  font-weight: bold;
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

#mobile-container .tooltip {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 3vw;
  line-height: 1.4;
  width: 55vw;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  pointer-events: none;
}
#mobile-container .tooltip.active {
  opacity: 1;
  visibility: visible;
}
#mobile-container .tooltip-title {
  font-weight: bold;
  color: #38bdf8;
  margin-bottom: 4px;
  font-size: 3.2vw;
}

#mobile-container .pipe-line {
  position: absolute;
  width: 4vw;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.3);
  border-left: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  z-index: 10;
  backdrop-filter: blur(2px);
  overflow: hidden;
}
#mobile-container .pipe-line.p1 {
  top: 80;
  height: 12vh;
  background: rgba(148, 163, 184, 0.4);
}
#mobile-container .pipe-line.p2 {
  top: 12vh;
  height: 16vh;
  background: rgba(186, 230, 253, 0.4);
}
#mobile-container .pipe-line.p3 {
  top: 28vh;
  height: 16vh;
  background: rgba(56, 189, 248, 0.4);
}
#mobile-container .pipe-line.p4 {
  top: 44vh;
  height: 16vh;
  background: rgba(14, 165, 233, 0.4);
}
/* 修改p5水管高度，贯穿后置活性炭并多出一部分 */
#mobile-container .pipe-line.p5 {
  top: 60vh;
  height: 20vh;
  background: rgba(6, 182, 212, 0.4);
}

#mobile-container .pipe-flow {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg width="20" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M 5 12 L 10 22 L 15 12" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="2.5" stroke-linecap="round"/></svg>');
  background-repeat: repeat-y;
  background-position: center 0;
  animation: flowArrows 1.5s linear infinite;
  opacity: 0.8;
}
@keyframes flowArrows {
  from {
    background-position: center 0;
  }
  to {
    background-position: center 40px;
  }
}

/* 修改废水管为横向 */
#mobile-container .waste-pipe {
  position: absolute;
  width: 18vh;
  height: 3vw;
  background: rgba(255, 255, 255, 0.3);
  border-left: 2px solid rgba(255, 255, 255, 0.8);
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
}
#mobile-container .waste-label {
  position: absolute;
  left: calc(100% + 2vw); /* 调整废水标签位置适配横向水管 */
  top: 50%;
  transform: translateY(-50%);
  font-size: 3vw;
  font-weight: bold;
  color: #fff;
  background: rgba(220, 38, 38, 0.8);
  padding: 4px 8px;
  border-radius: 6px;
}

#mobile-container .particle {
  position: absolute;
  border-radius: 50%;
  z-index: 15;
  pointer-events: none;
}
#mobile-container .p-sand {
  width: 3vw;
  height: 3vw;
  background: var(--sand-color);
  border-radius: 3px;
  transform: rotate(45deg);
}
#mobile-container .p-chlorine {
  width: 2.2vw;
  height: 2.2vw;
  background: var(--chlorine-color);
}
#mobile-container .p-bacteria {
  width: 2.5vw;
  height: 2.5vw;
  background: var(--bacteria-color);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

#mobile-container .glass-container {
  position: absolute;
  left: 50%;
  bottom: 15%;
  transform: translateX(-50%);
  width: 22vw;
  height: 30vw;
  opacity: 0;
  z-index: 20;
}
#mobile-container .glass {
  width: 100%;
  height: 100%;
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-top: none;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.5)
  );
  position: relative;
  overflow: hidden;
}
#mobile-container .glass-water {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(6, 182, 212, 0.5);
}

#mobile-container .ambient-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 0;
  opacity: 0.4;
}
