/* NAVBAR CSS */

nav {
    position: relative;
    display: flex;
    height: 10vh;
    justify-content: space-between;
    box-shadow: 0 4px 8px var(--shadow-color);
    background-color: var(--navbar-bg);
    z-index: 1;
}

/* EXAM CHOICES */

.rightNav, .select-exam-board, .select-exam-type {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transform: translateY(1px);
}
.rightNav {
    gap: 30px;
}
.icon {
    width: 32px;
}

/* LOGO */

.img-logo {
    margin-left: 0.1rem;
    height: 40px;
} .logo {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    left: 4rem;
    cursor: pointer;
    width: 300px;
}
body.dark-mode .img-logo {
    filter: brightness(2.2);
}


.name {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 28px;
    color: var(--dark-text-col);
    cursor: pointer;
}

.account {
    display: flex;
    position: relative;
    gap: 2rem;
    align-items: center;
    margin-right: 4rem;
}



/* Logged In profile img */
.navProfile {
    position: relative;
    transform: translateY(4px);
}
body.dark-mode #navProfileImg{
    filter: invert(0.9);
}
.mail {
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(0);
    opacity: 0;
}

/* NOTIFICATIONS (TEACHER) */
.notifications {
    position: relative;
}
.notifications-btn {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.notifications-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0px 5px;
    background-color: var(--color-light-blue);
    color: var(--white);
    border-radius: 999px;
    box-shadow: 0 4px 8px var(--shadow-color);
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
.notifications-badge p {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-0.5px);
}
.notifications-dropdown {
    position: absolute;
    top: 52px;
    right: -10px;
    width: 340px;
    max-width: min(340px, 90vw);
    background-color: var(--navbar-bg);
    border: 1px solid var(--color-gray-border);
    border-radius: 12px;
    box-shadow: 0 10px 20px var(--shadow-color);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: all 200ms ease-in-out;
    overflow: hidden;
    z-index: 10;
}
.notifications.open .notifications-dropdown {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0px);
}
.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    color: var(--white);
}
.notifications-header h4 {
    margin: 0;
    font-weight: 700;
}
.notifications-list {
    display: flex;
    flex-direction: column;
    max-height: 320px;
    overflow-y: auto;
}
.notifications-list::-webkit-scrollbar {
    width: 8px;
}
.notifications-list::-webkit-scrollbar-thumb {
    background-color: var(--color-gray-border);
    border-radius: 10px;
}
.notifications-empty {
    padding: 14px;
    color: var(--grey);
    font-weight: 400;
}
.notification-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-gray-border);
    cursor: default;
    transition: all 120ms ease-in-out;
}
.notification-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.notification-from {
    font-weight: 700;
    color: var(--black);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notification-meta {
    font-size: 12px;
    color: var(--grey);
    white-space: nowrap;
}
.notification-msg {
    color: var(--black);
    font-size: 13px;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* Base XP container */
.XP {
  position: relative;   /* allows floating numbers to position themselves */
  display: none;
  align-items: center;
  font-size: 16px;
  gap: 5px;             /* replaces margin-inline-end */
  font-family: sans-serif;
  color: var(--black);
}

/* Keep margin for h4 titles */
.XP h4 {
  margin: 0;
}

/* Floating change text (appears next to XP-number, then floats up) */
.xp-change {
  position: absolute;
  left: 100%;           /* appear to the right of XP number */
  margin-left: 8px;
  font-size: 18px;
  font-weight: bold;
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
  animation: floatXP 1s ease forwards;
  z-index: 5;
  white-space: nowrap;
}

.xp-change.gain {
  color: var(--green);
}

.xp-change.loss {
  color: var(--red);
}

/* Float up & fade */
@keyframes floatXP {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

.navProfile #navProfileImg {
    background-color: transparent;
    border: none;
    margin-left: 10px;
    margin-right: 50px;
    cursor: pointer;
    transition: all .5s ease;
    border-radius: 50px;
}

.navProfile #navProfileImg:hover {
    transform: translate(0, -5px);
    box-shadow: 0 8px 8px var(--shadow-color);
}

#navProfileImg img{
    height: 60px;
    border-radius: 50px;
    border: 1px solid var(--black);
}

.links {
    display: flex;
    text-align: center;
}

.about-links {
    display: flex;
    transition: all 300ms ease-in-out;
    list-style: none;
    width: fit-content;
    transition: all 300ms ease-in-out;
    font-size: 1.1rem;
    align-items: center;
    gap: 150px;
}
.about-links a {
    text-decoration: none;
    color: var(--black);
}

.mainNav {
  display: flex;
  align-items: center; /* Vertical alignment */
  justify-content: center; /* Horizontal alignment (optional) */
}

/* DARK MODE */
#darkModeIcon img{
    width: 40px;
    cursor: pointer;
}
body.dark-mode #darkModeIcon {
    filter: invert(1);
}
