@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

html
{
  font-family: 'Rubik', 'Sans';
}

body
{
  margin: 0;
}

body > header
{
  background: #eb4034;
  min-height: 7rem;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px;
}

body > header > h1
{
  margin-top: 0;
  text-align: center;
  padding-top: 1rem;
}

body > header > nav > ul
{
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  padding: 0;
}

nav > ul > li
{
  list-style-type: none;
  padding: .2rem .4rem;
  background: #eb938d;
  margin-bottom: .3rem;
}

nav > ul > li > a
{
  color: #111;
  text-decoration: none;
}

main
{
  padding: 1rem;
  overflow: auto;
  min-height: calc(100vh - 7rem);
}

main > h2:first-of-type,
#match > h1,
#match > h1 > span > a
{
  background-image: linear-gradient(to right, #eb4034, #111, #eb4034, #111, #eb4034, #111, #eb4034);
  background-size: 200%;
  background-position: -200%;
  color: transparent;
  background-clip: text;
  animation: animated-gradient 10s linear infinite alternate-reverse;
}

@keyframes animated-gradient{
  to{
    background-position: 200%;
  }
}

main > a
{
  display: block;
  text-align: center;
  margin: auto;
}

#mtree
{
  display: flex;
  padding: 0;
}

#mtree > li
{
  flex-basis: 20rem;
  list-style-type: none;
  min-width: 100vw;
}

#mtree > li > section
{
  display: flex;
  flex-direction: column;
  height: 100%;
}

#mtree > li > section > h1,
#mtree > li > a
{
  display: block;
  font-size: 1rem;
  text-align: center;
  background: #ddd;
  margin: .5em 5em 2em 5em;
  padding: .3em;
  white-space: nowrap;
  color: #111;
  border: 5px solid white;
  box-shadow: rgba(17, 17, 26, 0.05) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 0px 8px;
}

#mtree > li > section > ul
{
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  column-gap: 2rem;
  padding: 0;
  height: 100%;
}

#mtree > li > section > ul > li
{
  list-style-type: none;
}

#calendar
{
  padding: 0;
}

#calendar > li
{
  list-style-type: none;
}

.match
{
  display: block;
  text-decoration: none;
  background: #333;
  border-radius: .5rem;
  color: #eee;
  width: 20rem;
  padding: .5rem;
  margin: auto;
  margin-bottom: 2em;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
  transition: box-shadow .1s;
}

.match:hover
{
  box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;
}

.match,
.match > *
{
  display: flex;
  justify-content: space-between;
}

.match > *
{
  flex-direction: column;
  justify-content: space-evenly;
  text-align: center;
}

.match a:not(.fighter)
{
  color: #eee;
}

.fighter
{
  background: #fcba03;
  color: #333;
  text-decoration: none;
  padding: .3rem;
  width: 10rem;
}

.fighter > img
{
  max-height: 2em;
  float: left;
  margin: -.3rem;
  margin-right: .3rem;
}

.match > aside
{
  text-align: center;
  padding: 2rem;
}

.match > aside > ul
{
  padding: 0;
  margin: .2em 0 .7em 0;
}

.match > aside > ul > li
{
  list-style-type: none;
}

#umatches
{
  padding: 0;
}

#umatches > li
{
  list-style-type: none;
}

label,
input[type="submit"]
{
  display: block;
  margin-top: 1rem;
}

textarea
{
  font-family: inherit;
  width: 50em;
  height: 20em;
}

#avatar
{
  float: left;
  max-height: 50vmin;
  margin: 0 1rem 1rem 0;
}

#umatches
{
  clear: both;
}

#fighters
{
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

#fighters > li
{
  position: relative;
  text-align: center;
  width: 30rem;
  max-height: 5em;
  min-height: 3em;
  list-style-type: none;
  background: #fcc;
  border-radius: 2rem;
  overflow: hidden;
  margin: 0 1rem 2rem 1rem;
  box-shadow: rgba(240, 46, 170, 0.4) 5px 5px, rgba(240, 46, 170, 0.3) 10px 10px, rgba(240, 46, 170, 0.2) 15px 15px, rgba(240, 46, 170, 0.1) 20px 20px, rgba(240, 46, 170, 0.05) 25px 25px;
}

#fighters > li > img
{
  max-height: 5em;
  //max-width: 5em;
  float: left;
  margin-right: .5rem;
}

#fighters > li > a
{
  color: #111;
  display: block;
  padding-top: 1em;
  font-weight: bold;
}

#fighters > li > a:last-child
{
  line-height: 3.5em;
}

#fighters > li > a:first-child:last-child
{
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  width: 100%;
}

#fighters > li > p
{
  color: #fcc;
  margin-right: 1em;
}

#fighters > li > p::first-line
{
  color: #111;
}

main > h2,
#match > h1
{
  text-align: center;
}

#match
{
  max-width: 50rem;
  margin: auto;
}

#match > h1
{
  display: flex;
  align-items: baseline;
  column-gap: 1em;
  justify-content: center;
}

#match > h1 a
{
  text-decoration: none;
  display: block;
}

#match > span:first-of-type
{
  display: flex;
  justify-content: center;
  column-gap: 1em;
  margin-bottom: 2rem;
}

#match > span > *
{
  background: #fcc;
  color: #111;
  padding: .3em 1em;
}

#match > aside
{
  text-align: center;
}

#match > aside > ul
{
  padding: 0;
}

#match > aside > ul > li
{
  list-style-type: none;
}

@media screen and (min-aspect-ratio: 1/1)
{
  #mtree
  {
    flex-direction: column-reverse;
    min-width: 100vw;
    width: fit-content;
  }

  #mtree > li
  {
    width: 100%;
  }

  #mtree > li > section
  {
    flex-direction: row;
    padding-left: 5em;
  }

  #mtree > li > section > h1
  {
    position: absolute;
    width: 10em;
    transform: rotate(-90deg) translateY(-12em) translateX(-7.5em);
    height: 1.7em;
    line-height: 1.7em;
    padding: 0 1em;
  }

  #mtree > li > section > ul
  {
    flex-direction: row;
    align-items: center;
    min-width: 100vw;
    width: 100%;
    margin: 0 3rem;
  }

  #mtree > .new
  {
    max-height: 3em;
  }

  .match
  {
    width: 25rem;
    flex-direction: column;
    row-gap: .5rem;
  }

  .match[open] > summary
  {
    align-items: center;
  }

  .match > b
  {
    column-gap: .5rem;
  }

  .match > *
  {
    flex-direction: row;
    align-items: baseline;
  }

  #match > aside
  {
    float: right;
  }
}
