:root {
  --main-bg1: #08225a;
  --main-bg2: #40033c;
  --window-bg: #110318;
  --accent: #bd09ab;
  --foreground: #cecece;
  --tile-bg: #1c1c1c;
}

html {
    height: 100vh;
    width: 100%
}

*::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none;
  scrollbar-width: none;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
  -moz-user-drag: none;
}

body {
  background-image: linear-gradient(
    to bottom,
    var(--main-bg1),
    var(--main-bg2)
  );
  font-family: Silkscreen;
}

.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--window-bg);
  border: var(--accent) solid 2px;
  height: 98vh;
  overflow: hidden;
  @media (min-width: 640px) {
  }
}

.desktop {
  display: flex;
  flex-direction: row;
  align-self: flex-start;
  background-color: var(--window-bg);
  width: 100%;
  padding: 1%;
  height: 8vh;
  align-items: center;
  color: var(--foreground);
  border-bottom: 0px solid var(--main-bg2);
  margin-bottom: 15px;
  margin-top: 5px;
  gap: 10px;
}

.desktop p:last-child {
  margin-left: auto;
  margin-right: 2%;
  margin-bottom: 4%;
  text-align: right;
}


.mobile-logo {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin-bottom: -50px;
}

.mobile-logo img {
  width: 45vw;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 30px;
  line-height: 1;
}

.mobile-menu p {
  color: var(--foreground)
}

.mobile-menu a {
  line-height: 2;
} 

.title {
  font-size: clamp(24px, 5vh, 80px);
  color: var(--accent);
  margin-left: 0%;
}

.logo {
  width: 20%;
  object-fit: contain;
}

a:link {
  color: var(--main-bg1)
}

a:visited {
  color: var(--)
}

a:hover {
  color: var(--foreground)
}

/* #mainBoard {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  height: 95vh;
  width: 95vh;
  grid-gap: 0;
}

.tile {
  aspect-ratio: 1;
  display:flex;
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 200px;
  border: 3px solid #2ec563;
  overflow-y: scroll;
  overflow-x: hidden;
}
 */

#mainBoard {
  display: grid;
  width: min(95vw, 80vh);
  aspect-ratio: 1 / 1;
  padding: 4px;
  grid-template-columns: repeat(5, minmax(0px, 1fr));
  flex-wrap: wrap;
}

.tile {
  aspect-ratio: 1;
  display: flex;
  position: relative;
  border: 1px solid var(--accent);
  overflow-y: scroll;
  overflow-x: hidden;
  color: var(--foreground);
/*   font-size:calc(1vw);
 */    /*   font-size: clamp(16px, calc(20px + (36–20) * (100vw - 768px)/(1920–768)), 48px);
 */  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.1s ease;
  z-index: 0;
  background-color: var(--window-bg);
  padding: 10%;
}

/* Portrait */
@media screen and (orientation:portrait) {
  .tile {
    font-size: 2vw;
  }
  .mobile {
    display: block;
  }
  .desktop {
    display: none
  }
}
/* Landscape */
@media screen and (orientation:landscape) {
  .tile {
    font-size: clamp(18px, 1.5vh, 80px);
  }
  .mobile {
    display: none;
  }
}

#tile-13 {
  background-color: var(--main-bg1);
  .fuse-overlay {
    display: none;
  }
}

.tile:hover {
  transform: scale(1.1);
  z-index: 10;
  border: 3px solid var(--foreground);
}

@keyframes spin {
  from {
    transform: rotate(0deg) scale(0.5);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes flash {
  from {
    filter: contrast(0%)
  }
  to {
    filter: contrast(100%)
  }
}

.fuse-overlay {
  position: absolute;
  width: 80%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.tile[status="true"] {
  background-color: var(--main-bg2);
  transition-duration: 0.1s;
  .fuse-overlay {
    opacity: 1;
    animation: spin 0.9s linear forwards, flash 3s linear;
  }
}

#dialog-container {
    display: flex;
    position: absolute;
    color: var(--foreground);
    z-index: 20;
    left: 50%;
    top: 50%;
    text-align: center;
}

dialog {
    opacity: 1;
    position: absolute;
    color: var(--foreground);
    text-align: center;
    transition: transform 0.1s ease;
    background-color: #bd09ab;
    animation: fade-out 0.3s ease-out;
    font-size: clamp(24px, 3vh, 80px);
}

dialog:open {
  animation: fade-in 0.1s ease-out;
}

@keyframes fade-in {
  0% {
    opacity: 0;
    transform: scaleY(0);
    display: none;
  }

  100% {
    opacity: 1;
    transform: scaleY(1);
    display: block;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
    transform: scaleY(1);
    display: block;
  }

  100% {
    opacity: 0;
    transform: scaleY(0);
    display: none;
  }
}

.dialog-close {
  font-family: Silkscreen;
  background-color: var(--foreground);
  border: solid 2px black;
  font-size: 12px;
  padding: 5px;
  margin-top: 1rem;
}

.dialog-open {
  font-family: Silkscreen;
  background-color: #cccccc64;
  color: var(--foreground);
  border: solid 1px white;
  font-size: 12px;
  padding: 5px;
  margin-top: 1rem;
  border-radius: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 130px;
  margin-left: 120px;
  position: absolute;

}

.dialog-open:hover {
  background-color: var(--main-bg2);
}