body {
  background: linear-gradient(to bottom right,#f0f0f0,#ccc);
  color: #000;
  font-family: Arial,sans-serif;
  text-align: center;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden
}
#game-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 360px;
  height: 640px
}
#board {
  position: absolute;
  top: 0;
  left: 0;
  border: 5px solid #000;
  background-image: url("./assets/images/bg.png");
  background-size: cover;
  width: 360px;
  height: 640px
}
#webcam {
  position: absolute;
  top: 8px;
  right: 4px;
  width: 140px;
  height: auto;
  z-index: 10;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
  background: #000;
  opacity: 0;
  transition: opacity .4s;
  transform: scaleX(-1);
  pointer-events: none
}
#webcam.visible {
  opacity: 1
}
#gameover-menu,
#main-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000
}
#gameover-menu {
  display: none
}
#logo-image {
  width: 280px;
  margin-bottom: 50px;
  cursor: pointer
}
#restart-button,
#start-button {
  width: 150px;
  cursor: pointer
}
#gameover-image {
  width: 200px;
  margin-bottom: 10px
}
#camera-instructions {
  color: #fff;
  font-size: 16px;
  margin-bottom: 30px;
  background: rgba(0,0,0,.7);
  padding: 15px;
  border-radius: 10px;
  max-width: 280px
}
#camera-instructions p {
  margin: 5px 0
}
#gameover-menu p {
  font-size: 36px;
  color: #fff;
  margin-bottom: 40px;
  text-shadow: 2px 2px 4px rgba(0,0,0,.8)
}
#loading-screen {
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 20px;
  max-width: 300px
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: 1s linear infinite spin;
  margin: 0 auto 20px
}
@keyframes spin {
  0% {
    transform: rotate(0)
  }
  100% {
    transform: rotate(360deg)
  }
}
#loading-text {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px
}
#loading-status {
  font-size: 14px;
  line-height: 1.5
}
#loading-status div {
  margin: 8px 0;
  padding: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,.1)
}
.status-complete {
  background: rgba(76,175,80,.3)!important
}
.status-error {
  background: rgba(244,67,54,.3)!important
}
@media (max-width:768px) {
  #board {
    border: 3px solid #000
  }
  #restart-button,
  #start-button,
  img[style*="cursor: pointer"] {
    transition: transform .1s
  }
  #restart-button:active,
  #start-button:active,
  img[style*="cursor: pointer"]:active {
    transform: scale(.95)
  }
}
@media (max-width:480px) {
  #board {
    border: 2px solid #000
  }
}