*{
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column; 
  justify-content: flex-start;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #f4f4f9;
  padding-bottom: 300px; 
}

header {
  background: linear-gradient(135deg, rgba(0, 20, 50, 1), rgba(0, 40, 80, 1));
  color: white;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s, box-shadow 0.3s;
}

header .logo {
  font-size: 36px;
  font-weight: bold;
  color: #ffffff;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-left: 15px;
  transition: color 0.3s, transform 0.3s, text-shadow 0.3s;
  font-family: 'Quicksand';
}

/* Home Logo Styling for Mobile */
.home-logo {
  display: none;
  cursor: pointer;
  margin-right: auto;
}

.home-logo img {
  margin-left: 20px;
  width: 30px;
  height: 30px;
  transition: transform 0.3s ease;
}

.home-logo:hover img {
  transform: scale(1.1);
  filter: drop-shadow(0 0 5px #00c4ff);
}

nav {
  display: flex;
  gap: 30px;
  justify-content: flex-start;  /* Ensures links align to the left */
  padding-right: 20px;
}

nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  position: relative;
  padding: 8px 0;
  transition: color 0.3s, transform 0.3s, filter 0.3s;
}

nav a::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: #00c4ff;
  left: 0;
  bottom: -3px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

nav a:hover {
  color: #00c4ff;
}

nav a:hover::after {
  transform: scaleX(1);
}

.bmi-container {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  margin-top: 5px;  
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 400px;
}

h2 {
  text-align: center;
}

.gender-selection, .unit-selection {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.gender-toggle, .unit-toggle {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.gender-btn, .unit-btn {
  padding: 10px;
  border: 1px solid #ddd;
  background-color: #f7f7f7;
  cursor: pointer;
  border-radius: 5px;
  width: 48%;
  text-align: center;
}

.gender-btn.active, .unit-btn.active {
  background-color: rgba(0, 40, 80, 1);
  color: white;
}

.input-section {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
}

label {
  display: flex;
  margin-bottom: 8px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  box-sizing: border-box;
  margin-bottom: 5px;
}

span {
  position: absolute;
  right: 10px;
  top: 65%;
  transform: translateY(-50%);
  font-size: 14px;
}

/* Imperial Height Section */
.imperial-height {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  width: 100%;
}

.height-input-group {
  display: flex;
  align-items: center;
  width: 48%;
  margin-right: 4%; 
}

.height-input-group:last-child {
  margin-right: 0; 
}

.height-input {
  width: 100%;
  padding: 10px;
  text-align: center;
  font-size: 14px;
}

/* Buttons Section */
.buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

button {
  padding: 10px;
  border: none;
  background-color: rgba(0, 40, 80, 1);
  color: white;
  cursor: pointer;
  width: 400px;
  border-radius: 5px;
  flex: 1;
}

button:hover {
  background-color: rgba(0, 40, 80, 1);
}

.reset-container {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.reset-btn {
  padding: 10px;
  border: none;
  background-color: #d9534f;
  color: white;
  cursor: pointer;
  border-radius: 5px;
}

.reset-btn:hover {
  background-color: #c9302c;
}
#result{
    margin-top:10px;
}
/* Footer Styling */
footer {
  background: linear-gradient(135deg, rgba(0, 20, 50, 1), rgba(0, 40, 80, 1));
  color: white;
  width: 100%; 
  min-height: 240px; /* Changed to min-height to make it responsive */
  text-align: center;
  margin-top: 150px;
  padding-top: 50px;  /* Added padding to give more space at the top */
}

footer p {
  margin-top: 20px;  /* Added margin to create space between the p and other content */
  margin-bottom: 20px; /* Optional: Add space below the p tag */
}

/* Rest of the footer content */
footer p a {
  text-decoration: none;
  color: #00c4ff;
}
footer h3{
    color:#fff;
}
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social-icons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}

.social-icons img:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 5px #00c4ff);
}

/* Wave Styles */
.wave {
  position: relative; 
  bottom: 0;         
  left: 0;
  right: 0;
  width: 99vw;       
  height: 80px;    
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%234a90e2" fill-opacity="1" d="M0,128L30,144C60,160,120,192,180,186.7C240,181,300,139,360,117.3C420,96,480,96,540,101.3C600,107,660,117,720,117.3C780,117,840,107,900,106.7C960,106,1020,116,1080,138.7C1140,160,1200,192,1260,197.3C1320,203,1380,181,1410,170.7L1440,160L1440,320L1410,320C1380,320,1320,320,1260,320C1200,320,1140,320,1080,320C1020,320,960,320,900,320C840,320,780,320,720,320C660,320,600,320,540,320C480,320,420,320,360,320C300,320,240,320,180,320C120,320,60,320,30,320L0,320Z"></path></svg>') no-repeat center;
  background-size: cover;
  animation: wave-animation 10s ease-in-out infinite;
  z-index: 0; 
}

/* Wave Animation */
@keyframes wave-animation {
  0% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(10px);
  }
  100% {
      transform: translateY(0);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Mobile Adjustments */
  nav {
    display: none; 
  }
  
  header .toggle-button {
    display: block; 
  }

  #sidebar {
    display: none; 
  }

  #sidebar.active {
    display: flex; 
  }

  .home-logo {
    display: inline; 
    font-size: 1.5rem;
  }

  .footer {
    padding-bottom: 30px;
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  /* Mobile Adjustments */
  nav {
    display: none; 
  }
  
  header .toggle-button {
    display: block; 
  }

  #sidebar {
    display: none; 
  }

  #sidebar.active {
    display: flex; 
  }

  .home-logo {
    display: inline; 
    font-size: 1.5rem;
    color: #00c4ff;
    cursor: pointer;
    margin-right: auto;
    margin-left: 30px; 
    text-decoration: none;
  }
  
  .bmi-container {
    width: 90%;
    margin-top: 80px;
  }

  .input-section {
    margin-bottom: 15px;
  }

  button {
    width: 100%;
    padding: 12px;
  }

  footer {
    padding: 10px;
    height: auto; /* Adjust footer height on mobile */
  }
}

@media (min-width: 769px) {
  #sidebar {
    display: none; 
  }

  header .toggle-button {
    display: none; 
  }

  nav {
    display: flex; 
  }

  .bmi-container {
    width: 400px;
  }
}

@media (max-width: 480px){
  .home-logo{
    margin-right: 15px;
  }
  header .logo{
    font-size: 25px;
  }
}