/* Basic styling for body */
body {
  width: 100vw;
  background-color: black;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0px;
  padding: 0px;
  box-sizing: border-box; /* Ensures padding/margin doesn't exceed the viewport */
}
.page1 {
  margin: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.intro {
  background-color: #004aad;
  padding: 20px;
  border-radius: 10px;
  font-size: medium;
  text-align: justify;
  max-width: 500px;
}
.courtContainer {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* Court grid styling  used BWF court sizing guidelines for court proportions*/
.court {
  background-color: red;
  /* TODO make responsive*/
  display: grid;
  grid-template-rows: 4px 72px 4px 388px 4px 198px 1px 198px 4px 388px 4px 72px 4px;
  grid-template-columns: 4px 42px 4px 253px 4px 253px 4px 42px 4px;
  transform-origin: 50% 0;
  -ms-transform-origin: 50% 0;
  -webkit-transform-origin: 50% 0;
  opacity: 0%; /* makes the court appear/disappear with opacity*/
}
.line {
  border-style: solid;

  background-color: white;
  border-width: 1px;
}

/* Each grid section/area styling */
.area {
  background-color: rgba(43, 93, 231, 0.821);
  cursor: grab; /*grabs the cursor to show you're doing something change to hand*/
}
.net {
  background-color: rgb(195, 19, 231);
}
.bar {
  display: none;
  justify-content: center;
  align-items: center;
}
#nextMove {
  width: 100vw;
  text-align: center;
}
#shuttle {
  position: absolute;
  display: none;
  top: 10px;
  left: 10px;
  transition: left 1s, top 1s;
}

#shuttleimage {
  zoom: 20%;
  transition: all 1s;
}

a {
  color: rgb(53, 235, 17);
}

/* Basic styles for popup */
#popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  padding: 20px;
  background: black;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  opacity: 80%;
  z-index: 1000;
  justify-content: center;
  text-align: justify;
  align-items: center;
  flex-direction: column;
}

#popup.hidden {
  display: none;
}

#popup h2 {
  margin: 0;
  font-size: 1.5em;
}

#popup p {
  margin: 10px 0 0;
}

#popup-close {
  display: block;
  margin-top: 10px;
  padding: 5px 10px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#popup-close:hover {
  background: #0056b3;
}
/* Media query:  */
/* Responsive styles for mobile view */
@media (max-width: 768px) {
  body {
    margin: 20px; /* Reduces large margins on small screens */
    flex-direction: column; /* Stack content vertically if needed */
  }

  .intro {
    padding: 15px;
    font-size: 14px; /* Adjust font size for better readability */
  }

  h1 {
    font-size: 1.5em; /* Adjust headline size */
  }

  p {
    font-size: 1em;
  }

  button {
    font-size: 1em;
    padding: 10px 20px;
  }
}
