/* Global Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Base Styles */
body {
  font-family: Arial, sans-serif;
  background-color: #000;
  margin: 0;
  padding-top: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header */
.header {
  background: #fff;
  width: 100%;
  padding: 10px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}
.header-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo-img {
  max-height: 50px;
}
.nav-icon-button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 15px;
  cursor: pointer;
}
/* Nav links and icons */
.nav-links {
  display: flex;
  align-items: center;
}
.nav-icon {
  width: 30px;
  height: 30px;
  margin-left: 5px;
  cursor: pointer;
}
.attractive-link {
  margin-left: 15px;
  padding: 8px 15px;
  background: red;
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.2s, background 0.3s;
}
.attractive-link:hover {
  background: darkred;
  transform: scale(1.05);
}

/* Avatar dropdown */
.avatar-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  background: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  overflow: hidden;
  z-index: 1001;
}
.dropdown-menu.open {
  display: block;
}
.dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: red;
  text-decoration: none;
}
.dropdown-menu a:hover {
  background: #f1f1f1;
}

/* Hide mobile menu/hamburger */
.hamburger,
.mobile-menu {
  display: none !important;
}
@media (max-width: 480px) {
  .header-content {
    display: flex;
    justify-content: flex-start;  /* align logo + nav all the way left */
    align-items: center;
    gap: 6px;                     /* uniform spacing between items */
    padding: 0 8px;
    flex-wrap: nowrap;
  }

  .logo-img {
    max-height: 36px;
  }

  .nav-links {
    display: flex;
    justify-content: flex-start;  /* align all icons/avatar to the left */
    align-items: center;
    flex-wrap: nowrap;              /* wrap to new line if it overflows */
    gap: 4px;                     /* replace individual margins */
    overflow: visible;
  }

  /* remove any per-item left-margins */
  .nav-links > * {
    margin-left: 0;
  }

  .nav-icon {
    width: 24px;
    height: 24px;
    /* no margin-left needed */
  }

  .attractive-link {
    padding: 4px 8px;
    font-size: 0.85em;
    white-space: nowrap;
    /* no margin-left needed */
  }

  .avatar-dropdown {
    /* no margin-left needed */
  }
  .avatar {
    width: 28px;
    height: 28px;
  }
}

/* Modal styles */
.modal-base {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}
.modal-content-base {
  background: #fff;
  margin: 10% auto;
  border-radius: 10px;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}
.modal-logo {
  display: block;
  margin: 20px auto 10px;
  max-height: 50px;
}
.modal-body-base {
  padding: 20px 30px;
}
.modal-body-base form {
  display: flex;
  flex-direction: column;
}
.modal-body-base input {
  margin-bottom: 15px;
  padding: 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.modal-body-base button {
  padding: 10px;
  font-size: 1em;
  background: red;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.modal-body-base button:hover {
  background: darkred;
}
.forgot-password-link {
  margin-top: 10px;
  text-align: center;
  display: block;
  color: red;
  text-decoration: none;
  font-size: 0.9em;
}
.forgot-password-link:hover {
  text-decoration: underline;
}
.close-base {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}
.close-base:hover {
  color: #000;
}
.error-message-base {
  color: red;
  margin-bottom: 10px;
  text-align: center;
}

/* Flash messages */
.flash-messages {
  width: 100%;
  text-align: center;
  margin-top: 60px;
  padding: 10px 0;
}
.flash-message {
  display: inline-block;
  position: relative;
  padding: 10px 20px;
  color: #fff;
  border-radius: 5px;
  margin-bottom: 10px;
}
.flash-message::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: red;
  border-radius: 5px;
  z-index: -1;
}
/* Modal backdrop */
.modal {
  display: none;               /* hidden until openModal() */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* Inner white card */
.modal-content {
  background: #fff;
  margin: 8% auto;            /* center vertically & horizontally */
  padding: 20px;
  border-radius: 8px;
  max-width: 420px;
  position: relative;
}

/* “×” close button */
.close-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 1.4em;
  color: #666;
  cursor: pointer;
}

/* Container for the three source buttons */
.upload-options {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  margin-bottom: 24px;
}

/* Each source button */
.source-btn {
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  width: 100px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease-in-out, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hover/active state */
.source-btn:hover {
  background: #eaeaea;
  transform: scale(1.05);
}

/* Icon inside each button */
.picker-grid-upload {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

/* Label under each icon */
.source-btn span {
  font-size: 0.9em;
  color: #333;
  line-height: 1.2;
}

.notification-wrapper {
  position: relative;
  display: inline-block;
  flex-wrap: nowrap;
}

.notification-bell {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  width: 32px;
  height: 32px;
}

.notification-bell.has-unread img {
  filter: drop-shadow(0 0 4px gold);
}

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

.modal-notifications {
  display: none;
  position: absolute;
  right: 0; top: 100%;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.modal-notifications.open {
  display: block;
}

.modal-notifications .modal-header {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

.modal-notifications .modal-body {
  padding: 8px 12px;
}

.notification-list {
  list-style: none;
  margin: 0; padding: 0;
}

.notification-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.notification-list li.unread {
  background: #f9f9f9;
  font-weight: bold;
}

.notification-list li .timestamp {
  display: block;
  font-size: 0.75rem;
  color: #999;
}

.empty {
  text-align: center;
  color: #666;
  padding: 16px 0;
}

