:is(h1, h2, h3, h4, h5, h6, p) {
  margin: 0;  
}

:root {
  --main-border-color: hsla(240, 14%, 60%, 1);
}

html, body {
  padding: 0;
  margin: 0;
}

html {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

body {
  position: relative;
  /*overflow: scroll;*/
  background: radial-gradient(ellipse at left top, hsl(295, 100%, 15%), transparent 50%),
              radial-gradient(ellipse at right bottom, hsl(266, 100%, 15%), transparent 50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  height: 100%;
  width: 100%;
  /*padding: 0px 8px;*/
  
  color: #F0F0F0;
  font-family: Sylfaen, "Times New Roman", serif;
  
  font-size: 18px;
  
  z-index: 0;
  
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
}



#background-overlay {
  height: 100%;
  z-index: 0;
  opacity: 0.5;
  flex: 0 1;
  animation: 0.75s ease-in overlay-fade-in;
}

@keyframes overlay-fade-in {
  0% {
    transform: translateX(-30px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  @keyframes overlay-fade-in {
    0% {
      transform: translateX(0);
      opacity: 0;
    }
    100% {
      transform: translateX(0);
      opacity: 0.5;
    }
  }
}

#main-screen {
  box-sizing: border-box;
  margin: 20px;
  padding: 0px 8px;
  border: 1px solid var(--main-border-color);
  border-radius: 10px;
  
  position: relative;
  
  background: radial-gradient(circle at left top, hsl(295, 30%, 40%), hsl(334, 50%, 5%) 30%, hsl(266, 50%, 5%) 80%, hsl(266, 50%, 20%) 95%);
  
  flex: 1 0;
  max-height: calc(100% - 40px);
  z-index: 1;

  overflow: hidden;

  display: flex;
  flex-flow: column nowrap;
}

#top-bar {
  flex: 0 0;

  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-end;
  
  
  border-bottom: 1px solid var(--main-border-color);
  padding: 0;
  
  & > :is(h1, h2, h3, h4, h5, h6) {
    align-self: flex-end;
    margin: 0px 0px 0px 4px;
  }

  & .last-header {
    align-self: flex-end;
    padding: 0px 2px 0px 16px;
    margin-right: auto;
    overflow: hidden;
  }

  & > h1 {
   font-size: 48px;
   line-height: 100%;
  }
  
  & button {
    box-sizing: border-box;
    
    appearance: none;
    background: linear-gradient(to bottom, hsla(260, 20%, 40%, 1), transparent 30%, hsla(260, 50%, 40%, 1) 90%);

    
    color: inherit;
    
    border: 1px solid var(--main-border-color);
    border-radius: 4px;
    margin: 0 2px;
    padding: 4px;
    
    height: 100%;

    cursor: pointer;
    &:active {
      background: linear-gradient(to bottom, hsla(260, 20%, 10%, 1), transparent 30%, hsla(260, 50%, 10%, 1) 90%);
    }
  }
}

table.infobox {
  
  border-collapse: collapse;
  
  margin: 4px;
  border: 2px solid var(--main-border-color);
  
  width: 35%;
  
  & tr {
    &:not(:last-child) {
      border-bottom: 1px solid var(--main-border-color);
    }

    & th {
      width: 100%;
      text-align: center;
      font-size: 30px;
    }
    & th, td {
      padding: 3px 8px;  
    }
    
    & td:first-child {
      width: 20%;
      text-align: center;
      font-weight: bold;
      border-right: 1px solid var(--main-border-color);
    }
    & td:last-child {
      font-size: 16px;
      & p {
        &:not(:last-child) {
          margin-bottom: 4px;
        }

        & span.smaller {
          font-size: 12px;
        }
      }
    }
  }
  
  float: right;
}

section.tab-contents {
  flex: 1 0;
  overflow: scroll;
  max-height: stretch;
  & > p {
    margin: 6px;
    margin-bottom: 12px;
  }
}

body.preload .character-title {
  animation-duration: 0s !important;
  -webkit-animation-duration: 0s !important;
  transition: background-color 0s, opacity 0s, color 0s, width 0s, height 0s, padding 0s, margin 0s !important;
}

.character-title {
  animation: 0.15s cubic-bezier(0.0, 0, 1, 1) swooce-in;
  overflow: hidden;
  transform: translateZ(0);
  opacity: 1;
}
.character-title.out {
  animation: 0.15s cubic-bezier(0.0, 0, 1, 1) swooce-out;
  opacity: 0;
  filter: blur(10px);
  transform: translateX(100%);
}


@keyframes swooce-in {
  0% {
    filter: blur(10px);
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    filter: blur(0);
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes swooce-out {
  0% {
    filter: blur(0);
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    filter: blur(10px);
    transform: translateX(100%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes swooce-in {
  0% {
    filter: blur(10px);
    transform: translateX(0);
    opacity: 0;
  }
  100% {
    filter: blur(0);
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes swooce-out {
  0% {
    filter: blur(0);
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    filter: blur(10px);
    transform: translateX(0);
    opacity: 0;
  }
}
}