*,*::after,*::before {
    box-sizing: border-box;
    user-select: none;
    font-family: "Playpen Sans", Tahoma, sans-serif;
}

:root {
    --room-border: 6px solid black;
    --back-color1: #0976aa;
    --back-color2: #2ae991;
    --card-shadow: 1px 1px 2px 1px black;
    --button-textS: clamp(0.5rem, 5vh, 1.2rem);
    --button-textL: clamp(0.5rem, 5vh, 2rem);
}

body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: url("/assets/homebackground.png");
    /* background-color: var(--back-color1); */
}

.all-school-container {
    position: absolute;
    top: 4%;
    left: 5%;
    /* transform: translate(-50%,-50%); */
    height: 92vh;
    width: 90vw;
    background-color: var(--back-color2);
    border-radius: 10px;
    box-shadow: 5px 5px 10px 5px black;
}

.game-select-container {
    position: relative;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.game-select {
    width: 30%;
    height: 45%;
    background-color: var(--back-color1);
    color: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: var(--button-textL);
    text-align: center;
    cursor: pointer;
}
.back-button {
    position: absolute;
    height: 15vh;
    width: 3vw;
    top: 5%;
    left: 1%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--back-color2);
    border-radius: 6px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}
.back-button img {
    height: 80%;
    width: auto;
    max-width: 100%;
    transform: rotateY(180deg);
}

.sound-control {
    height: 10vh;
    width: 10vh;
    position: absolute;
    top: 2%;
    right: 2%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.sound-button {
    height: 80%;
    max-height: 60px;
    min-height: 30px;
    width: auto;
    max-width: 60px;
    min-width: 30px;
    cursor: pointer;
    border-radius: 9999px;
    box-shadow: 0 0 15px 15px white;
}
.sound-button.available {
    animation: pulse 800ms infinite ease-in-out;
}
.sound-off {
    filter: grayscale(100);
    box-shadow: none;
}
@keyframes pulse {
    0% {
      scale: 1;
    }
    50% {
      scale: 1.2
    }
    100% {
      scale: 1;
    }
}


.rooms-container {
    position: relative;
}
.rooms-grid {
    margin: 0 auto;
    width: 90%;
    height: 90%;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    grid-template-rows: repeat(3,1fr);
}
.room-box {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: var(--room-border)
}
.mover-grid {
    position: absolute;
    top: 20%;
    left: 9vw;
    width: 72vw;
    height: 75vh;
    display: grid;
    grid-template-columns: repeat(7,1fr);
    grid-template-rows: 1fr 0.8fr 1fr 0.8fr 1fr 1fr;
    pointer-events: none;
}
.mover-grid:nth-child(8),
.mover-grid:nth-child(9),
.mover-grid:nth-child(10),
.mover-grid:nth-child(11),
.mover-grid:nth-child(12),
.mover-grid:nth-child(13),
.mover-grid:nth-child(14) {
    height: 5vh;
}
.mover-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

.room-box:nth-child(1),
.room-box:nth-child(2),
.room-box:nth-child(3),
.room-box:nth-child(5),
.room-box:nth-child(6),
.room-box:nth-child(7),
.room-box:nth-child(9),
.room-box:nth-child(10),
.room-box:nth-child(11) {
    border-right: var(--room-border)
}
.room-box:nth-child(4) .corner-dot,
.room-box:nth-child(8) .corner-dot,
.room-box:nth-child(12) .corner-dot {
    background-color: transparent;
}
.rooms-grid img {
    margin-top: 5px;
    height: 100%;
    max-height: 20vh;
    max-width: 20vw;
}
.lower-container {
    width: 100%;
    height: 25%;
    display: flex;
}
.lower-left-container {
    width: 50%;
    display: flex;
    border-right: var(--room-border);
}
.char-select {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.char-window {
    width: 10vw;
    height: 10vw;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--card-shadow);
    cursor: pointer;
}
.char-window img {
    height: 100%;
    max-height: 10vw;
}

.image-set-change {
    position: absolute;
    width: 5vw;
    height: 10vh;
    bottom: 5%;
    left: 20%;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--button-textS);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    background-color: var(--back-color1);
    color: white;
    cursor: pointer;
}

.entrance {
    width: 50%;
    display: flex;
    justify-content: right;
    align-items: center;
}
.entrance img {
    height: 100%;
    max-height: 20vh;
    max-width: 20vw;
}
.lower-right-container {
    width: 50%;
    display: flex;
    justify-content: right;    
}
.mover-control-container {
    width: 50%;
    display: flex;
    justify-content: flex-end;
}
.mover-control {
    height: 50%;
    width: 25%;
    margin-top: 10vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--card-shadow);
    border-radius: 5px;
    background-color: var(--back-color1);
    z-index: 10;
    cursor: pointer;
}
.mover-control:nth-last-of-type(2) {
    margin-top: 5vh;
    margin-left: 10px;
    margin-right: 10px;
}
.mover-control img {
    height: 100%;
    max-height: 15vh;
}
.whiten {
    box-shadow: 1px 1px 3px 2px white;
}
.game-mode-button-container {
    height: 100%;
    width: 50%;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    width: 50%;
    justify-content: flex-end;
    align-items: center;
    z-index: 5;
}
.mode {
    height: 25%;
    width: 80%;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    background-color: var(--back-color1);
    color: white; 
    cursor: pointer;
}
.toggleon {
    background-color: yellow;
    color: black;
}

.flipper {
    position: relative;
    z-index: 10;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
}
.flipper.isolate-backdrop {
    cursor: pointer;
}
.flipper-front img {
    box-shadow: var(--card-shadow);
}

.flipper-front .secret-mode {
    background-color: var(--back-color1);
    height: 100%;
    width: 90%;
    max-height: 20vh;
    max-width: 20vw;
}

.flipper-back {
    position: absolute;
    background-color:  var(--back-color1);
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    height: 100%;
    width: 90%;
    max-height: 20vh;
    max-width: 20vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flipper-front, .flipper-back {
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
}
.flipper-front.isolate-backdrop {
    position: relative;
    z-index: 21;
    cursor: pointer;
}
.flipper-back {
    box-shadow: var(--card-shadow);
    transform: translate(-50%,-50%) rotatex(180deg);
}
.secret-mode {
    background-color: var(--back-color2);
    box-shadow: none;
}

.mover {
    height: 100%;
    max-height: 18vh;
    z-index: 10;
}

.west {
    transform: rotate(-90deg);
}
.east {
    transform: rotate(90deg);
}
.north {
    transform: rotate(0deg);
}
.south {
    transform: rotate(180deg);
}

.highlight {
    box-shadow: 0 0 12px 20px gold;
    transition: all 0.3s linear;
}

.sounds-backdrop {
    position: absolute;
    height: 100vh;
    width: 100vw;
    top: 0;
    z-index: 20;
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity ease-in-out 300ms;
}
  
.nobackdrop {
    opacity: 0;
    pointer-events: none;
}
  
.isolate-backdrop {
    z-index: 21;
}
.revealed.isolate-backdrop {
    cursor: pointer;
}
.behind {
    display: none;
    z-index: -20;
}
.warning, .warning:hover {
    background-color: rgba(255, 0, 0, 0.8);
}
