* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

main a {
  color: #1a73e8;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

main a:hover,
main a:focus {
  text-decoration: underline;
  color: #174ea6;
}

footer {
  background-color: #111827;
  color: white;
  width: 100%;
}

footer a {
  text-decoration: none;
  color: inherit;
}
  

header {
  /*padding: 20px 20px;*/
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  height: 40px;
  margin-right: 10px;
}

.site-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #030244;
}


.nav-scroll-wrapper {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
}

.nav-bar {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 0;
  margin: 0;
  background-color: transparent;
}

.nav-bar li {
  position: relative;
}

.nav-bar a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 14px 10px;
  color: #555;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s ease;
}

.nav-bar a i {
  margin-right: 6px;
}

.nav-bar a:hover {
  color: #000;
}

/* Dropdown */
.nav-bar-dropdown .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  z-index: 10;
  padding: 5px 0;
}

.nav-bar-dropdown .dropdown-content li {
  list-style: none;
}

.nav-bar-dropdown .dropdown-content a {
  color: #555;
  padding: 10px 16px;
  display: block;
  font-size: 14px;
}

.nav-bar-dropdown .dropdown-content a:hover {
  background-color: #f9f9f9;
  color: #000;
}

.nav-bar-dropdown:hover .dropdown-content {
  display: block;
}

.user-profile {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  padding-right: 20px;
  flex-wrap: wrap;
}

.user-profile span {
  flex-shrink: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-btn,
.register-btn,
.logout-btn {
  padding: 8px 16px;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.login-btn {
  background-color: #3b82f6;
}

.login-btn:hover {
  background-color: #2563eb;
}

.register-btn {
  background-color: #10b981;
}

.register-btn:hover {
  background-color: #059669;
}

.logout-btn {
  background-color: #ef4444;
}

.logout-btn:hover {
  background-color: #dc2626;
}

.user-dropdown-menu {
  position: absolute;
  top: 50px;
  right: 0;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: none;
  flex-direction: column;
  width: 160px;
  z-index: 1001;
}

.user-dropdown-menu a {
  padding: 12px 16px;
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.user-dropdown-menu a:last-child {
  border-bottom: none;
}

.user-dropdown-menu a:hover {
  background-color: #f3f4f6;
}

.notification-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  color: white;
  border-radius: 50%;
  font-size: 0.7rem;
  padding: 2px 6px;
}

.dropdown-menu-notifications {
  position: absolute;
  top: 50px;
  right: 0;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  width: 280px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
  padding: 8px 0;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background-color: #f9fafb;
}

.notification-text {
  margin: 0;
  font-size: 14px;
  color: #1f2937;
  line-height: 1.4;
}

.notification-text a {
  text-decoration: none;
  color: inherit;
}

.notification-item.empty {
  justify-content: center;
  color: #9ca3af;
}

.notification-content {
  display: flex;
  flex-direction: column;
}

.notification-timestamp {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.site-announcement {
  background-color: #fff3cd;
  color: #856404;
  padding: 10px;
  text-align: center;
  font-size: 0.95rem;
  border-bottom: 1px solid #ffeeba;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  background: #2a2b2ad8;
  color: #fff;
  font: 600 0.875rem/1 "Inter", sans-serif;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:focus {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.tile:hover {
  text-decoration: none;
}

.refresh-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
}

.refresh-btn:hover {
  background: #e5e7eb;
}

.last-refreshed {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Go back button */
.go-back-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(145deg, #6e7bff, #4e59d1);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.go-back-btn i {
  margin-right: 8px;
}

.go-back-btn:hover {
  background: linear-gradient(145deg, #4e59d1, #6e7bff);
  transform: translateY(-2px);
}

.go-back-btn:active {
  transform: translateY(0);
}

/* Cookie Banner */
#cookie-banner {
  background-color: #f1f1f1;
  padding: 15px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  border-top: 1px solid #ccc;
  z-index: 1000;
}

#cookie-banner button {
  margin: 0 5px;
  padding: 6px 12px;
}

/* Cookie Modal */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cookie-modal-content {
  background: #fff;
  padding: 20px;
  max-width: 400px;
  margin: 100px auto;
  border: 1px solid #ccc;
  border-radius: 8px;
  text-align: left;
}

/* Slider On-Off Switch */

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  margin-left: 10px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: #10b981;
}

input:checked+.slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

/* Popup Window */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #888;
  width: 50%;
  max-width: 500px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
}


/* Mobile styles */
.nav-toggle {
  display: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
}

@media (max-width: 1024px) {
  #hi-username-text {
    display: none;
  }

  .header-container {
    padding: 10px 10px 10px 10px;
    gap: 5px;
  }

  .nav-scroll-wrapper {
    width: 100%;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .nav-bar {
    flex-direction: column;
    gap: 0;
    display: none;
    width: 100%;
    background: white;
    position: absolute;
    top: 60px;
    left: 0;
    border-top: 1px solid #eee;
  }

  .nav-bar.show {
    display: flex;
  }

  .nav-bar li {
    width: 100%;
  }

  .nav-bar a {
    width: 100%;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
  }

  .nav-bar-dropdown .dropdown-content {
    position: static;
    box-shadow: none;
    background: #fafafa;
  }

  .nav-bar-dropdown:hover .dropdown-content {
    display: none;
  }

  .nav-bar-dropdown.open .dropdown-content {
    display: block;
  }

  .nav-toggle {
    display: block;
  }

  .user-profile {
    padding-right: 0;
    width: 100%;
    flex-wrap: nowrap;
    gap: 5px;
  }

  .go-back-btn {
    font-size: 14px;
    padding: 10px 16px;
  }

  .login-btn,
  .register-btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: clamp(12px, 1.4vw, 14px);
    /* Scales with screen size */
    padding: 0.5em 1em;
  }

  #footer-options {
    font-size: 12px;
  }
}