* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  font-family: 'Poppins', sans-serif; 
}

html, body { 
  height: 100%; 
}

body {
  background: url('Aquabg.jpg') repeat center center/cover;
  display: grid; 
  grid-template-rows: 80px 1fr; 
  gap: 10px; 
  padding: 10px; 
  color: #ffffff; 
  overflow: hidden; 
  position: relative;
}

@media(max-width: 768px){
  body { 
    overflow: auto; 
    height: auto; 
  }
}

body::before {
  content: ''; 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1)); 
  z-index: 0;
}

h1 { 
  text-align: center; 
  font-size: 2.5rem; 
  font-weight: 700; 
  z-index: 1; 
}

.dashboard {
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  grid-template-rows: repeat(2, 1fr); 
  gap: 10px;
  height: 100%; 
  z-index: 1;
}

@media(max-width: 900px){ 
  .dashboard { 
    grid-template-columns: repeat(2, 1fr); 
    grid-template-rows: repeat(3, 1fr); 
  } 
}

@media(max-width: 600px){ 
  .dashboard { 
    grid-template-columns: 1fr; 
    grid-template-rows: repeat(6, 1fr); 
  } 
}

.section {
  background: rgba(255,255,255,0.25); 
  border-radius: 20px; 
  backdrop-filter: blur(15px);
  padding: 15px; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.4);
}

.section h2 { 
  margin-bottom: 10px; 
  font-size: 1.2rem; 
  font-weight: 600; 
  text-align: center; 
}

.switches { 
  display: flex; 
  gap: 10px; 
}

button {
  background: rgba(255,255,255,0.4); 
  border: 2px solid #000; 
  color: #000;
  font-weight: 600; 
  padding: 8px 20px; 
  border-radius: 25px; 
  cursor: pointer;
  transition: 0.3s;
}

button.active { 
  background: #000; 
  color: #fff; 
}

.sensor-status { 
  display: flex; 
  gap: 15px; 
  justify-content: center; 
}

.sensor-status > div { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 5px;
  padding: 10px; 
  background: rgba(255,255,255,0.2); 
  border-radius: 15px; 
  min-width: 60px; 
  border: 1px solid rgba(255,255,255,0.3);
}

.status-dot { 
  width: 20px; 
  height: 20px; 
  border-radius: 50%; 
  background: #ff6b6b; 
  border: 2px solid rgba(0,0,0,0.2); 
  transition: 0.3s; 
}

.status-dot.active { 
  background: #51cf66; 
  animation: pulse 2s infinite; 
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); } 
}

.card { 
  background: rgba(255,255,255,0.3); 
  border-radius: 15px; 
  padding: 10px; 
  text-align: center; 
  width: 90px; 
  margin: 5px; 
}

.value { 
  font-size: 1.2rem; 
  font-weight: 700; 
}

.usage, .flow, .leakage { 
  display: flex; 
  justify-content: center; 
  gap: 10px; 
  flex-wrap: wrap; 
}

#resetBtn { 
  background: rgb(35, 6, 6); 
  color: #fff; 
  border: none; 
  padding: 6px 15px; 
  border-radius: 25px; 
  cursor: pointer; 
  margin-top: 5px; 
}

.social-links { 
  display: flex; 
  flex-direction: column; 
  gap: 5px; 
  align-items: center; 
  margin-top: 10px; 
}

.social-links a { 
  text-decoration: none; 
  color: #000; 
  font-weight: 600; 
  transition: 0.3s; 
}

.social-links a:hover { 
  color: #51cf66; 
  transform: scale(1.05); 
}

.social a {
  color: #c2c2c2;
  font-size: 30px;
  text-decoration: none;
}

.social a:hover {
  color: #000000;
}