:root {
  --primary-color: #32a4dd;
  --secondary-color: #e67d03;
  --text-color: #333;
  --background-color: #8cbdd6;
  --card-background: #dcddde;
  --shadow-color: rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
  background: var(--background-color);
  background: linear-gradient(180deg,rgba(140, 189, 214, 1) 40%, rgba(0, 102, 153, 1) 100%);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  width: 100vw; /* Full viewport width */
}

/* Page Wrapper */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 10rem;
  width: 100%;
}

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 7%;
  background-color: var(--card-background);
  box-shadow: 0 2px 15px var(--shadow-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.navbar-logo {
  height: 5rem;
}

.navbar-nav {
  display: flex;
  gap: 2rem;
}

.navbar-nav a {
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.navbar-nav a:hover {
  color: var(--primary-color);
}

.icon {
  width: 1.2rem;
  height: 1.2rem;
}

#hamburger-menu {
  display: none;
}

/* Main Container Styles */
.mainContainer {
  flex: 1;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 5%;
  gap: 2rem;
  max-width: 100%;
}

.containerLeft,
.containerRight {
  flex: 0 0;
}

.containerMiddle {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* Test Container Styles */
#test {
  background-color: var(--card-background);
  margin-top: -10px;
  border-radius: 1rem;
  padding: 1.3rem;
  box-shadow: 0 8px 30px var(--shadow-color);
  width: 100%;
}

.contentOne {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.textArea1 {
  background-color: rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
  border-radius: 0.8rem;
  text-align: center;
}

.msArea {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 500;
}

.contentTwo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.textArea2 {
  text-align: center;
  position: relative;
}

.meter {
  width: 100%;
  max-width: 350px;
  height: auto;
}

.containerMeter {
  position: absolute;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.meterText {
  font-size: 2rem;
  font-weight: 600;
}

.unit {
  font-size: 1rem;
  opacity: 0.7;
  font-weight: 500;
}

.btnContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#startStopBtn {
  background-color: var(--primary-color);
  color: white;
  padding: 0.4rem 2rem;
  border-radius: 0.5rem;
  text-align: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 500;
  transition: background-color 0.3s;
  min-width: 200px;
  margin-top: 5px;
}

#startStopBtn:before {
  content: 'Start';
}

#startStopBtn.running:before {
  content: 'Stop';
}

#startStopBtn:hover {
  background-color: #0c5ebd;
}

#startStopBtn.running {
  background-color: var(--secondary-color);
}

#startStopBtn.running:hover {
  background-color: #e63737;
}

#downloadBtn button {
  padding: 0.5rem 2rem;
  margin-top: 5px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

#downloadBtn button:hover {
  background-color: #0c5ebd;
}

.contentThree {
  text-align: center;
  margin-top: 1rem;
}

#ipArea {
  font-size: 1rem;
  opacity: 0.7;
  margin-top: -15px;
}

/* Footer Styles */
.footer {
  background: white;
  padding: 0.7rem;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  margin-top: auto;
  width: 100%;
}

.footer p {
  color: #666;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .containerLeft,
  .containerRight {
    flex: 0 0 150px;
  }
}

@media (max-width: 992px) {
  .navbar {
    padding: 1.4rem 4%;
  }

  .mainContainer {
    padding: 2rem 4% 2rem;
  }

  .containerLeft,
  .containerRight {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar-nav {
    position: absolute;
    top: 100%;
    right: -100%;
    background-color: var(--card-background);
    width: 18rem;
    height: 100vh;
    flex-direction: column;
    padding: 2rem;
    transition: right 0.3s;
    box-shadow: -5px 0 15px var(--shadow-color);
  }

  .navbar-nav.active {
    right: 0;
  }

  #hamburger-menu {
    display: flex;
    color: var(--text-color);
  }

  .contentTwo {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .meter {
    max-width: 350px;
  }

  .meterText {
    font-size: 1.8rem;
  }

  .containerMeter {
    top: 65%;
  }
}

@media (max-width: 450px) {
  .navbar-logo {
    height: 2.5rem;
  }

  #test {
    padding: 1rem;
  }

  .meterText {
    font-size: 1.5rem;
  }

  .meter {
    max-width: 300px;
  }

  .containerMeter {
    top: 65%;
  }
}

