/* ANIMATIONS */


@keyframes frame-animation {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}



@keyframes shadow-dance {
  0%, 100% {
    text-shadow: 1px 2px 0 #084860, 1px 2px 0 #05a3b6;
  }
  50% {
    text-shadow: -2px -2px 0 #05a3b6, -1px -2px 0 #084860;
  }
}

/* -------- */



/* UNIVERSAL STYLES */

*, *::before,*::after {
  box-sizing: border-box; /* factor border into box size */
}


/* Default styles */
* {
  margin: 0;
  padding: 0;
  border: 0 solid transparent;
  transition-property: opacity, visibility;
  transition-duration: 0.25s;
}

/*---*/





/* GENERAL STYLES */

html {
  font-size: 1rem;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.5rem);
  /* Prevent font size inflation */
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  background-color: rgba(4, 6, 8, 1);
  text-align: center;
}

@media (orientation: portrait) {
  html {
    font-size: 1.5rem;
    font-size: clamp(1.25rem, 0.95rem + 0.35vw, 1.75rem);
  }
}

/* Remove list styles on ul, ol elements with a list role,
 * which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-width: 100vw;
  min-height: 100dvh;
  line-height: 1;
}

/* Set shorter line heights on headings and interactive elements */
/*
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}
*/


/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
  display: inline;
}


/* A elements that don't have a class get default styles */
/*a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}*/

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}


/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

    /*---*/





/* UTILITIES */

/*
.wrap-text {
  white-space: pre-wrap; /* Tells the browser to respect "\n" and wrap text normally */
}
*/

.off {
  pointer-events: none !important;
}

.centered {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

 
.cloaked {
  opacity: 0 !important;
  visibility: hidden !important;
}

.tr {
  display: table-row;
}

.tc {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* width: 100% is external (based on the parent element) */
  height: 100%; /* height: 100% is internal (based on nested elements). */
                  /* Using svh (%) sets it based on the viewport. */
}

.overlay {
  opacity: 1;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

.overlay.off {
  display: none;
}

.menu {
  margin: 0 auto;
  border: 1px solid transparent;
  width: 98%;
}

.tab-menu {
  display: grid;
  grid-template-rows: 2.25rem 1fr;
  grid-template-columns: 1fr;
}

.tab-list {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
}

.tab {
  flex: 1;
}

.panel {
  grid-row: 2 / 3;
  grid-column: 1 / 2;
  transition-property: visibility, opacity;
  transition-duration: 175ms;
}

.sprite {
  position: absolute;
  overflow: hidden;
  transition-property: visibility, opacity, transform, left, top;
  transition-duration: 0.2s, 0.2s, 0.25s, 1.5s, 1.5s;
  transition-timing-function: ease, ease, ease, linear, linear;
}

.spritesheet {
  display: block;
}

    /*---*/



/* BASE STYLES */


/* Default button style */
button {
  padding: 0.5rem;
  color: rgb(128, 144, 192);
  background-color: rgb(4, 12, 16);
  border: 0.1em solid rgb(40, 48, 64);
  border-radius: 0.75rem;
  z-index: 2;
  transition-property: color, background-color, border-color;
  transition-duration: 150ms;
}

button:hover {
  color: rgb(144, 160, 216);
  background-color: rgb(6, 14, 18);
  border-color: rgb(52, 60, 84);
}

a, button {
  transition: color 125ms, background-color 125ms;
}

a, button {
  cursor: pointer;
}

    /*---*/



#PAGE-BACKGROUND {
  z-index: -1;
}

#WRAPPER {
  display: flex;
  z-index: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 0.2rem 0.5rem;
  margin: 0 auto;
  min-width: 100px;
  height: 100svh;
}

#HEADER {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.5rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  padding-left: 1rem;
  padding-right: 0.5rem;
  text-align: justify;
  background-color: rgba(4, 8, 12, 1.0);
  border: 0.1em solid rgba(40, 48, 64, 1.0);
  border-radius: 0.75rem;

  /* ie 7*/  
  *width: 100%;  
  *-ms-text-justify: distribute-all-lines;
  *text-justify: distribute-all-lines;

}

#HEADER label {
  font-size: 1.2rem;
  font-weight: 600;
  color: rgb(112, 112, 184);
  text-decoration: none;
  transition: color 200ms;

  /* ie 7*/
  *display: inline;
  *zoom: 1;
  *text-align: left; 
}

#HEADER > a {
  margin: auto;
  padding: 0.1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgb(112, 112, 184);
  text-decoration: none;
  transition: color 200ms;
}

#HEADER > a:hover {
  color: rgb(120, 144, 240);
}

#HEADER__navButton {
  border: 0.1em solid rgba(54, 52, 84, 1.0);
  padding: 0.4em;
  z-index: 9;
  font-size: 1em;
  border-radius: 0.5em;

  /* ie 7*/
  *display: inline;
  *zoom:1;
  *text-align: right;
}

#MAIN {
  display: block;
  position: relative;
  height: 100svh;
}

#VIEW {
  z-index: 1;
}

#NAV {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-evenly;
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.75rem;
  color: rgb(122, 156, 170);
  background-color: rgba(4, 6, 16, 0.95);
  border-radius: 0.5rem;
  text-align: center;
  transition-property: opacity, visibility, transform;
  transition-duration: 200ms;
  z-index: 3;
}

#NAV li {
  padding: 0.2rem;
  font-size: 1.2rem;
}

#NAV button {
  margin-top: 0.5rem;
  cursor: pointer;
  width: 100%;
}

#EXIT-NAV {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.5);
  transition-property: visibility, opacity;
  transition-duration: 100ms;
}

#LOADING {
  position: fixed;
  z-index: 4;
  opacity: 0.9;
  background-color: rgb(5, 10, 15);
}
#LOADING div {
  margin: auto;
  font-size: 3rem;
  text-align: center;
  color: rgb(20, 70, 155);
  background-color: rgb(10, 20, 30);
  text-shadow: 1px 5px 0 #084860, -1px -5px 0 #05a3b6;
  animation: shadow-dance 3s infinite;
}



/*
#HEADER > a:hover {
  color: rgb(120, 144, 240);
}
*/


/* Forms */

.form {
  position: relative;
  top: 0;
  padding: 0.1rem;
  width: 100%;
  display: block; 
  background-color: rgb(8, 8, 12);
  border-radius: 0.75rem;
}

.form * {
  margin-left: auto;
  margin-right: auto;
}

.form header {
  margin-top: 0.5rem;
  padding: 0.5rem;
  font-size: 1.7rem;
  font-weight: 600;
  color: rgb(200, 175, 170);
}

.form fieldset {
  margin-top: 1rem;
  padding: 0.25rem;
  background-color: rgb(10, 12, 20);
  border: 0.1rem solid rgb(80, 64, 92);
  border-radius: 0.75rem;
}

.fieldBox {
  position: relative;
  width: 98%;
  padding: 0.25rem;
  display: block;
}

/* (immediate) next sibling selector */
.fieldBox + .fieldBox {
  margin-top: 0.2rem;
}

.fieldBox > label {
  margin-top: 0;
  margin-bottom: 0.1rem;
  padding: 0.1rem;
  display: block;
  font-size: 1rem;
  color: rgb(208, 192, 160);
}

.fieldBox > input {
  padding: 0.25rem;
  display: block;
  width: 98%;
  font-size: 0.9rem;
  text-align: center;
  color: rgb(255, 228, 212);
  background-color: rgb(12, 12, 18);
  border: 0.1rem solid rgb(80, 64, 92);
  border-radius: 0.8rem;
}

.fieldBox > .feedbackList {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
}

.fieldBox .feedbackItem {
  padding: 0.05rem;
  font-size: 0.75rem;
}

.fieldBox > button {
  position: absolute;
  top: 0; 
  right: 0;
  padding: 0.25rem;
  font-size: 0.9rem;
  background-color: transparent;
  border: none;
}

.submitButton {
  margin: 0.75rem auto;
  font-size: 1.2rem;
  color: rgb(144, 160, 224);
}

.submitButton:hover {
  color: rgb(160, 192, 255);
}

.feedbackList {
  display: block;
  list-style: none;
  overflow-wrap: break-word;
}

.feedbackItem {
  line-height: 1.2;
}

.feedbackItem.waiting {
  color: rgb(208, 192, 240);
}

.feedbackItem.error {
  color: rgb(255, 128, 64);
}

.feedbackItem.success {
  color: rgb(144, 228, 144);
}

.feedbackBox {
  margin-top: 0.5rem;
  padding: 0.5rem;
}


.switch-menu-button-box {
  margin-top: 0.5rem;
  padding: 0.5rem;
  width: 80%;
}

.switch-menu-button {
  margin: auto;
  padding: 0.75rem;
  color: rgb(240, 192, 208);
  background-color: rgb(12, 12, 18);
}


/* AIRLOCK */

#login__FEEDBACK {
  padding: 0.5rem 0.1rem;
  font-size: 0.8rem;
  line-height: 1rem;
}

#register__FEEDBACK {
  padding: 0.5rem 0.1rem;
  font-size: 0.8rem;
  line-height: 1rem;
}



/* PLAZA */

#PLAZA__menu {
  height: 100%;
  padding: 0.2rem;
  background-color: rgb(10, 5, 12);
  border-radius: 0.5rem;
}

#PLAZA__menu .tab-list {
  gap: 0.5rem;
  padding: 0.2rem;
}

#PLAZA__menu .tab {
  flex: 1;
  font-size: 0.75rem;
}

#PLAZA__menu .tab.active {
  color: rgb(70, 100, 230);
}

#PLAZA__menu .tab label {
  cursor: pointer;
}

#PLAZA__homePanel {
  background-color: rgba(8, 20, 40, 0.9);
}

#PLAZA__menu button {
  font-size: 0.75em;
}

#PLAZA__joinPanel {
  background-color: rgba(8, 27, 15, 0.9);
}

#directionButton {
  font-size: 0.75em;
}

#PLAZA__createPanel {
  background-color: rgba(20, 8, 50, 0.9);
}

#lobby__MENU {
}


.chat-message {
  padding: 0.1rem;
  color: rgb(255, 255, 255);
}

.chat-receive-box {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 16rem;
  white-space: break-spaces;
}

/* Screen orientation and size detection */

@media (orientation: landscape) {
  #MAIN {
  }
}


@media (orientation: portrait) {
  #MAIN {
  }
}



@media (0px < width < 360px) {
}



@media (360px <= width < 768px) {
  #WRAPPER {
    width: 100%;
    font-size: 0.75rem;
  }

  #password__TOGGLE {
    position: absolute;
    top: 0;
    right: 0.5rem;
  }
}



@media (768px <= width < 1280px) {
  #WRAPPER {
    width: 70%;
    min-width: 640px;
    /* padding-top: 160%; /* Static aspect ratio of 10/16 */
  }

  /*
  .menuContainer {
    height: 20rem;
    width: 25rem;
    min-width: 500px;
  }
  */
}



@media (min-width: 1280px) {
  #WRAPPER {
    width: 75%;
    max-width: 1400px;
    /* padding-top: 62.5%; /* Static aspect ratio of 16:10 */
  }

}


@media (min-width: 1440px) {
  #WRAPPER {
    width: 75%;
    max-width: 1800px;
    /* padding-top: 62.5%; /* Static aspect ratio of 16:10 */
  }

}





@media (orientation: portrait) {
  .form fieldset {
    width: 90%;
  }
}

    /*---*/

