html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f0f0f0;
  margin: 0;
}

/* Navbar Layout */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 0, 0, 0.7);
  padding: 10px 20px;
  flex-wrap: wrap;
  border-radius: 8px;
}

/* Title */
.app-title {
  color: white;
  font-size: 1.5rem;
  margin: 0;
  text-shadow: 1px 1px 2px black;
}

/* Hamburger Button */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Center menu */
.navbar-center {
  flex-grow: 1;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-menu li a:hover {
  text-decoration: underline;
}

/* Right section */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  color: white;
  font-weight: bold;
}

#loginBtn,
#logoutBtn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background-color: white;
  color: rgba(255, 0, 0, 0.7);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#loginBtn:hover,
#logoutBtn:hover {
  background-color: #ffe5e5;
}

/* Style for active link */
.nav-menu li a.active {
  background-color: #fff;
  color: rgba(255, 0, 0, 0.7);
  border-radius: 4px;
  padding: 6px 10px;
  pointer-events: none;
  font-weight: bold;
  box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.15);
}

/* Prevent hover effect on active */
.nav-menu li a.active:hover {
  text-decoration: none;
  background-color: #fff;
  color: rgba(255, 0, 0, 0.7);
}

/* Footer */
footer {
  background: #222;
  color: #fff;
  padding: 20px;
  text-align: center;
}

/* Responsive Style */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .navbar-center {
    width: 100%;
    display: none;
  }

  .navbar-center.active {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
  }

  .navbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 10px;
  }

  .app-title {
    font-size: 1.3rem;
  }
}

#loaderOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
}

/* Beautiful spinning loader */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid rgba(255, 0, 0, 0.7);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  animation: spin 1s linear infinite;
}

/* Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.language-switch {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.language-switch button {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.7), rgba(255, 0, 0, 0.2));
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switch button:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.language-switch button:active {
  transform: scale(0.95);
}