body {
  align-items: center;
  background-color: #fff;
  display: flex;
  justify-content: center;
  height: 100vh;
  padding: 0px;
  background: #fff;
  font-family: "Montserrat", sans-serif;
}

#pullDown {
  display: none;
}

label[for="pullDown"] {
  display: block;
  background-color: #0eb3c7;
  color: white;
  padding: 10px 20px;
  cursor: pointer;
  text-align: center;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  border-radius: 0 0 6px 6px;
}

#headerMenu {
  position: fixed;
  top: 50px; /* just below the label */
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: none;
  width: 350px;
  z-index: 999;
}

#pullDown:checked + label + #headerMenu {
  display: block;
}

.select {
  margin: 10px 0;
}

.form {
  background-color: #15172b;
  border-radius: 20px;
  box-sizing: border-box;
  padding: 20px;
  width: 320px;
}

.green {
  color: #198b16;
}

.red {
  color: #FF0000;
}

.regForm {
  position: absolute;
  top: 2in;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: max-content;
}

.clabel {
  display: inline-block;
  width: 170px;
  text-align: left;
  font-weight: bold;
  padding-right: 5px;
}

.cinput {
  display: inline-block;
}

.ia {
  display: inline-block;
  float: left;
}

.controls {
  border-top: 30px solid #fff;
  display: none; 
}

.controls ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  gap: 7.5px; 
}

.controls li {
  align-items: center;
  display: inline-block;
  width: 5%;
}

.controls a {
  width: 50%;
  padding: 20px 15px;
  font-size: 1.4em;
  cursor: pointer;
  background: #D6D6D6;
  transition: background .3s, color .3s;
  vertical-align: middle;
}

.controls a:hover,
.controls a.active {
  background: #0EBEC7;
  color: #fff;
}

.webrtcbutton {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0eb3c7; 
  border-radius: 50%;
  color: #5244EE;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.3s;
}

.formBox {
  background-color: #ffffff;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
  text-align: left;
  width: 400px;
}

.formTitle {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.5em;
  color: #0a2136;
  font-weight: 600;
}

.formGroup {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.clabel {
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.95em;
  color: #333;
}

.cinput {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
}

.registerBtn {
  background-color: #0eb3c7;
  color: white;
  border: none;
  padding: 12px;
  font-size: 1em;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.registerBtn:hover {
  background-color: #0a96a5;
}

#tokenTimerContainer {
  position:fixed;
  bottom: 28px;
  right: 195px;
}

#status_container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #1a1a1a;
  padding: 10px 15px;
  border-radius: 8px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

#reg_status {
  color: white;
  font-weight: bold;
}

.flashing-red {
  animation: flashRed 1s infinite;
  color: red;
}

@keyframes flashRed {
  0% { color: red; }
  50% { color: darkred; }
  100% { color: red; }
}

.green {
  color: #00c853;
}

#refresh_registration_btn {
  position: fixed;
  background-color: #0eb3c7;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

#refresh_registration_btn:hover {
  background-color: #0a94a8;
}

/* === iPad-specific styles === */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait),
       only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {

  body {
    flex-direction: column;
    padding: 20px;
    justify-content: flex-start;
  }

  .form, .formBox {
    width: 90%;
    max-width: 500px;
  }

  .regForm {
    top: 1in;
  }

  #headerMenu {
    width: 90%;
    max-width: 400px;
  }

  .controls ul {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .controls li {
    width: auto;
    margin-bottom: 0;
  }
  
  .controls a {
    width: auto;
    text-align: center;
  }

  #status_container {
    bottom: 10px;
    left: 10px;
    right: auto;
  }

  .hidden {
    display: none !important;
  }
}