#command-center-window {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: white;
    display: none;
}

/* mobile top navbar stuff start */
#mobile-command-center-navbar {
  font-family: 'black ops one', sans-serif;
  top: 0;
  padding: 1rem;
  height: 2rem;
  display: none;
  position: sticky;
  left: 0;
  right: 0;
  z-index: 10;
  background: url('/images/extra-dark-steel\(small-size\).webp');
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
  justify-content: space-between;
}

.game-logo-mobile-navbar {
  font-family: 'Black Ops One', sans-serif;
  background: url('/images/metal-background2.jpg') repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 5px rgb(0, 0, 0, 0.8);
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: bold;
  color: #2c2727;
}

#mobile-command-center-sidebar-toggle {
  font-size: 24px;
  cursor: pointer;
}

/* sidebar stuff start */

.sidebar {
  position: fixed; /* stays pinned to the left */
  top: 0;
  left: 0;
  height: 100%;
  width: 70px; /* collapsed width */
  background: #23283a;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s ease;
  z-index: 10; /* ensures it overlays content when expanded */
  font-family: 'Black ops one', sans-serif;
}

.sidebar:hover {
  width: 200px;
}

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

.sidebar ul li {
  display: block;
  align-items: center;
  padding: 15px;
  color: #fff;
  transition: background 0.3s ease;
}

.sidebar ul li span.sidebar-label {
  margin-left: 10px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar:hover ul li .sidebar-label {
  opacity: 1;
}

.sidebar-dropdown-btn {
  all: unset; /* removes default browser styles */
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5px;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.sidebar-dropdown-btn:hover {
  background: #2c3248;
}

.sidebar-no-dropdown-btn {
  all: unset; /* removes default browser styles */
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5px;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease;
}

.sidebar-no-dropdown-btn:hover {
  background: #2c3248;
}

.sidebar-dropdown-items {
  max-height: 0;
  overflow: hidden;
  list-style: none;
  padding-left: 30px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.sidebar-dropdown-items.show {
  max-height: 500px; /* adjust as needed */
  opacity: 1;
}

.sidebar-dropdown-items li {
  padding: 8px 0;
  cursor: pointer;
}


/* Optional scrollbar styling */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #00c2ff33;
  border-radius: 10px;
}

@media (pointer: coarse) {
  .sidebar {
      width: 70px; /* collapsed by default */
  }

  .sidebar.expanded {
      width: 200px; /* expanded manually by tap */
  }

  /* Disable label visibility unless expanded */
  .sidebar ul li span.sidebar-label {
      opacity: 0;
  }
  .sidebar.expanded ul li span.sidebar-label {
      opacity: 1;
  }

  /* Disable tapping items when collapsed */
  .sidebar #sidebar-options-container {
      pointer-events: none;
  }
  .sidebar.expanded #sidebar-options-container {
      pointer-events: auto;
  }
  
}

/* sidebar stuff end */

/*overview for command center stuff start */

.main-player-info {
  margin-left: 70px; /* respects only collapsed width */
  margin-right: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  width: 100%;
  overflow-y: auto;
  font-family: 'Black Ops One', sans-serif;
}

.command-center-window-overview {
  width: 100%;
  height: 100%;
  display: flex;
  background: #2a2a2a;
  color: white;
}

/* technically part of the sidebar stuff
   but this has to be after .main-player-info */
   @media (max-width: 500px) {
    .sidebar {
      width: 0px;
      margin-top: 4rem;
    }
    .sidebar.expanded {
      width: 200px;
    }
    .main-player-info {
      margin-left: 0px;
    }
    #mobile-command-center-navbar {
      display: flex;
    }
    .command-center-window-overview {
      display: block;
    }
  }
  @media (min-width: 1700px) {
    .sidebar {
      width: 200px;
    }
    .main-player-info {
      margin-left: 200px;
    }
    .sidebar ul li span.sidebar-label {
      opacity: 1;
    }
  }
/* technically sidebar stuff end */

.command-player-name {
  font-size: 36px;
  font-weight: bold;
  justify-content: center;
  align-items: center;
  display: flex;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

#overview-double-box-container {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.overview-alliance-double-box {
  display: column;
  flex-direction: row;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}

#overview-alliance-name {
  display: flex;
  flex-direction: row;
  align-self: center;
}

.command-player-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#command-overview-recent-activity-header {
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

#overview-command-activity-log-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
}

#overview-command-recent-activity-log-container,
#overview-command-recent-war-activity-log-container {
  display: flex;
  flex-direction: column;
  background: url('../images/extra-dark-steel\(small-size\).webp');
  padding: 1rem;
  border-radius: 8px;
  min-width: 400px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  max-height: 25rem;
  overflow-y: auto;
  margin-bottom: 0.5rem;
}

#overview-command-recent-activity-log-container-mobile-version {
  display: none;
  flex-direction: column;
  background: url('../images/extra-dark-steel\(small-size\).webp');
  padding: 1rem;
  width: 100%;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  overflow-y: auto;
  max-width: 650px
}

@media (max-width: 1000px) {
  #overview-command-recent-activity-log-container-mobile-version {
    display: flex;
  }
  #overvie-command-activity-log-container {
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
  }
  .command-player-activity {
    width: 100%;
    align-items: stretch;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
    box-sizing: border-box;
  }
  #overview-command-recent-activity-log-container,
  #overview-command-recent-war-activity-log-container {
    display: none;
  }
}


.overview-command-recent-activity-logs-mobile {
  display: block;
  background-color: #2a2a2a;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 0.9rem;
  color: white;
  min-height: 3rem;          /* ensures roughly two lines of text */
  line-height: 1.4;          /* clean spacing between lines */
  word-wrap: break-word;     /* breaks long words if needed */
  overflow-wrap: anywhere;   /* prevents overflow on long strings */
}

#overview-command-recent-activity-log-container::-webkit-scrollbar,
#overview-command-recent-war-activity-log-container::-webkit-scrollbar {
  width: 6px;
}
#overview-command-recent-activity-log-container::-webkit-scrollbar-thumb,
#overview-command-recent-war-activity-log-container::-webkit-scrollbar-thumb {
  background-color: #aaa;
  border-radius: 3px;
}

.activity-box-header {
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.8rem;
  color: white;
  border-bottom: 3px solid #2a2a2a;
  padding-bottom: 0.4rem;
}

/* Individual log cards */
.overview-command-recent-activity-logs,
.overview-command-recent-war-activity-logs {
  display: block;
  background-color: #2a2a2a;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 0.9rem;
  color: white;
  min-height: 3rem;          /* ensures roughly two lines of text */
  line-height: 1.4;          /* clean spacing between lines */
  word-wrap: break-word;     /* breaks long words if needed */
  overflow-wrap: anywhere;   /* prevents overflow on long strings */
}

.overview-command-recent-activity-logs:last-child,
.overview-command-recent-war-activity-logs:last-child {
  margin-bottom: 0; /* remove extra space at bottom */
}

@media (max-width: 1000px) {
  #overview-command-recent-activity-log-container,
#overview-command-recent-war-activity-log-container {
  overflow-y: hidden;
}
}


.basic-resource-production {
  flex-direction: column;
  display: flex;
  align-items: center;
  text-align: center;
  background: #2a2a2a;
  min-height: 140px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  border-radius: 6px;
  box-sizing: border-box;
}

#command-basic-resource-production {
  display: grid;
  gap: 12px;
  padding: 12px;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: visible;
  max-width: 95%;
  min-width: 95%;
  margin: 0 auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  background: url('../images/extra-dark-steel.png');
  border-radius: 12px;
  box-sizing: border-box;
}

.basic-resource-production img {
  width: 40px;
  height: 40px;
}


#command-center-overview-resource-header {
  font-size: 1.2rem;
  text-align: center;
  font-weight: bold;
}
/* overview for command center stuff end */

/* coming soon stuff start */
#coming-soon-box-container-command-center {
  min-width: 6rem;
  min-height: 6rem;
}

#coming-soon-words {
  display: flex;
  flex-direction: column;
}
/* coming soon stuff end */

/* building management page stuff start */
#building-management-building-list-container {
  display: grid;
  gap: 12px;
  padding: 12px;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: visible;
  max-width: 95%;
  min-width: 95%;
  margin: 0 auto;
  margin-top: 1rem;
  margin-bottom: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  background: url('../images/extra-dark-steel.png');
  border-radius: 12px;
  box-sizing: border-box;
}

.building-management-building-container {
  align-items: center;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  background: #2a2a2a;
  border-radius: 8px;
  min-height: 200px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.building-management-building-container:hover {
  transform: scale(1.05);
  background: #3a3a3a;
}

.building-management-building-header {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

.building-management-building-container img {
  height: 130px;
  width: 200px;
  padding-top: 12px;
}

.building-management-building-container p {
  margin-bottom: 6px
}

#building-management-modules-modal {
  display: none;
  padding: 1rem;
  gap: 1rem;
  background: url('/images/extra-dark-steel\(small-size\).webp');
  min-width: 40vw;
  max-width: 40vw;
  flex-direction: column;
  border-radius: 8px;
  margin-right: 0px;
}

#building-management-building-info-modal {
  display: none;
  padding: 1rem;
  gap: 1rem;
  background: url('/images/extra-dark-steel\(small-size\).webp');
  min-width: 40vw;
  max-width: 40vw;
  flex-direction: column;
  border-radius: 8px;
}

#building-management-building-modal-conatiner {
  display: flex;
  flex-direction: row;
  padding: 1rem;
  justify-content: space-between;
  position: fixed;
  z-index: 12;
  left: 0;
}

#building-management-building-modal-background-dim {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 11;
  position: fixed;
  display: none;
}
/*building management page stuff end */