.mainbackground {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 85px;
  height: 100vh;
  background-color: rgb(23, 23, 23);
  border-right: 1px solid rgb(87, 87, 87);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.sideup {
  position: absolute;
  top: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.sidedown {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 85px;
  width: calc(100% - 85px);
  height: 70px;
  background-color: rgb(23, 23, 23);
  border-bottom: 1px solid rgb(87, 87, 87);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  z-index: 150;
}

/* ---------- LEFT SIDE (logo + search) ---------- */
.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0; /* allows the search bar to shrink */
}

/* logo */
.logo {
  height: 40px;
  width: auto;
  margin-left: 5px;
  margin-top: 5px;
}

/* search form */
.AIform {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 480px;
  max-width: clamp(260px, 40vw, 850px);
  margin-right: 20px;
}

.askAI {
  width: 100%;
  height: 34px;
  border-radius: 100px;
  padding-left: 20px;
  padding-right: 40px;
  font-size: 15px;
  box-shadow: 0 0 0 4px rgb(58, 58, 58);
  border: 2px solid rgb(77, 220, 211);
  background-color: rgb(36, 36, 36);
  color: white;
  transition: max-width 0.2s ease, width 0.2s ease;
}

.AIsubmit {
  position: absolute;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgb(77, 220, 211);
  background-color: rgb(77, 220, 211);
  cursor: pointer;
}

/* ---------- RIGHT SIDE (dashboard + user + notif) ---------- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 0 0 auto;
}

.dashboard {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 35px;
  padding: 0 14px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 13px;
  border: 1px solid rgb(67, 186, 176);
  color: rgb(67, 186, 176);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  margin-right: -10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  color: rgb(82, 235, 223);
  font-size: 16px;
  margin-right: 0px;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgb(67, 186, 176);
  object-fit: cover;
}

.notification img {
  display: block;
  margin-right: 45px;
}

/* ---------- SLIDER ---------- */
.low3sliderY {
  position: fixed;
  top: 70px;
  left: 85px;
  bottom: -10px;
  width: 241px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 30px;
  padding: 20px 15px 30px 15px;
  background: rgba(0, 0, 0, 0.3);
  scroll-behavior: smooth;
  box-sizing: border-box;
  justify-content: flex-start;
  z-index: 120;
}

/* your existing card style: replace #low3slideY with .low3card */
.low3card {
  text-align: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 200px;
  height: 200px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgb(140, 140, 140);
  border-radius: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-size: 25px;
  font-weight: 300;
  color: rgb(82, 235, 223);
  cursor: pointer;
  transition: background-color 0.4s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.low3card:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.01);
  box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.3);
}

.group {
  display: none;          /* hidden by default */
  flex-direction: column;
  align-items: center;
  gap: 30px;              /* same spacing as your container */
  width: 100%;
}

.low3sliderY::-webkit-scrollbar {
  width: 10px;
}

.low3sliderY::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.low3sliderY::-webkit-scrollbar-thumb {
  background: #9adad1;
  border-radius: 10000px;
}

.low3sliderY::-webkit-scrollbar-thumb:hover {
  background: #83b9b2;
}

/* ---------- ICON FLIP EFFECT ---------- */
.sideicon {
  width: 60px;
  height: 60px;
  perspective: 1000px;
}

.flip-box {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
  border-radius: 20%;
}

.flip-front,
.flip-back {
  cursor: pointer;
  position: absolute;
  inset: 0;
  border-radius: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  background-color: rgb(59, 59, 59);
}

.flip-front img {
  width: 30px;
  height: auto;
}

.flip-back {
  transform: rotateY(180deg);
  color: rgb(82, 235, 223);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  text-align: center;
}

.sideicon:hover .flip-box {
  transform: rotateY(180deg);
}

.sideimg2 { position: absolute; left: 18px; }
.sideimg3 { position: absolute; left: 18px; }

#competition { font-size: 10px; }
#leaderboard { font-size: 10px; }

/* ---------- Z-INDEX ORDER ---------- */
.mainbackground { z-index: 0; }
.low3sliderY { z-index: 120; }
.navbar { z-index: 150; }
.sidebar { z-index: 200; }


/* Fills everything not covered by navbar (70) + sidebar (85) + slider (241) */
.content-region {
  position: fixed;
  top: 70px;                          /* below navbar */
  left: calc(85px + 241px);           /* to the right of sidebar + slider */
  right: 0;                           /* reach the right edge */
  bottom: 0;                          /* reach the bottom */
  overflow: auto;                     /* scroll this area independently */
  z-index: 110;                       /* under navbar & sidebar, over bg */
  padding: 24px;
  box-sizing: border-box;
}

/* THIS is your dark rounded box */
.content {
  min-height: 100%;                   /* ✅ fill to bottom, expand if needed */
  background: rgba(0,0,0,0.35);       /* ✅ same brightness as before */
  border: 1px solid rgb(87, 87, 87);
  border-radius: 16px;
  backdrop-filter: blur(2px);
  color: white;
  box-sizing: border-box;
  padding: 24px 40px;                 /* inner spacing */
}

/* Just a normal container for injected HTML */
.content-panel {
  /* ❗ remove these if they exist:
     position: absolute;
     top: 5px;
     height: ...;
  */
  position: static;                   /* or just delete the rule entirely */
  width: 100%;
}



.group {            /* LAYER 1 */
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}

.subgroup {         /* LAYER 2 */
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
}
