@font-face {
  font-family: 'Balthazar';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/Balthazar-Regular.ttf) format('truetype');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
    background-color: #ebe1cf;
    font-family: 'Balthazar', serif;

    font-size: 24px;
    line-height: 1.5;
}

nav {
    background-color: #ebe1cf;
    background-image: url("/assets/svg/bar.svg");
    background-repeat: repeat-x;
    background-size: auto 10px;

    position: fixed;
    bottom: 0;

    width: 100vw;

    display: flex;
    list-style: none;
    justify-content: space-around;

    padding-top: 15px;
    padding-bottom: 5px;

    background-position-y: 2px;
}

@keyframes loading {
  0%   {background-position-x: 0;}
  100% {background-position-x: 64px;}
}

nav.htmx-request {
    animation-name: loading;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

nav > a[aria-selected="true"] {
    color: #ebe1cf;
    background-color: #781713;
}

nav > a[aria-selected="true"] > img {
    filter: brightness(0) saturate(100%) invert(88%) sepia(11%) saturate(875%) hue-rotate(325deg) brightness(113%) contrast(84%);
    -webkit-filter: brightness(0) saturate(100%) invert(88%) sepia(11%) saturate(875%) hue-rotate(325deg) brightness(113%) contrast(84%);
}

nav > a {
    flex-grow:1;
    flex-basis:0;
    background-color: rgba(183, 150, 85, 0.2);
    border-radius: 6px;
    margin: 5px;
    padding: 5px;
    color: black;

    display: flex;
    flex-direction: column;
    justify-content: center;

    font-weight: bold;
    text-decoration: none;

    transition: background-color 0.5s;
}

nav > a > img {
    height: 30px;
}

nav > a > p {
    font-size: 18px;
    text-align: center;
    margin-bottom: 0px;
}

header {
    padding: 10px;
}

header > img {
    height: 30px;
}

main {
    margin-bottom: 82px;
    padding: 12px;
    transition: all ease-in 1s ;
}

section:not(:first-child) {
    margin-top: 15px;
}

section:not(:last-child) {
    margin-bottom: 15px;
}

section > h1:before, section > h2:before {
    content: url("/assets/svg/crown.svg");
    margin-right: 15px;
}

section > h1:after, section > h2:after {
    content: url("/assets/svg/crown.svg");
    margin-left: 15px;
}

section > h1, section > h2, section > h3, section > h4, section > h5, section > h6 {
    margin-bottom: 14px;
    text-align: center;
}

section > p {
    margin-bottom: 10px;
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 34px;
}

h3 {
    font-size: 26px;
}

em {
    color: #781713;
}

table {
    width: 100%;
}

td {
    padding: 5px;
}

thead {
    border-top: 1px solid #b79655;
    border-bottom: 1px solid #b79655;
    font-weight: bold;
    font-size: 26px;
}

.challenges > li {
    padding: 10px;
}

.challenges > li:nth-child(odd) {
    background-color: rgba(183, 150, 85, 0.2);
}

tbody > tr:nth-child(even), .challenges > li:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.3);
}

tbody > tr:nth-child(1) {
    background-color: rgba(183, 150, 85, 0.3);
}

tbody > tr:nth-child(2) {
    background-color: rgba(183, 150, 85, 0.2);
}

tbody > tr:not(:last-child) {
    border-bottom: 1px solid #b79655;
}

hr:last-child {
    display: none;
}

hr {
    border: 0;
    height: 8px;
    background-image: url("/assets/svg/crown.svg");
    background-size: auto 8px;
}

small {
    font-size: 16px;
    opacity: 0.65;
}

aside {
    text-align: right;
    margin-bottom: 30px;
}

aside > p {
    font-size: 18px;
    font-style: italic;

    opacity: 0.8;

    line-height: 1;
    margin-bottom: 5px;
}

li {
    list-style: none;
}

input[type="file"] {
  display: none;
}

details {
    margin-bottom: 10px;
}

details > p {
    font-size: 18px;
    margin-left: 20px;
    margin-right: 20px;
}

details > summary {
  list-style: none;
  background-color: rgba(183, 150, 85, 0.5);
  padding: 5px;

  border-radius: 10px;
}

details > summary::-webkit-details-marker {
  display: none;
}

a {
    color: #781713;
    text-decoration: underline;
}

.file-upload {
    display: flex;
    height: 150px;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background-color: #0f5594;
    color: #ebe1cf;

    border-radius: 10px;

    margin-bottom: 30px;
}

.hidden {
    display: none;
}

.file-upload > p {
    text-align: center;
}

.pizza > li {
    list-style-image: url("/assets/svg/bullet.svg");
    list-style-position: inside;
    margin-bottom: 5px;
}

.pizza > li > p {
    display: inline;
}

.challenges > li {
    padding-top: 5px;
    padding-bottom: 5px;
}

.challenges > li h3 {
    margin-bottom: -12px;
}

.challenges > li:not(:last-child) {
    border-bottom: 1px solid #b79655;
}

.challenges > li {
    display: flex;
    justify-content: space-between;
}

.king-score > div {
    color: #ebe1cf;
    padding: 10px;
    border-radius: 10px;
    width: 120px;
}

.king-score > div:first-child {
    background-color: #0f5594;
}

.king-score > div:last-child {
    text-align: right;
    background-color: #781713;
}

.king-score {
    display: flex;
    justify-content: space-between;
}

.submission-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submission-details > ul > li:not(:last-child) {
    margin-bottom: -15px;
}

.submission-likes {
    font-size: 28px;
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake {
    animation-duration: 0.5s;
    animation-name: shake;
}

.trichter {
    background-image: url("/assets/img/trichter_m.png");
    background-position: bottom;
    background-repeat: repeat-x;

    width: 1%;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

@media (width >= 1000px) {
    body {
	display: flex;
	justify-content: center;
    }

    main, nav {
	width: 900px;
    }
}


@media (width < 1000px) {
    nav {
	left: 0;
    }
}

.tab-list {
    position: sticky;
    top: 0;

    z-index:1000;

    margin-bottom: 20px;

    background-color: #ebe1cf;

    gap: 10px;

    display: flex;
    padding-top: 8px;
    padding-bottom: 8px;
}

.tab-list > button {
    font-family: 'Balthazar', serif;
    font-size: 24px;
    font-weight: bold;

    border: 0;
    border-radius: 10px;
    z-index:1001;

    flex-grow: 1;
    flex-basis: 0;

    background-color: rgba(183, 150, 85, 0.5);

    padding-top: 8px;
    padding-bottom: 8px;
}

.tab-list > button[aria-selected="true"] {
    background-color: #781713;
    color: #ebe1cf;
}

div.info, div.success, div.error {
    border-radius: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 10px;
    color: #ebe1cf;

    text-align: center;
}

div.info {
    background-color: #0f5594;
}

div.success {
    background-color: #137836;
}

div.error {
    background-color: #781713;
}

.user-score > td > a {
    color: #ebe1cf !important;
}

.user-score {
    color: #ebe1cf !important;
    background-color: #137836 !important;
}

.login-form > form > div {
    display: flex;
    flex-direction: column;

    gap: 20px;
    
    width: 100%;
    height: 100%:
}

.login-form > form > div > div > label {
    width: 100%;
}

.login-form input {
    width: 100%;
    border-radius: 10px;

    border: 0;
    height: 40px;
    font-size: 24px;
}

.login-form button {
    width: 100%;
    padding: 20px;

    border:0;
    border-radius: 10px;

    color: #ebe1cf;
    background-color: #0f5594;

    font-family: 'Balthazar', serif;
    font-size: 24px;
}

.login-form button[type="submit"] {
    background-color: #781713;
}

.login-form button[type="submit"]:disabled {
    opacity: 0.5;
    background-color: #781713;
}
