@charset "UTF-8";
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: white;
  color: black;
  transition: 0.5s;
  overflow-x: hidden;
}

h1 {
  text-align: center;
}

/* MARK: - Table/Scoreboard - */
table {
  border-collapse: collapse;
  width: 100%;
  overflow: hidden;
}

td, th {
  border: 1px solid rgb(221, 221, 221);
  text-align: left;
  padding: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 10%;
}

/* MARK: - Main content organization - */
#game-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

#left-column {
  width: 60%;
}

#right-column {
  width: 30%;
  padding-top: 10px;
  padding-right: 30px;
}

/* MARK: - Landing page elements - */
#landing {
  width: 100%;
}

#landing, #local-online-select {
  opacity: 100;
  transition: 0.5s;
}

#landing-content {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* MARK: - Hidden Elements - */
#game, #host-options, #join-options, #scoreboard, #rules, #local-container, #room-buttons {
  display: none;
  opacity: 0;
  transition: 0.5s;
}

/* MARK: - Rules - */
#rules {
  width: 100%;
  height: 100%;
  background-color: white;
  position: fixed;
  top: 0;
  z-index: 10;
  overflow-y: auto;
}

#close-rules-button {
  background: transparent;
  border: none;
  position: absolute;
  left: calc(100% - 60px);
  top: 30px;
  cursor: pointer;
  z-index: 11;
  font-size: 28pt;
}

#rules-content {
  padding-left: 15%;
  padding-right: 15%;
  width: 70%;
}

#rules-content ul li {
  padding-top: 15px;
}

/* MARK: - Chat - */
#chat-button, #messages {
  transition: 0.5s;
  opacity: 0;
  display: none;
}

#messages {
  position: fixed;
  left: calc(100% - 502px);
  top: calc(100% - 560px);
  z-index: 9;
  width: 400px;
  height: 500px;
  border: 2px solid gray;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  background-color: white;
  transition: 0.5s;
}

#messages h4 {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 5px;
  padding-bottom: 5px;
  padding-right: 2px;
  text-align: center;
  border-bottom: 2px solid gray;
}

#message-arrow {
  content: "";
  position: absolute;
  top: calc(100% - 60px);
  left: calc(100% - 140px);
  margin-left: -20px;
  width: 0;
  height: 0;
  border-top: solid 20px gray;
  border-left: solid 20px transparent;
  border-right: solid 20px transparent;
  transition: 0.5s;
  opacity: 0;
  display: none;
}

#messages-ul {
  overflow-y: scroll;
  height: 425px;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

#messages-ul li {
  padding: 4px;
  word-wrap: break-word;
}

#messages-ul li:nth-child(odd) {
  display: flex;
  justify-content: space-between;
  font-size: 9pt;
  padding-bottom: 0;
}

#messages-ul li .user {
  font-weight: bold;
}

#messages-ul li .curr-user {
  color: steelblue;
}

#messages-ul li .time {
  font-style: italic;
}

#messages-ul .odd {
  background-color: lightgray;
}

#chat-input-container {
  position: absolute;
  bottom: 0;
  background-color: white;
  width: 100%;
  border-top: 2px solid gray;
}

#chat-input {
  border: none;
  padding: 8px 10px;
  width: 90%;
}

.red:after {
  content: "•";
  color: red;
  position: absolute;
  left: 26px;
  top: -12px;
  font-size: 30pt;
}

/* MARK: - Options/Toggle Buttons - */
#dark-mode-toggle, #sound-toggle, #rules-button, #chat-button {
  background: transparent;
  border: none;
  font-size: 18pt;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  position: fixed;
  top: calc(100% - 40px);
  left: calc(100% - 40px);
  transition: 0.5s;
}

#sound-toggle {
  left: calc(100% - 80px);
}

#rules-button {
  left: calc(100% - 120px);
}

#chat-button {
  left: calc(100% - 160px);
}

/* MARK: - In-game Messages - */
#roll-info {
  display: flex;
  justify-content: center;
}

#error {
  transition: 0.5s;
  opacity: 0;
  padding-left: 30px;
  font-weight: bold;
}

#host-id {
  font-weight: bold;
  font-size: 14pt;
  font-family: monospace;
}

/* MARK: - Dice Styling - */
#dice-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  width: 100%;
}

.die {
  width: 24.9%;
  height: 24.9%;
  margin-top: 3%;
  margin-bottom: 1.5%;
  border: 12px solid black;
  background-color: white;
  border-radius: 10%;
}

/* MARK: - Button Styling - */
#game-button-container {
  display: flex;
  justify-content: center;
}

button {
  font-size: 14pt;
  border-radius: 10px;
  margin-left: 5px;
  margin-right: 5px;
  background: rgb(212, 212, 212);
  background: linear-gradient(0deg, rgb(212, 212, 212) 0%, rgb(228, 228, 228) 35%, rgb(255, 255, 255) 100%);
}

button:hover {
  background: #e4e4e4;
}

button:active {
  background: #d4d4d4;
}

button:disabled {
  background: #bdbdbd;
}

#restart-button {
  display: none;
}

/* MARK: - Die Spin Animation - */
.spin {
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
/* MARK: - Dark Mode Styling - */
.dark-body {
  background-color: black !important;
  color: white;
}

.dark-die {
  border-color: #1c1c1c;
  background-color: #303030;
}

.dark-odd {
  background-color: #2f2f2f !important;
}

.dark-button {
  color: white;
  border-color: #1c1c1c;
  background: rgb(68, 68, 68);
  background: linear-gradient(0deg, rgb(40, 40, 40) 0%, rgb(47, 47, 47) 35%, rgb(68, 68, 68) 100%);
}

.dark-button:hover {
  background: #2f2f2f;
}

.dark-button:active {
  background: #444444;
}

.dark-button:disabled {
  color: gray;
  background: #4d4b4b;
}

/* MARK: - Media Queries for different screen sizes - */
@media only screen and (max-width: 760px) {
  .die {
    border-width: 10px;
  }
}
@media only screen and (max-width: 800px) {
  #error {
    position: absolute;
    top: 0;
  }
  #landing {
    padding-top: 10px;
  }
  #game-content {
    flex-direction: column;
    padding-top: 10px;
  }
  #left-column, #right-column {
    width: 100%;
  }
  #messages {
    top: calc(100% - 460px);
    left: calc(100% - 340px);
    width: 300px;
    height: 400px;
  }
  #messages-ul {
    height: 320px;
  }
}