/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #070b23;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Logo (left) */
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #0ff;
}

.logo a {
  color: #0ff;
  text-decoration: none;
}

/* Center nav links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 7px;
}

.nav-links a {
  color: whitesmoke;
  text-decoration: none;
  font-size: 17px;
}

.nav-links a:hover {
  color: #0ff;
}

/* Right actions: login, signup, profile */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.signup-btn {
  background-color: #0ff;
  color: #000;
  padding: 6px 12px;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}

.nav-actions-links {
  color: whitesmoke;
  font-size: 17px;
}

.nav-actions a {
  text-decoration: none;
  white-space: nowrap;
}

.nav-actions a:hover {
  color: #0ff;
}

.signup-btn:hover {
  background-color: #00c9c9;
}

.hamburger {
  display: none; /* hide by default */
}

@media (max-width: 800px) {
  .hamburger {
    display: block;
    font-size: 28px;
    cursor: pointer;
    color: #0ff;
    z-index: 1001;
  }

  .mobile-nav {
    display: none;
    flex-direction: column;
    background-color: #070b23;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;

  }

  .mobile-nav.active {
    display: flex;
  }

  .mobile-nav .nav-links,
  .mobile-nav .nav-actions {
    display: flex !important; /* force show in mobile dropdown */
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
  }

  
  /* Force vertical layout */
  .nav-links,
  .nav-actions {
    position: static;      /* remove absolute from desktop */
    transform: none;       /* remove translateX from desktop */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a,
  .nav-actions a {
    display: block;
    width: 100%;
    padding: 10px 0;
    color: white;
    text-align: center;
  }

  /* Smaller signup button in mobile */
  .nav-actions .signup-btn {
    width: auto;
    min-width: 120px;
    max-width: 160px;
  }

  .mobile-nav a {
    color: white;
    padding: 0.75rem;
    text-align: center;
  }
}
/* Floating Molecules */
.molecule {
  position: absolute;
  width: 40px;
  height: 40px;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/Water_droplet_icon_blue.svg/120px-Water_droplet_icon_blue.svg.png'); 
  background-size: contain;
  background-repeat: no-repeat;
  animation: floatMolecule linear infinite;
  z-index: 0;
}

@keyframes floatMolecule {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotate(360deg);
    opacity: 0.6;
  }
}

.molecule:nth-child(1) { left: 10%; top: 20%; animation-duration: 8s; animation-delay: 0s; }
.molecule:nth-child(2) { left: 50%; top: 70%; animation-duration: 10s; animation-delay: 2s; }
.molecule:nth-child(3) { left: 80%; top: 40%; animation-duration: 12s; animation-delay: 4s; }
.molecule:nth-child(4) { left: 30%; top: 90%; animation-duration: 15s; animation-delay: 1s; }

header {
  text-align: center;
  margin-bottom: 20px;
  background: linear-gradient(to right, #2a2a72, #009ffd);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  padding-top: 50px;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
  align-items: center;
}

.controls {
  background-color: #1e293b;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.3);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.controls label,
.controls select,
.controls button {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  font-size: 16px;
  font-weight: bold;
}

select {
  background-color: #334155;
  color: #f8fafc;
}

button {
  background-color: #0ea5e9;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0284c7;
}

.lab-area {
  position: relative;
  min-height: 320px;
  background-color: #1e293b;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  border: 2px solid #334155;
  width: 100%;
  max-width: 700px;
}

.beaker-container {
  width: 150px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.beaker {
  width: 80px;
  height: 120px;
  background-color: transparent;
  border: 4px solid #94a3b8;
  border-top: none;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
  position: relative;
}

.beaker-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0px;
  background-color: #00f0ff;
  transition: height 1s ease-in-out;
  z-index: 1;
}

.test-tube {
  width: 60px;
  height: 150px;
  border: 2px solid #94a3b8;
  border-radius: 10px;
  text-align: center;
  line-height: 150px;
  cursor: grab;
  user-select: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  font-weight: bold;
  color: #fff;
  background-color: #ddd;
  position: relative;
}

.test-tube::before {
  content: 'Test Tube';
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 14px;
  font-weight: normal;
}

#instructionBox {
  position: fixed;
  top: 135px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  padding: 12px 20px;
  border: 2px solid #0284c7;
  border-radius: 10px;
  text-align: center;
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 500;
  z-index: 999;
  max-width: 90%;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}


@media (min-width: 768px) {
  .container {
    flex-direction: column;
    align-items: center;
  }

  .lab-area {
    flex-direction: row;
  }
}

/* ***************************************** */
.complete-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.complete-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-icon {
  font-size: 20px;
}

.btn-text {
  white-space: nowrap;
}