:root { /* muh variables :3 */
  --maroon: maroon;
  --gold: gold;
  --top-bar-height: 40px;
  --top-bar-total-height: var(--top-bar-height);
  --top-button-height: 30px;
  --top-bar-text-color: white;
  --sidebar-width: 180px;
  --team-logo-height: var(--top-button-height);
  --border-color: var(--maroon);
  --border-width: 1px;
  --link-color: var(--maroon);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}



body {
  background-color: lightgray;
  font-family: Arial, sans-serif;
}

h1 {
  color: black;
  text-align: center;
  margin-bottom: 15px;
}

p {
  font-family: verdana;
  font-size: 20px;
  color: black;
  margin-bottom: 15px;
}

a {  
  color: var(--link-color);
  /* this is the thing for links */
}
a:hover{
  color: var(--gold);
}

#sidebar_left {
  overflow-y: auto;
  width: var(--sidebar-width);
  position: fixed;
  height: 1100%; 
  background: #f0f0f0;
  border-right: 1px #aaa solid;
  top: var(--top-bar-total-height); /* positioned under topbar */
  left: 0px;
  padding: 5px 10px;
  border-style: solid;
  border-width: var(--border-width);
  border-color: var(--border-color);
  border-top: 0px;
}

#sidebar_left h1 {
  font-size: 11px;
  text-align: left;
  margin-bottom: 10px;
  color:rgb(148, 23, 23);
}

#sidebar_left ul {
  list-style: square;
  padding-left: 20px;
}

#sidebar_left li {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

#sidebar_left a {
  color: #555;
  text-decoration: none;
}

#sidebar_left a:hover {
  text-decoration: underline;
}

#sidebar_left ul li img { /* if image next to link i suppose*/
  height: 16px;
  width: 16px; 
  margin-right: 8px;
}

#sidebar_left img{
  width: 90%;
  align-self: center;
}





.main-content {
  margin-top: var(--top-bar-total-height);     /* Push below topbar */
  padding: 35px;
}


.emoji-line {
  word-break: break-all;
}



#topbar {
  height: var(--top-bar-total-height);
  width: 100%;
  position: fixed; 
  top: 0;
  left: 0;
  z-index: 1000;
  overflow: visible;
}

#topbar-scroll {
  height: var(--top-bar-total-height);
  width: 100%;
  background: #ddd;
  border: var(--border-width) solid var(--border-color);
  display: flex;
  align-items: center;
  flex-wrap: nowrap; /* prevent children wrapping to next row */
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

#topbar-scroll::-webkit-scrollbar {
  display: none;
}

#topbar a{
  align-self: center;
  flex: 0 0 auto;
}
#topbar img{
  height: var(--team-logo-height);
  display: flex;
  align-self: center;
  padding: 0px 5px;
}

/* row that contains the dropdown buttons; becomes horizontally scrollable on small widths */
.dropdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: max-content;
  flex-wrap: nowrap; /* keep all buttons on same row */
  padding: 0 8px;
  white-space: nowrap;
  margin: 0;
}


.toggle-btn {
  background-color: var(--maroon);
  color: white;
  padding: 0 16px; 
  height: var(--top-button-height);
  font-size: 14px;
  border: 2px solid gray; 
  border-radius: 4px; 
  transform: none;
  flex: 0 0 auto;
  cursor: pointer;
  display: flex;
  align-items: center; 
}



.dropbtn {
  background-color: var(--maroon);
  color: white;
  padding: 0 16px; 
  height: var(--top-button-height);
  font-size: 14px;
  border: 2px solid gray; 
  border-radius: 4px; 
  transform: none;
  flex: 0 0 auto;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
}



.dropdown {
  position: relative;
  display: inline-block; 
}

/* Render dropdown menus with fixed positioning so they can escape scroll/overflow clipping */
.dropdown-content {
  display: none;
  position: fixed;
  top: calc(var(--top-bar-height) - 6px);
  background-color: #f9f9f9;
  min-width: 160px;
  max-height: calc(100vh - var(--top-bar-height) - 16px);
  overflow-y: auto;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 3000; 
  border: 1px solid #aaa;
}

/* approximate horizontal placement for each dropdown (adjust offsets to match layout) */


.dropdown-content a {
  color: black;
  padding: 10px 16px;
  text-decoration: none;
  display: block;
  text-align: left; 
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

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

.dropdown:hover .dropbtn {
  background-color: var(--gold);
}

.toggle-btn:hover  {
  background-color: var(--gold);
}

@media screen and (max-width: 760px) {
  #sidebar_left {
    display: none; 
  }
  
  .main-content {
    margin-left: 0;
  }
  .toggle-btn{
    display: block;
  }

  body.sidebar-open #sidebar_left {
    display: block;
  }
}

@media screen and (min-width: 768px){
  #sidebar_left {
    display: block;
  }
  .main-content {
    margin-left: 180px;  
  }
  .toggle-btn{
    display: none;
  }
}