/* styles.css */

body {
    font-family: arial, sans-serif;
    margin: 0;
    padding: 0;

}

/* Style the navigation bar */
nav {
    background-color: rgb(255, 255, 255);
    display: flex;
    align-items: center;
    justify-content: space-between; /* Align items to the start and end of the container */
    padding: 5px;
    width: 100%;
    top: 0;
    background: linear-gradient(to bottom right, #D2AA6D , #EFDD6F);
    z-index: 14;
    height: 80px;
    position: fixed;
    transition: box-shadow 0.3s ease-in-out, padding 0.3s ease-in-out, height 0.3s ease-in-out;
}

.logo img {
    height: 80px;
    width: 80px;
}

.unscrolled-nav {
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
}

.scrolled-nav {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

nav .list-container {
    margin-left: auto; /* Push the list container to the right */
    justify-content: space-evenly;
}

nav ul {
    list-style-type: none;
    display: flex;
    margin-top: revert;
    padding-left: revert;
}

nav,
nav * {
  box-sizing: revert;
}

nav ul li {
    margin-right: 10px;
}

nav ul li a {
    color: #000000;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
}

nav ul li a:hover {
    text-decoration: underline;
}

.navbox {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid black;
    border-radius: 5px;
    text-decoration: none;
    color: black;
    transition: background-color 0.1s ease;
    background-color: white;

}

.navbox:hover {
    background-color: #f0f0f0;
}

/* Container for the XP bar */
.xp-bar-container {
    position: relative;
    width: 200px;  /* Adjust the width as needed */
    height: 20px;
    background-color: #f3f3f3; /* Background color of the XP bar */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 3px solid black;
}

/* The actual XP bar that fills */
.xp-bar {
    height: 100%;
    background-color: #EFDD6F; /* Color of the filled portion */
    transition: width 0.4s ease;
}

/* Tooltip that shows on hover */
.xp-tooltip {
    position: absolute;
    top: 50%;  /* Center vertically */
    left: 50%;  /* Center horizontally */
    transform: translate(-50%, -50%);  /* Ensure it is perfectly centered */
    color: black;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Show the tooltip on hover */
.xp-bar-container:hover .xp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Level circle right beside the XP bar container */
.xp-level-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #EFDD6F; /* Match the filled bar color */
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 14px;
    border: 3px solid black;
    margin-left: 5px; /* Space between bar and circle */
    z-index: 2; /* Ensure the circle is above other elements */
}


/* Ensure the XP bar doesn't overflow */
.xp-bar-nav {
    display: flex;
    align-items: center;
    z-index: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 15;
    left: 0;
    top: 0;
    width: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    max-height: 100vh; /* Adjust to leave space around the modal */
    overflow-y: hidden !important;
}


.message-item {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: background-color 0.3s;
}

.message-item:hover {
    background-color: #f0f0f0; /* Highlight on hover */
}

.message-header {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.message-content {
    margin-top: 5px;
    color: #555;
}

.unread-badge {
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 5px 12px;
    font-size: 14px;
    position: absolute;
    top: 6px;
    right: 230px;
    display: inline-block;
    border: 1px black solid;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content-messages {
    margin: 15% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    background-color: #fff;
    border-radius: 10px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.unread {
    font-weight: bold;
}

.read {
    font-weight: normal;
    color: #666;
}

/* On screens narrower than 600px (you can tweak the breakpoint)… */
@media (max-width: 600px) {
  /* Let the nav grow in height instead of forcing 80px */
  nav {
    /* Let the nav grow in height if needed, but keep items centered vertically */
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    height: auto;
  }

  .list-container {
    display: flex;
    flex-wrap: nowrap;           /* never wrap to a new line */
    justify-content: space-between; /* spread items evenly */
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .list-container li {
    flex: 1;                     /* each button takes equal share */
    margin: 0 0.25rem;           /* small gap between them */
  }
  .list-container li:first-child {
    margin-left: 0;
  }
  .list-container li:last-child {
    margin-right: 0;
  }

  .navbox {
    display: block;              /* fill the flex item */
    width: 100%;
    padding: 0.4rem 0;           /* slimmer vertical padding */
    font-size: 0.8rem;           /* smaller text */
    text-align: center;          /* center the label */
    white-space: normal;         /* allow wrapping inside if it overflows */
    box-sizing: border-box;      /* include padding in the width */
  }

  /* Keep the XP‑circle still sitting in the nav bar, but move it below the logo if needed */
  .xp-bar-nav {
    order: -1;               /* put it above the buttons list */
    margin-bottom: 0.5rem;
  }
}


@media (max-width: 400px) {
  .list-container {
    justify-content: center; /* center the wrapped rows */
  }
  .list-container li a.navbox {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  .navbox {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }
}

#scanModal .modal-content {
  z-index: 1101 !important;
}

.modal-backdrop.show {
  z-index: 1040 !important;
}

/* 2) Raise the modal itself above the backdrop */
.modal.show {
  z-index: 1100 !important;
}

