/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
}
a {
  text-decoration: none;
  color: inherit;
}
.hidden {
  display: none !important;
}

/* LOGIN MODAL */
.auth-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #f7f2fb; /* soft purple tint */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.auth-container {
  background: #fff;
  padding: 2em;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.auth-container input,
.auth-container button {
  width: 100%;
  padding: 0.9em;
  margin: 0.5em 0;
  border-radius: 10px;
  border: 1px solid #ccc;
}
.auth-container button {
  background: #673AB7;
  color: white;
  border: none;
}
.auth-container button:hover {
  background: #532a9b;
}

/* Guest Login Button */
.guest-login-btn {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
  font-size: 0.9rem;
  cursor: pointer;
}

.guest-login-btn:hover {
  background: #f2f2f2;
}

/* Fancy separator line */
.auth-separator {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  font-size: 0.75rem;
  color: #aaa;
}

.auth-separator span {
  flex: 1;
  height: 1px;
  background: #ddd;
}

/* LAYOUT */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR (DESKTOP) */
.sidebar {
  background: white;
  width: 230px;
  min-width: 230px;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}
.logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.logo-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: white;
  border: 3px solid #673AB7;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-text {
  margin-top: 10px;
  font-size: 2.2rem;
  font-weight: bold;
  color: #673AB7;
}

.nav-menu {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
}

.nav-menu li {
  list-style: none;
  margin: 0.7rem 0;
  font-size: 1.1rem;
}

.nav-menu a {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
}

.more-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-menu a span {
  margin-left: 10px;
}


/* ACTIVE MENU ITEM */
.nav-menu a.active {
  color: #6A0DAD;                 /* deep purple */
  font-weight: 700;
}

.nav-menu a.active::after {
  content: "";
  display: block;
  height: 3px;
  width: 30px;
  margin: 4px auto 0;
  background: #6A0DAD;            /* underline like mobile */
  border-radius: 10px;
}


.auth-mobile-style {
  text-align: center;
  padding: 32px;
}

.auth-logo {
  width: 90px;
  height: 90px;
  margin-bottom: 14px;
}

.auth-welcome {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 22px;
}

/* =========================
   FORM
========================= */
#auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#auth-form input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  outline: none;
}

#auth-form input:focus {
  border-color: #7a1fd1;
  box-shadow: 0 0 0 2px rgba(122,31,209,0.15);
}


/* =========================
   PRIMARY BUTTON
========================= */
#auth-button {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7a1fd1, #5e17b8);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

#auth-button:active {
  transform: scale(0.98);
}

/* =========================
   SWITCH LOGIN / SIGNUP
========================= */
#toggle-auth {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #666;
}

#toggle-auth a {
  color: #7a1fd1;
  font-weight: 600;
  text-decoration: none;
}

/* ----------------------------
      DESKTOP BEHAVIOR
----------------------------- */
/* DESKTOP: show all menu items, hide More button */
@media (min-width: 769px) {
  .extra {
    display: block;
  }
  .more-btn {
    display: none !important;
  }
}

/* PROFILE */
.profile-section {
  margin-top: auto;
  border-top: 1px solid #ddd;
  padding-top: 10px;
}

.profile-header {
  cursor: pointer;
  font-weight: bold;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-menu {
  list-style: none;
  margin: 0;
  padding: 0 10px;
  cursor: pointer;
}

.profile-menu.hidden {
display: none !important;
}


.profile-menu li {
  margin: 8px 0;
}

.profile-menu a {
  text-decoration: none;
  color: #333;
}

/* Desktop */
.profile-mobile {
  display: none;
}

/* MAIN CONTENT */
#main-content {
  flex: 1;
  padding: 1.5rem;
  overflow-x: hidden;
}

/* =============================== */
/* MOBILE BOTTOM NAV BAR */
/* =============================== */
@media (max-width: 768px) {

  /* Hide desktop-specific items */
  .logo,
  .desktop-only {
    display: none !important; /* hide desktop version on mobile */
  }
  .profile-header {
      display: none;
  }

  /* Hide extra nav items and profile by default */
  .extra,
  .profile-mobile {
    display: none;
  }

  /* Show extra items when activated via JS */
  .extra.show,
  .profile-mobile.show {
    display: block !important;
  }

  /* Profile icon appearance */
  .profile-mobile {
    justify-content: center;
    font-size: 1.3rem;
  }

  /* Shared profile menu styling for mobile */
  .profile-menu {
    position: absolute;
    z-index: 9999;
    bottom: 60px;
    right: 10px;
    width: 150px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 8px 0;
  }

  /* NAV BAR WRAPPER */
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    width: 100%;
    height: auto;
    border-top: 1px solid #ddd;
    padding: 0;
    display: flex;
    justify-content: center;
    background: #fff;
    z-index: 1000;
  }

  .nav-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
    justify-items: center;
  }

  .nav-menu li {
    padding: 0.7rem 0;
    font-size: 1.3rem;
  }

  .nav-menu a span {
    display: none; /* hide text labels on mobile */
  }

  /* MORE BUTTON */
  .more-btn {
    display: flex !important;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
  }

  .more-btn a {
    width: 100%;
    text-align: center;
  }

  /* Main content spacing */
  #main-content {
    padding: 1rem;
    padding-bottom: 80px; /* space for bottom nav */
    width: 100%;
  }
}



