:root {
  --background: hsl(0, 0%, 12%);
  --overlay: rgba(0, 0, 0, 0.767);
  --text: hsl(0, 0%, 80%);
  --clear: hsl(0, 0%, 65%);
  --disabled: hsl(0, 0%, 35%);
  --purple: #975aa7;
}

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

body {
  font-family: "Roboto Mono", monospace;
  color: var(--text);
  background: var(--background);
  background-image: linear-gradient(var(--overlay), var(--overlay)), url("flowPattern.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  font-size: 0.8rem;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
  cursor: pointer;
  color: hsl(51, 100%, 87%);
  text-decoration: underline;
}

code {
  white-space: normal; /* For when code tags are introduced by innerHTML */
}

/*----- table -----*/
table {
  color: var(--text);
  width: 80vw;
  border-collapse: collapse;
  font-size: 0.8rem;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
}

.htable {
  margin-top: 5%;
  top: 3rem;
}

.itable {
  top: 3rem;
}

.itable {
  top: 3rem;
}

th {
  position: sticky;
  z-index: 1;
  background-color: var(--purple);
  color: white;
  padding: 0.8rem;
  font-size: 0.8  rem;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  white-space: pre-line;
  border-bottom: 3px solid var(--purple);
}

th.selected{
  color: yellow;
  border-bottom: 3px solid yellow;
}

th:hover {
  color: hsl(51, 100%, 70%);
  cursor: pointer;
}

tbody tr:nth-child(even) {
  background-color: hsl(0, 0%, 22%);
}

tbody tr:nth-child(odd) {
  background-color: hsl(0, 0%, 18%);
}

tbody td {
  padding: 1rem;
  text-align: left;
  white-space: pre-line;
}

/*----- link color -----*/

.item-div {
  display: flex;
  flex-direction: column;
}

/*----- link color -----*/

.purple-link {
  color: #e1c7f0;
}

/*----- loading div -----*/
.loading-div {
  height: 100px;
  width: 80vw;
  margin-top: 20px;
  margin-bottom: 100px;
  display: flex;
  align-content: center;
  text-align: center;
  justify-content: center;
  /* background-color: var(--background); */
  color: var(--text);
  font-size: 1.2rem;
  font-weight: bold;
  display: none;
}

/*----- modal div -----*/
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: var(--background);
  padding: 2rem;
  border-radius: 8px;
  width: 90vw;
  height: 90vh;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-title {
  align-self: flex-start;
  font-size: 1.2rem;
  font-weight: 600;
  color: antiquewhite;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--purple);
  width: 25px;
  height: 25px;
  border: none;
  border-radius: 20px;
  color: var(--text);
  color: hsl(51, 100%, 80%);
  font-size: 0.8rem;
  cursor: pointer;
}

.modal-close:hover {
  color: yellow;
  font-weight: bold;
  background: #a76ab7;
}

/*----- comment div -----*/
.comment-div {
  border: 2px solid #333;
  background-color: #333;
  border-radius: 10px;
  margin: 5px;
  padding: 5px;
}

/*----- live updates -----*/
#live-updates-box {
  width: 80vw;
  height: 250px;
  background: var(--background);
  border: 2px solid var(--purple);
  border-radius: 8px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  margin-top: 4rem;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.5);
}

#live-updates-box h3 {
  font-size: 16px;
  font-weight: 600;
  padding: 10px;
  background-color: var(--purple);
  color: white;
}

#live-updates-list {
  font-size: 0.5rem;
  max-height: 205px;
  overflow: hidden;
}

.update-item {
  padding: 10px;
  border-bottom: 1px solid var(--disabled);
  font-size: 14px;
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

.update-item a {
  text-decoration: none;
  color: var(--clear);
  font-weight: bold;
}

.update-item a:hover {
  color: var(--purple);
}

/* 🔹 Fade Animations */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-out {
  opacity: 1;
  animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
