/* center body to make it look readable */
body {
    font-size: 20px;
    margin: 10px auto;
    width: fit-content;
    max-width: 90%;
    min-width: 50%;
    background: #141516;
    color: #ccc;
    /* Novocento and Noto is used by Arknights in-game */
    font-family: "Novocento Sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    position: relative;
}

h1, h2, h3, h4 {
  color: #eee;
  margin: 0;
}

h1 {
    font-size: 54px;
}

h2 {
    font-size: 38px;
}

h3 {
    font-size: 27px;
}

h4 {
    font-size: 24px;
}

img {
    /* a bit smaller than the text for inline */
    height: 16px;
}

footer {
    bottom: 20px;
    text-align: center;
}

code {
    white-space: pre-line;
}

#export > code {
    font-size: 12px;
    /* make the line height smaller, this does nothing for some reason */
    padding: 0;
    line-height: 12px;
    margin: 0px 0px;
}

h1 > img {
    /* a bit smaller than the text for inline */
    height: 64px;
}

h2 > img {
    /* a bit smaller than the text for inline */
    height: 36px;
}

h3 > img {
    /* a bit smaller than the text for inline */
    height: 24px;
}

h4 > img {
    /* a bit smaller than the text for inline */
    height: 16px;
}

a:link {
    color: lightblue;
}

a:visited {
    color: lightpink;
}

#logo {
    width: 30px;
    height: max-content;
}

#search {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* forms */
#login {
    /* always float in top-right */
    position: absolute;
    top: 0;
    right: 0;
    margin: 2px;
}

/* enable hovering on images */
.hoverable {
    position: relative;
}

.thumb span {
    position: absolute;
    visibility: hidden;
}

.thumb:hover,
.thumb:hover span {
    visibility: visible;
    /* hack to place the image to the right center */
    /* TODO: Make it go anywhere available on the screen */
    left: 20px;
    /* top: 0; */
    top: -128px;
    z-index: 1;
}

.thumb span img {
    /* TODO: The image is still loaded on phones despite being impossible to click */
    height: 512px;
}

/* black border makes it easy to separate, just use <hr> between items */
.simple-border {
    border: 2px solid #777;
    padding: 10px;
}

/* these are always placed in front of text */
.avatar-img {
    height: 100px;
    float: left;
}

.operator-img {
    height: 40px;
    float: left;
    margin-right: 10px;
}

/* TODO: Combine the images normally */
.mastery-img {
    /* hardcoded to the bottom right corner of the skill */
    position: absolute;
    top: 6px;
    left: 5px;
    height: 10px;
    background-color: #00000060;
}

/* TODO: this should probably be done with header tags */
.title {
    font-size: 40px;
}

/* TODO: I don't think these should require classes */
.relative {
    position: relative;
}

.clear-both {
    clear: both;
}

.announcement-iframe {
  border-radius: 5px;
}

#users {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.user {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 2px solid #777;
  padding: 15px;
  background-color: #272828cc;
  overflow: hidden;
  border-radius: 15px;
}

.user-background {
  position: absolute;
  width: 100%;
  height: 200%;
  z-index: -1;
  top: 0;
  left: -25%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-header {
  display: flex;
  gap: 10px;
}

.user-body {
  display: flex;
  justify-content: space-evenly;
}

.user-body > div {
  width: 50%;
}

.user-supports {
  display: flex;
  gap: 5px;
}

.support-operator {
  width: 33%;
  box-sizing: border-box;
  border-radius: 5px;
  background-color: #111a;
}

.support-portrait-anchor {
  width: 100%;
  display: inline-block;
  position: relative;
}

.support-portrait {
  width: 100%;
  height: fit-content;
}

.support-portrait-anchor::after { 
  content: '';
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(transparent, 70%, black);
}

.support-portrait-text {
  display: flex;
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  flex-direction: column;
  align-items: baseline;
  color: #eee;
}

.support-portrait-text > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.support-portrait-text img {
  height: 32px;
}

.portrait-skill {
  position: absolute;
  width: 40%;
  z-index: 1;
  display: inline-block;
  bottom: 0;
  right: 5px;
}

.portrait-skill .mastery-img{
  height: 30%;
  top: 2px;
  left: 2px;
}

.portrait-skill .on-portrait-skill {
  height: unset;
  width: 100%;
}

.support-info {
  padding: 5px;
  text-align: center;
}

.support-other-skill-container { 
  display: flex;
  gap: 5px;
  padding: 0 10px;
  margin: 5px 0;
}

.support-other-skills {
  display: inline-block;
  width: 33%;
  aspect-ratio: 1/1;
}

.other-skill-icon {
  height: unset;
  width: 100%;
}

.support-other-skills .mastery-img {
  height: 30%;
  top: 2px;
  left: 2px;
}

.support-module {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.support-module > img {
  height: 32px;
}

@media only screen and (max-width: 1200px) {
  .user-body {
    flex-direction: column;
  }
  .user-body > div {
    width: 100% !important; /* why??? */
  }
  .user-background {
    left: 0;
  }
}
