* {
  box-sizing: border-box;
}

body {
  display: flex;
  font-family: Verdana, sans-serif;
  padding-top: 25%;
  flex-direction: column;
  align-items: center;
  width: inherit;
  position: relative;
}

.d-none {
  display: none !important;
}

#pre-bg {
  position: absolute;
  top: 0px;
  width: 100vw;
}

#header-bg {
  width: 100vw;
  position: absolute;
  top: 0px;
  z-index: 10;
  transform: scale(1, 1.4);
}

@media screen and (min-width: 480px) {
  #header-bg {
    transform: scale(1, 1.1);
    top: -7vw;
  }
}

@media screen and (min-width: 1200px) {
  #header-bg {
    transform: scale(1, 0.8);
    top: -12vw;
  }
}

#join-bg.expanded {
  top: 37vh;
  transform: scale(1, 4.5);
}

@media screen and (min-width: 480px) {
  #join-bg.expanded {
    top: 30vh;
    transform: scale(1, 3.8);
  }
}

@media screen and (min-width: 1200px) {
  #join-bg.expanded {
    top: 10vh;
    transform: scale(1, 3.3);
  }
}

#join-bg.raised {
  top: 15vh;
  transform: scale(1, 1.7);
}

@media screen and (min-width: 1200px) {
  #join-bg.raised {
    top: 0vh;
    transform: scale(1, 1.2);
  }
}

#join-bg.wipe {
  transform: translateY(-28vh) scale(1, 3);
  transition: all 1.7s ease;
}

@media screen and (min-width: 480px) {
  #join-bg.wipe {
    transform: translateY(-38vh) scale(1, 1.5);
  }
}

#join-bg {
  width: 100vw;
  position: absolute;
  top: 20vh;
  z-index: 6;
  transform: scale(1, 4);
  transition: all 0.7s ease;
}

@media screen and (min-width: 480px) {
  #join-bg {
    transform: scale(1, 2.5);
  }
}

@media screen and (min-width: 1200px) {
  #join-bg {
    transform: scale(1, 2);
    top: 0vh;
  }
}

#new-bg {
  width: 100vw;
  position: absolute;
  top: 48vh;
  z-index: 4;
  transform: scale(1, 4);
  transition: all 0.7s ease;
}

@media screen and (min-width: 1200px) {
  #new-bg {
    transform: scale(1, 4);
    top: 20vh;
  }
}

#new-bg.lowered {
  transform: scale(1, 4) translateY(8vh);
}

#new-bg.expanded {
  transform: scale(1, 20);
}

#new-bg.wipe {
  transform: translateY(-70vh) scale(1, 4);
  transition: all 2s ease;
}

@media screen and (min-width: 480px) {
  #new-bg.wipe {
    transform: translateY(-78vh) scale(1, 2);
  }
}

.main-header {
  color: var(--primary-colour);
  font-family: "Knewave", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2rem, 12vw, 8rem);
  justify-self: center;
  text-wrap: nowrap;
  text-shadow: 1px 1px var(--primary-colour-dark),
    2px 2px var(--primary-colour-dark), 3px 3px var(--primary-colour-dark),
    4px 4px var(--primary-colour-dark), 5px 5px var(--primary-colour-dark),
    6px 6px var(--primary-colour-darkest), 7px 7px var(--primary-colour-darkest),
    8px 8px var(--primary-colour-darkest), 9px 9px var(--primary-colour-darkest),
    10px 10px var(--primary-colour-darkest),
    10px 10px 30px var(--primary-colour-darkest);
  transform: rotateX(5deg) rotateY(-3deg);
  margin: 0px;
}

.heading {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: inherit;
  margin: 0;
  padding: 0;
  z-index: 10;
}

/* .heading {
  right: 11vw;
} */

.pushable {
  background: rgb(110, 90, 132);
  border-radius: 12px;
  border: none;
  padding: 0;
  cursor: pointer;
  outline-offset: 4px;
  transition: filter 250ms;
  position: relative;
  margin-bottom: 3%;
}

.pushable.light-yellow {
  background: rgb(132, 126, 90) !important;
  width: clamp(20rem, 70vw, 40rem);
}

.shadow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  will-change: transform;
  transform: translateY(2px);
  transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
}

.edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: linear-gradient(
    to left,
    var(--primary-colour-darkest) 0%,
    var(--primary-colour-dark) 8%,
    var(--primary-colour-dark) 92%,
    var(--primary-colour-darkest) 100%
  );
}

.pushable.light-yellow .edge {
  background: linear-gradient(
    to left,
    hsl(55, 26%, 33%) 0%,
    hsl(59, 25%, 49%) 8%,
    hsl(53, 32%, 45%) 92%,
    hsl(49, 26%, 33%) 100%
  );
}

.front {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px 42px;
  border-radius: 12px;
  font-size: clamp(1.25rem, 4vw, 2rem);
  color: white;
  background: var(--primary-colour);
  will-change: transform;
  height: inherit;
  width: inherit;
  transform: translateY(-0.5rem);
  transition: transform 600ms cubic-bezier(0.3, 0.7, 0.4, 1);
}

.pushable.light-yellow .front {
  color: black;
  background: rgb(255, 253, 217);
}

.pushable:hover {
  filter: brightness(110%);
}
.pushable:hover .front {
  transform: translateY(-6px);
  transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
}
.pushable:active .front {
  transform: translateY(-2px);
  transition: transform 34ms;
}
.pushable:hover .shadow {
  transform: translateY(4px);
  transition: transform 250ms cubic-bezier(0.3, 0.7, 0.4, 1.5);
}
.pushable:active .shadow {
  transform: translateY(1px);
  transition: transform 34ms;
}
.pushable:focus:not(:focus-visible) {
  outline: none;
}

main {
  padding-top: 50px;
}

#pre-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  position: relative;
  top: 5vh;
}

@media screen and (min-width: 480px) {
  #pre-game {
    top: 0px;
  }
}

@media screen and (min-width: 1200px) {
  #pre-game {
    top: -19vh;
  }
}

.pre-game-btn {
  width: clamp(14rem, 50vw, 25rem);
  height: clamp(4rem, 15vw, 8rem);
}

#join-game {
  transition: all 0.7s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#join-game-btn {
  position: relative;
  z-index: 10;
  transition: all 0.7s ease;
}

#join-game-btn.expanded {
  transform: translateY(20vh);
}

@media screen and (min-width: 480px) {
  #join-game-btn.expanded {
    transform: translateY(30vh);
  }
}

#join-game-btn.raised {
  transform: translateY(-6vh) scale(0.7);
}

#join-game-btn.wipe {
  transform: translateY(-100vh);
  transition: transform 3s ease;
  z-index: 9;
}

#join-form-wrapper {
  width: 100vw;
  position: relative;
  z-index: 7;
}

#join-form {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20vh;
  display: flex;
  flex-direction: column;
  margin-bottom: 7.5vh;
  transition: transform 0.7s ease;
  transform: translateY(0);
}

/* @media screen and (min-width: 480px) {
  #join-form {
    left: 33vw;
  }
} */

#join-form.expanded {
  transform: translateY(45vh) translateX(-50%);
}

@media screen and (min-width: 480px) {
  #join-form.expanded {
    transform: translateY(55vh) translateX(-50%);
  }
}

#join-form.wipe {
  transform: translateY(-100vh) translateX(-50%);
  transition: transform 3s ease;
}

input {
  margin-bottom: 3vh;
  width: clamp(16rem, 70vw, 40rem);
  height: clamp(3rem, 10vw, 4.5rem);
  border-radius: 10px;
  color: rgb(36, 35, 42);
  font-size: 20px;
  line-height: 20px;
  min-height: 28px;
  border-radius: 4px;
  padding: 8px 16px;
  border: 2px solid transparent;
  box-shadow: rgb(0 0 0 / 12%) 0px 1px 3px, rgb(0 0 0 / 24%) 0px 1px 2px;
  background: rgb(251, 251, 251);
  transition: all 0.1s ease 0s;
  :focus {
    border: 2px solid rgb(124, 138, 255);
  }
}

textarea {
  margin-bottom: 3vh;
  width: clamp(20rem, 70vw, 40rem);
  height: 15rem;
  border-radius: 10px;
  color: rgb(36, 35, 42);
  font-size: 16px;
  line-height: 20px;
  min-height: 28px;
  border-radius: 4px;
  padding: 8px 16px;
  border: 2px solid transparent;
  box-shadow: rgb(0 0 0 / 12%) 0px 1px 3px, rgb(0 0 0 / 24%) 0px 1px 2px;
  background: rgb(251, 251, 251);
  transition: all 0.1s ease 0s;
  :focus {
    border: 2px solid rgb(124, 138, 255);
  }
}

#or {
  position: absolute;
  top: 14vh;
  z-index: 9;
  background-color: rgb(237, 56, 114);
  border-radius: 40px;
  width: 5rem;
  height: 4.8rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 40px;
  color: white;
  transition: all 0.7s ease;
}

@media screen and (min-width: 480px) {
  #or {
    top: 35vh;
  }
}

@media screen and (min-width: 1200px) {
  #or {
    top: 25vh;
  }
}

#or.expanded {
  transform: translateY(20vh);
}

@media screen and (min-width: 480px) {
  #or.expanded {
    transform: translateY(30vh);
  }
}

#or.raised {
  transform: translateY(-11vh) scale(0.7);
}

@media screen and (min-width: 480px) {
  #or.raised {
    transform: translateY(-15vh) scale(0.9);
  }
}

#or.wipe {
  transform: translateY(-100vh);
  transition: transform 3s ease;
}

@media screen and (min-width: 1200px) {
  #or.wipe {
    transform: translateY(-150vh);
    transition: transform 1.5s ease;
  }
}

#new-game {
  position: relative;
  top: 25vh;
  transition: all 0.7s ease;
}

#new-game div p {
  width: clamp(16rem, 70vw, 40rem);
  margin-top: 0;
  padding-top: 0;
}

#new-form-wrapper {
  width: 100vw;
  position: relative;
}

#new-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  z-index: 5;
  bottom: 5vw;
  right: 0px;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.7s ease;
}

#new-form input {
  width: clamp(20rem, 70vw, 40rem);
}

#new-form.expanded {
  transform: translateY(50vh) translateX(-50%);
}

@media screen and (min-width: 480px) {
  #new-form.expanded {
    transform: translateY(65vh) translateX(-50%);
    z-index: 6;
  }
}

#new-form.wipe {
  transform: translateY(-100vh) translateX(-50%);
  transition: transform 2.5s ease;
}

#new-game-btn {
  position: relative;
  top: -5vh;
  transition: transform 0.7s ease;
  z-index: 10;
  left: 50%;
  transform: translateX(-50%);
}

@media screen and (min-width: 480px) {
  #new-game-btn {
    top: 20vh;
  }
}

@media screen and (min-width: 1200px) {
  #new-game-btn {
    top: 5vh;
  }
}

#new-game-btn.lowered {
  transform: translateY(22.5vh) translateX(-50%);
}

@media screen and (min-width: 480px) {
  #new-game-btn.lowered {
    transform: translateY(25vh) translateX(-50%);
  }
}

#new-game-btn.expanded {
  transform: translateY(55vh) translateX(-50%);
}

/* @media screen and (min-width: 480px) {
  #new-game-btn.expanded {
    transform: translateY(65vh) translateX(-50%);
  }
} */

#new-game-btn.wipe {
  transform: translateY(-100vh) translateX(-50%);
  transition: transform 2.5s ease;
  z-index: 5;
}

/* @media screen and (min-width: 1200px) {
  #new-game-btn.wipe {
    top: -50vh;
    transform: translateY(-100vh);
    transition: all 1.1s ease;
    z-index: 5;
  }
} */

#in-game {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 30vh;
  width: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media screen and (min-width: 480px) {
  #in-game {
    top: 35vh;
  }
}

@media screen and (min-width: 1200px) {
  #in-game {
    top: 50vh;
  }
}

.page-block {
  background-color: rgba(255, 255, 255, 0.965);
  width: clamp(375px, 95vw, 80rem);
  padding: clamp(0.05rem, 0.1vw, 5rem);
  border-radius: 20px;
  margin-bottom: 3%;
  display: flex;
}

#bingo-board-wrapper {
  width: clamp(375px, 100vw, 80rem);
  height: clamp(25rem, 70vh, 95rem);
  justify-content: center;
  align-items: center;
}

.bingoBoard {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0px, 1vw, 20px);
  width: fit-content;
}

.bingo-square {
  display: flex;
  justify-content: center;
  align-items: center;
  width: clamp(4.5rem, 18.5vw, 13rem);
  height: clamp(4.8rem, 12vh, 13rem);
  background-color: #f2f2f2;
  border: 0px solid #ccc;
  border-radius: 15px;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 1px;
  color: rgb(0, 0, 0);
  font-size: clamp(0.8rem, 3vw, 1.3rem);
  font-weight: 550;
}

.stamped {
  background-position: center;
  background-repeat: no-repeat;
  animation: stampGrow 0.6s ease;
}

@keyframes stampGrow {
  0% {
    background-size: 40%;
  }
  50% {
    background-size: 120%;
  }
  70% {
    background-size: 80%;
  }
  100% {
    background-size: 100%;
  }
}

.tint-rainbow {
  animation: rainbowTint 3s linear forwards;
  /* forwards to keep last frame */
}

@keyframes rainbowTint {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

.square-free {
  border-color: #ffd700;
}

#scoreboard {
  border-radius: 20px;
  overflow: hidden;
  margin: 3%;
  width: 100%;
}

.scoreboard thead {
  background-color: var(--primary-colour);
  color: #fff;
  text-align: center;
  font-weight: bold;
}

.scoreboard th,
.scoreboard td {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  text-align: center;
}

.scoreboard tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

.scoreboard tbody tr:hover {
  background-color: #e0e0e0;
}

#options {
  padding: 2%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#share {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 3%;
  color: var(--primary-colour);
}

.row1 {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

#game-code-wrapper {
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 700;
}

#game-code {
  color: var(--primary-colour-dark);
}

.options-btn {
  width: clamp(5rem, 22vw, 10rem);
}

.options-btn .front,
#reset-btn .front {
  font-size: clamp(1rem, 2vw, 2.5rem);
}

#share-info {
  padding: 3%;
}

#reset-btn {
  margin: 3% auto;
}

#help-wrapper {
  margin-bottom: 10vh;
}

#help {
  display: flex;
  flex-direction: column;
  padding: 3%;
}

#extra-patterns {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.pattern-block {
  margin: 2vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pattern-block h4,
.pattern-block p {
  margin: 0px;
  padding: 0px;
}

.pattern-block img {
  width: 25vw;
}

/* //error stuff */

/* error-notifier.css */
#error-notifier {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ff4c4c;
  color: white;
  padding: 1rem 2rem;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family: Arial, sans-serif;
  font-size: 1rem;
  z-index: 9999;
  display: flex;
  align-items: center;
  min-width: 300px;
  max-width: 90vw;
  transition: top 0.4s ease;
}

#error-notifier.show {
  top: 0;
}

#error-notifier .close-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
}

/* confetti effect */
#emoji-container {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 9999;
}

.emoji {
  position: absolute;
  font-size: 2rem;
  animation: fall linear forwards;
  opacity: 0.9;
}

@keyframes fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(360deg);
    opacity: 0;
  }
}

footer {
  background-color: #f8f8f8;
  color: #555;
  font-family: sans-serif;
  font-size: 0.9em;
  padding: 20px;
  text-align: center;
  border-top: 1px solid #eee;
  width: 100vw;
}
