/* Global reset for proper layout */
html {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
}

:root {
  --nav-height: 50px;
}

footer {
  margin: 0;
  padding: 0;
}

footer p {
  margin: 0;
  padding: 15px;
}
.signInModal, .signUpModal, .forgottenPasswordModal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}

.signInModal[style*="display: block"],
.signUpModal[style*="display: block"],
.forgottenPasswordModal[style*="display: block"] {
  display: block;
}

.modalIn-content, .modalUp-content, .modalForgotten-content {
  background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
  margin: 8% auto;
  padding: clamp(14px, 3.5vw, 30px);
  border-radius: 16px;
  width: min(96vw, 420px);
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(255, 152, 0, 0.3);
  position: relative;
  border: 3px solid #ffb300;
}

.modalIn-content h2, .modalUp-content h2, .modalForgotten-content h2 {
  color: #f57c00;
  text-align: center;
  margin-bottom: 25px;
  font-size: 24px;
  position: relative;
  padding-left: 40px;
}

.modalIn-content h2::before, .modalUp-content h2::before, .modalForgotten-content h2::before {
  content: '🐝';
  position: absolute;
  left: 0;
  font-size: 32px;
  animation: buzz 2s ease-in-out infinite;
}

@keyframes buzz {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(5deg); }
  50% { transform: translateY(0px) rotate(0deg); }
  75% { transform: translateY(-3px) rotate(-5deg); }
}

.modalIn-content form, .modalUp-content form, .modalForgotten-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modalIn-content label, .modalUp-content label, .modalForgotten-content label {
  color: #e65100;
  font-weight: 600;
  margin-bottom: -8px;
}

.modalIn-content input, .modalUp-content input, .modalForgotten-content input {
  padding: 10px 12px;
  border: 2px solid #ffb300;
  border-radius: 8px;
  font-size: 14px;
  background: #fffef7;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.modalIn-content input:focus, .modalUp-content input:focus, .modalForgotten-content input:focus {
  outline: none;
  border-color: #ff9800;
  box-shadow: 0 0 8px rgba(255, 152, 0, 0.4);
}

.modalIn-content form button, .modalUp-content form button, .modalForgotten-content form button {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.modalIn-content form button:hover, .modalUp-content form button:hover, .modalForgotten-content form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 124, 0, 0.4);
}

.modalIn-content form button:active, .modalUp-content form button:active, .modalForgotten-content form button:active {
  transform: translateY(0);
}

.modalIn-content form button:disabled, .modalUp-content form button:disabled, .modalForgotten-content form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.closeIn-button, .closeUp-button, .closeForgotten-button {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 32px;
  font-weight: bold;
  color: #f57c00;
  cursor: pointer;
  transition: color 0.3s, transform 0.2s;
  line-height: 1;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 2;
  font-family: inherit;
  appearance: none;
}

.closeIn-button:hover, .closeUp-button:hover, .closeForgotten-button:hover {
  color: #e65100;
  transform: rotate(90deg);
}

#forgottenPassword {
  list-style: none;
  text-align: center;
  margin-top: 15px;
}

#forgottenPassword a {
  color: #f57c00;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

#forgottenPassword a:hover {
  color: #e65100;
  text-decoration: underline;
}

.terms-text {
  margin: 16px 2px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(245, 124, 0, 0.25);
  color: #bf360c;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.terms-text a {
  color: #e65100;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-text a:hover {
  color: #bf360c;
}

@media (max-width: 420px) {
  .modalIn-content, .modalUp-content, .modalForgotten-content {
    margin: 10px auto;
    border-width: 2px;
  }

  .modalIn-content h2,
  .modalUp-content h2,
  .modalForgotten-content h2 {
    font-size: 20px;
    padding-left: 32px;
  }
}

/* Navigation Styles */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
  height: var(--nav-height);
    background-color: hsla(0, 0%, 100%, 0.135);
    backdrop-filter: blur(10px);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
}
nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
}
nav li {
    height: 50px;
}
nav a {
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    color: hsl(30, 100%, 50%);
    transition: all 0.3s ease;
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: hsl(30, 100%, 50%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
nav a:hover {
   background-color: #f0f0f06d;
   color: hsl(30, 100%, 35%);
}
nav a:hover::after {
    width: 80%;
}
nav li:first-child {
  font-size: 40px;
  font-weight: bold;
  margin-right: auto;
}

nav li:nth-child(n+2) {
  font-size: 20px;
  font-weight: bold;
}

.sidebar{
    position: fixed;
    top: 0;
    right: 0;
  height: 100vh;
  height: 100dvh;
    width: 250px;
    z-index: 999;
    background-color: hsla(0, 0%, 100%, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}
.sidebar li{
    width: 100%;
}
.sidebar a{
    width: 100%;
    padding: 22px 30px;
    font-size: 17px;
}
.menu-button{
    display: none;
}
@media(max-width: 800px){
    .hideOnMobile{
        display: none;
    }
    .menu-button{
        display: block;
    }
}
@media(max-width: 400px){
    .sidebar{
        width: 100%;
    }
}

/* Mobile: tighten sidebar menu hit areas to avoid overlap */
@media (max-width: 800px) {
  /* Let sidebar list items size to their content */
  .sidebar li {
    height: auto !important;
  }

  /* Reduce vertical padding and font-size so buttons don't overlap */
  .sidebar a {
    padding: 10px 16px !important;
    font-size: 16px !important;
    height: auto !important;
    display: flex;
    align-items: center;
    box-sizing: border-box;
  }

  /* Make the close button (first item) smaller and left-aligned */
  .sidebar li:first-child a {
    padding: 8px 12px !important;
    justify-content: flex-start;
  }

  /* Add subtle separators so each item is visually distinct */
}

/* Adjust main content for fixed nav */
#app {
  padding-top: 0;
  margin: 0;
}

.section-wrapper {
  margin: 0;
  padding: 0;
}

/* Ensure anchor scrolling accounts for the fixed nav height */
section {
  scroll-margin-top: var(--nav-height);
}

/* Mobile: improve modal sizing and close-button visibility */
@media (max-width: 600px) {
  .modalIn-content, .modalUp-content, .modalForgotten-content {
    width: calc(100% - 32px);
    max-width: none;
    margin: 6vh auto;
    padding: 18px;
    border-radius: 12px;
    max-height: 88vh;
    overflow-y: auto;
    box-sizing: border-box;
  }

  .modalIn-content h2, .modalUp-content h2, .modalForgotten-content h2 {
    font-size: 20px;
    padding-left: 36px;
    margin-bottom: 16px;
  }

  .closeIn-button, .closeUp-button, .closeForgotten-button {
    top: 12px;
    right: 18px;
    font-size: 32px;
    font-weight: bold;
    color: #f57c00;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    line-height: 1;
    transition: color 0.3s, transform 0.2s;
    border: none;
    z-index: 2;
  }

  .closeIn-button:hover, .closeUp-button:hover, .closeForgotten-button:hover {
    color: #e65100;
    transform: rotate(90deg);
  }

  /* Reduce form spacing slightly to fit small screens */
  .modalIn-content form, .modalUp-content form, .modalForgotten-content form {
    gap: 8px;
  }

  .terms-text {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
  }
}