@font-face {
    font-family: 'advance';
    src: url('Sonic Advance.ttf');
}

@font-face {
    font-family: 'advance 2';
    src: url('Sonic Advanced 2.ttf');
}

body {
  background: #DCF0FF;
  background-image: url(assets/bg-mm.png);
  background-repeat: repeat;
  animation: bgScroll 3s linear infinite;
  margin: 0;
  overflow-x: hidden;
}

@keyframes bgScroll {
  0% {
    background-position: 0px 0px;
  }
  100% {
    background-position: -374px 0px;
  }
}

.title-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.title-screen img {
  max-width: 80%;
  height: auto;
  margin-bottom: 60px;
}

.copyright-stuff {
  background-color: black;
  color: white;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: -20px 20px 70px -20px;
  margin-left: -20px;
  font-family: "Advance", sans-serif;
  line-height: 30px;
  padding: 10px 0px 10px 0px;
}

.title-screen-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  margin-left: -15px;
}

.title-screen-buttons a {
    display: block;
    width: 100%;
    padding: 0px 0px;
    text-align: center;
    text-decoration: none;
    font-family: "Advance", sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: black;
    background: transparent;
    position: relative;
    border: none;
    box-sizing: border-box;
  letter-spacing: 2px;
}

.title-screen-buttons a:hover {
    background: black;
    color: white;
    transform: scale(1.02);
  width: 100%;
}

.header {
  height: 160px;
  background-color: black;
  display: flex;
  align-items: center;
  padding: 20px 30px;
  gap: 20px;
  /*from https://css-generators.com/custom-borders/ */
  mask: conic-gradient(from -45deg at bottom,#0000,#000 1deg 89deg,#0000 90deg) 50%/48px 100%;
}

.header p {
  color: white;
  font-family: "Advance", sans-serif;
  font-size: 10px;
  margin: 0px 0px 0px 70px;
  letter-spacing: 1px;
}

.title {
  padding: 0px; -20px 0px 0px;
}

.header img {
  padding: 5px 0px 0px 30px;
}

.links-ahoy {
  display: flex;
  gap: 30px;
  align-items: center;
  margin-left: auto;
}

.links-ahoy a {
  color: white;
  text-decoration: none;
  font-family: "Advance", sans-serif;
  font-size: 16px;
  position: relative;
  padding-bottom: 5px;
}

.links-ahoy a::after {
  content: "▼";
  transform: scale(-1, 1);
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  font-size: 22px;
  color: white;
}

.links-ahoy a:hover::after {
  transform: translateX(-50%) scale(1); /* Appear with animation */
}

.scrolling-text {
    animation: textwrap 1s linear infinite;
    height: 36px;
    background-image: url(text-template.png);
    background-repeat: repeat-x;
    background-size: contain;
    display: inline-block;
    white-space: nowrap;
    width: 150%;
}

@keyframes textwrap {
    0% {
        transform: translateX(-217px);
    }
    100% {
        transform: translateX(0);
    }
}

.history {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
}

.history-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 800px;
  padding: 20px;
  text-align: center;
}

.history-logo {
  border: solid 5px black;
  border-radius: 26px;
  padding: 0px 20px 0px 20px;
  background-color: #F00198;
}

.history-entry img {
  display: block;
  max-width: 100%;
  height: auto;
  background-color: white;
  padding: 15px;
  border: solid 5px #F00198;
  border-radius: 20px;
}

.history-entry p {
  text-align: center;
  max-width: 600px;
  margin: 20px auto;
  font-family: "Advance 2", sans-serif;
  font-size: 29px;
}

.char-series {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.char-box {
    border: 4px solid black;
    background-color: white;
    border-radius: 20px;
    position: relative;
    z-index: 3;
    margin: 150px 0 0 0;
    flex: 0 0 calc(50% - 15px);
    max-width: calc(50% - 15px);
    box-sizing: border-box;
    margin-bottom: 20px;
}

.char-box:last-child:nth-child(odd) {
    margin-left: auto;
    margin-right: auto;
}

.char-name h2 {
  margin: -54px -50px 0px 0px;
  padding-left: 20px;
  color: white;
  font-size: 18px;
  font-family: "Advance", sans-serif;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  position: relative;
  z-index: 3;
}

.char-name img {
  margin: -200px 0px 0px 90px;
  z-index: -2;
  position: relative;
}

.char-box-inner {
  background-color: #000BFF;
  padding: 5px 0px 5px 0px;
  border-radius: 12px;
  margin: -8px 4px 4px 4px;
}

.char-box-inner p {
  font-family: "Advance 2", sans-serif;
  font-size: 40px;
  color: white;
  background-color: #0A0A0A;
  padding: 0px 20px 0px 20px;
  margin: 0px 20px 0px 20px;
}

.char-box-inner a {
  color: white;
}

.credits {
  color: white;
  font-family: "Advance", sans-serif;
  font-size: 12px;
  line-height: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 900px;
  padding: 20px;
  text-align: center;
}

.credits h2 {
  line-height: 35px;
}