* {
  box-sizing: border-box;
}

:root {
  font-size: 20px;
  font-family: 'Fira Sans', sans-serif;
  --body-color: #b8b8ba;
  --cell-size: 2.3rem;
  --btn-size: 5rem;
}

body {
  margin: 0px;

  background-color: var(--body-color);
  font-weight: bold;
}

.black-screen {
  width: 100vw;
  height: 100vh;

  background-color: rgba(0, 0, 0, 0.5);

  position: fixed;
  top: 0;
}

.rules {
  width: 80vw;
  padding: 0px 1rem 1rem 1rem;
  border: 0.3rem solid #d7d7dd;
  border-radius: 10px;

  background-color: #e7e7ec;
  font-size: 1rem;
  font-weight: bold;

  position: absolute;
  align-items: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.rules table {
  border-collapse: collapse;
}

.rules td {
  border: 2px solid #333; /* Table border */
  padding: 0.5rem;
  text-align: left;
  background-color: #fff;
  border-radius: 5px;
}

.rules td:nth-child(odd) {
  text-align: center;
}

.rules td img {
  width: 3rem;
}

.rules .x {
  width: 2rem;
  font-size: 2rem;
  cursor: pointer;
}

.modal {
  width: 60rem;
  padding: 0rem 1rem 3rem 1rem;
  border: 0.3rem solid #d7d7dd;
  border-radius: 10px;

  background-color: #e7e7ec;
  font-size: 3rem;
  font-weight: bold;

  position: absolute;
  text-align: center;
  align-items: center;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.modal .x {
  width: 2rem;
  border-radius: 5px;
  font-size: 2rem;
  cursor: pointer;
}

.modal .x:hover,
.rules .x:hover {
  color: rgb(102, 102, 102);
}

.modal span {
  font-size: 7rem;
  color: #d53333;
}

.alert {
  padding: 1rem;
  border-radius: 10px;

  background-color: #e7e7ec;
  font-size: 1rem;
  font-weight: bold;

  position: absolute;
  text-align: center;
  align-items: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.header {
  padding: 0.8rem;
  margin: 0px 1rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timer-plus-hearts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hearts {
  padding-left: 0.3rem;
  gap: 1vw;

  display: flex;
}

.heart img {
  width: 4rem;
}

.curr-time {
  font-size: 5rem;
  color: white;
}

.best-score {
  width: 25rem;
  padding-left: 0.3rem;

  font-size: 2rem;
  color: #cb2525;
}

.logo {
  left: 50%;
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateX(-50%); /* center it */
}

.logo img {
  width: 40rem;
}

.editor {
  font-size: 1.5rem;

  gap: 0.5rem;
  color: white;
  font-weight: bold;

  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
}

.editor-text {
  width: 10rem;
}

.editor img {
  width: 3.5rem;
  cursor: pointer;
}

.rules-btn-space {
  font-size: 1.5rem;
  margin-top: 4rem;
  gap: 0.5rem;
  color: white;
  font-weight: bold;

  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 3rem;
  right: 1.8rem;
}

.rules-btn img {
  width: 3rem;
  cursor: pointer;
}

.second-header {
  width: 100%;
  min-height: 5vw;
  padding: 0.6rem;
  margin: 0px;

  gap: 3vw;
  background-color: #acacae;

  display: flex;
  justify-content: center;
  align-items: center;
}

.button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btn-image {
  width: var(--btn-size);
  height: var(--btn-size);
}

.btn-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  display: block;
  cursor: pointer;
}

h2 {
  margin: 2px;
  font-size: 0.7rem;
}
