@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/Atkinson-Hyperlegible-Regular-102.otf");
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/Atkinson-Hyperlegible-Bold-102.otf");
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/Atkinson-Hyperlegible-Italic-102.otf");
    font-weight: 400;
    font-style: italic;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/Atkinson-Hyperlegible-BoldItalic-102.otf");
    font-weight: 700;
    font-style: italic;
}

html {
    --haitouch-purple:  #56405c;
    --haitouch-purple2: #3a2b3f;
    --haitouch-blue:    #6594e5;
    --haitouch-blue2:   #c8f3ff;
    --haitouch-pink:    #f63886;
    --haitouch-pink2:   #ffc2ee;

    background-color: var(--haitouch-purple2);
    font-family: "Atkinson Hyperlegible", sans-serif;
}

body {
    margin: 0;
    display: flex;
    flex-direction: column;
}

li + li {
    margin-top: 1rem;
}

header {
    display: block;
    flex-grow: 0;
    flex-shrink: 0;
    z-index: 8964;
    background-color: var(--haitouch-purple);
    box-shadow: 0px 1px 3px #000;
}

header #logo {
    display: block;
    flex-grow: 1;
    flex-shrink: 1;
    width: auto;
    max-width: 100vw;
    height: auto;
    max-height: 64px;
    margin: 0 auto;
}

/* undo any link styling when we're in the header*/
header a,
header a:visited {
  text-decoration: none;
}
header a::before,
header a:visited::before {
  display: none;
}

#langs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    max-width: 540px;
    margin: 8px auto 0;
    gap: 1rem;
}

#main {
    color: #fff;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

a {
    color: var(--haitouch-blue2);
    position: relative;
    text-decoration: none;
    z-index: 1;
}

a::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0.3em;
    background-color: var(--haitouch-blue);
    z-index: -1;
    transition: height 0.125s ease-out;
}

a:hover::before {
    height: 1em;
}

a:visited {
    color: var(--haitouch-pink2);
}

a:visited:before {
    background-color: var(--haitouch-pink);
}

.gamelist a {
    color: var(--haitouch-blue);
}

.gamelist a:visited {
    color: var(--haitouch-pink);
}

.gamelist a::before {
    background-color: var(--haitouch-blue2);
}

.gamelist a:visited::before {
    background-color: var(--haitouch-pink2);
}

a.big-bottom-link {
    display: block;
    text-align: center;
    width: 256px;
    margin: 8px auto 24px;
    padding: 0.7em;
    background-color: var(--haitouch-blue);
    color: black;
    border-radius: 8px;
    font-size: 1.25rem;
}
a.big-bottom-link:hover {
    background-color: var(--haitouch-blue2);
}
a.big-bottom-link::before {
    display: none;
}

#main > p {
    padding: 0 8px;
}

h3 {
    padding: 0 8px;
}

h4 {
    font-size: 1.2rem;
    margin: 0;
    padding: 0.25rem 0 0;
    font-weight: 400;
}

.gamelist {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    min-width: 0px;
    max-width: 540px;
    list-style-type: none;
    align-items: stretch;
}

.gamelist > li {
    background-color: #fff;
    color: #000;
    border-width: 2px;
    border-radius: 16px;
    border: solid #8085a0;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 1px 4px 0 2px #a0a6b0;
    width: 100%;
    box-sizing: border-box;
}

.gamelist > li h4 {
    margin: 0;
}


.gamelist .thumbnail {
    width: 300px;
    height: 210px;
    float: right;
    margin-left: 12px;
}

.gamelist > li ul {
    margin: 0 auto;
    padding: 0;
}

.gamelist > li ul li {
    list-style-position: inside;
}

.gamelist a {
    color: var(--haitouch-blue);
}

.gamelist a:visited {
    color: var(--haitouch-pink);
}

.kb,
.gp,
.ms,
.tc,
.rm {
    display: inline-block;
}

.kb::before,
.gp::before,
.ms::before,
.tc::before,
.rm::before {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    content: " ";
    margin-bottom: -0.25em;
    margin-right: 0.25em;
}

.kb::before {
    background-image: url('img/keyboard.svg');
}

.gp::before {
    background-image: url('img/gamepad.svg');
}

.ms::before {
    background-image: url('img/mouse.svg');
}

.tc::before {
    background-image: url('img/touch.svg');
}

.rm::before {
    background-image: url('img/remote.svg');
}

.videobox {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    position: relative;
    margin-block: 0.5rem;
}

.videobox > iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}