:root {
  --bg-color: #c0bebc;
  --cell-color: #fcfbfb;
  --cell-size: 35px;
  --open-cell-color: #ccc;
  --text-color: rgb(87, 80, 80);
}

* {
  margin: 0px;
  padding: 0px;
  font-family: "Press Start 2P", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: 11px;
}

body {
  width: 100%;
  height: 100%;
  background-color: #313131;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.171) 2px,
    transparent 0
  );
  background-size: 30px 30px;
  background-position: -5px -5px;
}

h1 {
  color: black;
}

.modal-content {
  padding: 5px 5px 5px 5px;
  margin: 0px 0px 10px 0px;
}

.modal-content h1 {
  font-size: 2em;
}

.modal-content p em {
  color: red;
}

.modal-content p i {
  font-size: 8px;
}

#modal {
  z-index: 2;
  left: 0;
  top: 0;
  max-width: 500px;
  background-color: var(--open-cell-color);
}

#modal .close {
  cursor: pointer;
}

.modal-content form * {
  width: 100%;
  height: 100%;
}

#cat-time {
  display: block;
  background-size: contain;
  position: relative;
}

#cat-time * {
  max-width: 500px;
  max-height: default;
}

#cat-time .explode {
  position: absolute;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
}

#game {
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  text-align: center;
  background-color: var(--bg-color);
  padding: 10px 10px 10px 10px;
  margin: 10px 10px 10px 10px;
}

#game #toggle {
  cursor: pointer;
}

#board {
  min-height: 400px;
  min-width: 400px;
  --rows: 9;
  --cols: 9;
  display: inline-grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-template-rows: repeat(var(--rows), 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
}

#smiley {
  cursor: pointer;
  height: 50px;
  width: 50px;
  padding: 6px;
  border: 4px solid var(--text-color);
  margin: 25px 0px 0px 5px;
  background-color: rgb(233, 231, 144);
}

#robot {
  cursor: pointer;
  height: 50px;
  width: 50px;
  padding: 6px;
  border: 4px solid var(--text-color);
  margin: 25px 0px 0px 5px;
  background-color: crimson;
}

#count {
  color: red;
}

.box {
  display: flex;
  border: 4px solid var(--text-color);
  border-radius: 10px;
  height: 60px;
  width: 110px;
  background-color: rgb(242, 243, 241);
  color: var(--text-color);
  margin: 25px 5px 0px auto;
  margin-top: 25px;
}

.text-label {
  margin: auto;
  font-size: 3em;
}

.play-circle {
  cursor: pointer;
}

.cell {
  position: relative;
  background-repeat: no-repeat;
  min-width: var(--cell-size);
  min-height: var(--cell-size);
  border: 1px solid var(--bg-color);
  text-align: center;
  align-content: center;
  font-size: 23px;
  cursor: pointer;
  background-color: transparent;
  color: var(--text-color);
}

.hidden {
  background-image: url("./assets/cell.svg");
  background-size: contain;
}

.hint {
  display: none;
  animation: pulse-text 4s infinite;
  color: crimson;
  margin: 2px 2px 2px 2px;
}

.default-cursor {
  cursor: default;
}

.revealed {
  background-color: var(--open-cell-color);
  cursor: default;
}
.revealed0 {
  background-color: var(--open-cell-color);
  cursor: default;
}

.revealed1 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: blue;
}

.revealed2 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: green;
}

.revealed3 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: red;
}

.revealed4 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: darkblue;
}

.revealed5 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: brown;
}

.revealed6 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: darkcyan;
}

.revealed7 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: black;
}

.revealed8 {
  background-color: var(--open-cell-color);
  cursor: default;
  color: gray;
}

.flagged {
  width: var(--cell-size);
  height: var(--cell-size);
  background-image: url("./assets/flag.svg");
  background-size: contain;
}

.mine {
  width: var(--cell-size);
  height: var(--cell-size);
  background-image: url("./assets/bomb.svg");
  background-size: contain;
}

.incorrect {
  background-image: url("./assets/cross.svg");
  background-size: contain;
}

.visited {
  background-color: green;
}

.centered {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header {
  display: flex;
  flex-direction: column;
  padding-bottom: 5px;
  margin: 0px 0px 10px 0px;
}

.radio-input .label input {
  display: none;
}

.radio-input {
  display: flex;
  gap: 20px;
  margin: 10px 0px 0px 10px;
}

.radio-input .label {
  display: flex;
}

.radio-input .label .check {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
  border: 3px solid transparent;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5),
    -1px -1px 4px rgba(255, 255, 255, 0.5);
}

.radio-input .label input:checked + .check {
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5),
    -1px -1px 4px rgba(255, 255, 255, 0.5), inset 3px 3px 6px rgba(0, 0, 0, 0.5),
    inset -1px -1px 4px rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.btn {
  display: grid;
  place-items: center;
  background: #e3edf7;
  padding: 1.4em;
  border-radius: 10px;
  box-shadow: 6px 6px 10px -1px rgba(0, 0, 0, 0.15),
    -6px -6px 10px -1px rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0);
  cursor: pointer;
  transition: transform 0.5s;
}

.btn:hover {
  box-shadow: inset 4px 4px 6px -1px rgba(0, 0, 0, 0.2),
    inset -4px -4px 6px -1px rgba(255, 255, 255, 0.7),
    -0.5px -0.5px 0px rgba(255, 255, 255, 1),
    0.5px 0.5px 0px rgba(0, 0, 0, 0.15), 0px 12px 10px -10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transform: translateY(0.5em);
}

.btn svg {
  transition: transform 0.5s;
}

.btn:hover svg {
  transform: scale(0.9);
  fill: #333333;
}

.text-input {
  border-radius: 10px;
  outline: 2px solid #febf00;
  border: 0;
  width: 70px;
  background-color: #e2e2e2;
  outline-offset: 3px;
  transition: 0.25s;
}

.clear {
  cursor: pointer;
}

.text-input:focus {
  outline-offset: 5px;
  background-color: #fff;
}

.card {
  position: relative;
  border-radius: 14px;
  z-index: 1111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bg {
  padding: 5px 5px 5px 5px;
  position: absolute;
  top: 5px;
  left: 5px;
  width: 190px;
  height: 240px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  border-radius: 10px;
  overflow-y: scroll;
  overflow-x: hidden;
  outline: 2px solid white;
}

.blob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: rgba(255, 0, 0, 0.2);
  opacity: 1;
  filter: blur(12px);
  animation: blob-bounce 5s infinite ease;
}

@keyframes blob-bounce {
  0% {
    transform: translate(-100%, -100%) translate3d(0, 0, 0);
  }

  25% {
    transform: translate(-100%, -100%) translate3d(100%, 0, 0);
  }

  50% {
    transform: translate(-100%, -100%) translate3d(100%, 100%, 0);
  }

  75% {
    transform: translate(-100%, -100%) translate3d(0, 100%, 0);
  }

  100% {
    transform: translate(-100%, -100%) translate3d(0, 0, 0);
  }
}

@keyframes fadeBackground {
  from {box-shadow: 0 0 0 max(100vh, 100vw) rgba(0, 0, 0, 0);}
  to {box-shadow: 0 0 0 max(100vh, 100vw) rgba(0, 0, 0, 0.8);}
}

@keyframes pulse-text {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.tragedy {
  animation: fadeBackground 4s;
  animation-fill-mode: forwards;
}

.row {
  display: flex;
  flex-direction: row;
}

.column {
  display: flex;
  flex-direction: column;
}

.column .btn {
  margin: 0px 20px 20px 0px;
}

.direction {
  display: flex;
  flex-direction: row;
}

.in {
  background-color: green;
}

@media only screen and (max-width: 600px) {
  body {
    background-color: var(--bg-color);
  }

  #game {
    margin-top: 20px;
    float: left;
    position: absolute;
    min-width: 100%;
    min-height: 100%;
  }

  #board {
    padding: 0px 20px 0px 20px;
    position: relative;
  }

  .header {
    background-color: var(--bg-color);
    z-index: 1;
    top: 0;
    right: 0;
  }

  .card {
    width: 200px;
    height: 250px;
  }

  .vw100 {
    width: 100vw;
  }

  .sticky {
    left: 0px;
    position: sticky;
  }

  .direction {
    display: flex;
    flex-direction: column;
  }

  #cat-time {
    display: none;
  }
}
