:root {
 --navbar-height: 90px;
}

body {
 font-family: Verdana, Geneva, Tahoma, sans-serif;
 background-color: #eee;
 color: #333;
 margin: 0;
}

table {
 width: 100%;
 border: 1px solid #333;
 border-radius: 10px;
 border-spacing: 0px;
 overflow: hidden;
}

table thead tr {
 background-color: #444;
 color: #fff;
}

table tbody tr:nth-of-type(odd) {
 background-color: #ccc;
}

table tbody tr:nth-of-type(even) {
 background-color: #ddd;
}

table tbody tr:hover {
 background-color: #aaa;
}

table tr th,
table tr td {
 padding: 5px 10px;
 vertical-align: top;
 text-align: left;
}

.bold {
 font-weight: bold;
}

.center {
 text-align: center;
}

.button {
 padding: 10px;
 max-width: calc(100% - 20px);
 cursor: pointer;
 font-weight: bold;
 text-align: center;
 border: 1px solid #000;
 border-radius: 10px;
 background-color: #f0d23c;
 color: #000;
}

.button.disabled {
 background-color: #bbb;
}

.loader {
 margin: 0 auto;
 width: 50px;
 height: 50px;
 border-radius: 50%;
 background:
  radial-gradient(farthest-side, #000 94%, #0000) top/8px 8px no-repeat,
  conic-gradient(#0000 30%, #000);
 -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
 animation: loader 1s infinite linear;
}

.loader-nav {
 margin: 0 auto;
 width: 20px;
 height: 20px;
 border-radius: 50%;
 background:
  radial-gradient(farthest-side, #fff 94%, #fff0) top/4px 4px no-repeat,
  conic-gradient(#fff0 30%, #fff);
 -webkit-mask: radial-gradient(farthest-side, #fff0 calc(100% - 4px), #fff 0);
 animation: loader 1s infinite linear;
}

@keyframes loader {
 100% {
  transform: rotate(1turn);
 }
}

#splash {
 display: flex;
 align-items: center;
 justify-content: center;
 flex-direction: column;
 gap: 20px;
 height: calc(100vh - 20px);
}

#splash .title {
 font-size: 24px;
 font-weight: bold;
}

#navbar {
 display: flex;
 flex-direction: row;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 width: calc(100% - 20px);
 height: var(--navbar-height);
 padding: 10px;
 background-color: #222;
}

#navbar .right,
#navbar .left {
 display: flex;
 flex-direction: column;
 gap: 10px;
}

#navbar .row {
 display: flex;
 flex-direction: row;
 gap: 10px;
}

#navbar .item {
 display: flex;
 align-items: center;
 justify-content: center;
 width: 30px;
 height: 30px;
 padding: 5px;
 border-radius: 20px;
 font-size: 12px;
 font-weight: bold;
 cursor: pointer;
 background-color: #eee;
}

#navbar .item img {
 width: 20px;
 height: 20px;
}

#navbar .score {
 display: flex;
 flex-direction: row;
 align-items: center;
 gap: 10px;
}

#navbar .score .icon {
 width: 24px;
 height: 24px;
}

#navbar .score .number {
 font-size: 20px;
 font-weight: bold;
 color: #ddd;
}

#content {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 10px;
 padding: 10px;
 width: calc(100% - 20px);
 height: calc(100vh - var(--navbar-height) - 40px);
}

#menu,
#game {
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 10px;
 width: 100%;
 height: calc(100vh - var(--navbar-height) - 40px);
}

#menu .button,
#game .button {
 width: 220px;
}

#motto {
 font-size: 20px;
 font-weight: bold;
 text-align: center;
}

#score-game {
 font-size: 20px;
 font-weight: bold;
}

#cards {
 display: grid;
 grid-template-columns: repeat(5, 1fr);
 gap: 10px;
 width: calc(100% - 20px);
}

#cards .card {
 max-width: 150px;
 aspect-ratio: 1 / 1;
 cursor: pointer;
 user-select: none;
 perspective: 1000px;
}

#cards .card .inner {
 position: absolute;
 width: 100%;
 height: 100%;
 transition: transform 0.6s;
 transform-style: preserve-3d;
 border: 1px solid #000;
 border-radius: 10px;
 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

#cards .card .inner.marked {
 filter: brightness(0.5);
}

#cards .card .inner img {
 border-radius: 10px;
}

#cards .card .inner.flipped {
 transform: rotateY(180deg);
}

#cards .card .inner .front,
#cards .card .inner .back {
 position: absolute;
 width: 100%;
 height: 100%;
 backface-visibility: hidden;
 border-radius: 10px;
}

#cards .card .inner .front {
 transform: rotateY(180deg);
}
