* {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    box-sizing: border-box;
}

html, body {
    margin: 0 0 0 0;
    padding: 0 0 0 0;

    width: 100vw;
    min-height: 100vh;
}

body {
    display: flex;
    flex-flow: column nowrap;

    /*justify-content: space-between;*/
    align-items: stretch;
}

header, footer {
    width: 100%;

    flex-shrink: 0;

    display: flex;
    flex-flow: row wrap;

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

    background-color: #eee;

    padding: 0.5rem 0.5rem 0.5rem 0.5rem;

    gap: 0.5rem;
}

footer {
    flex-direction: row;
}

footer.imprint {
    flex-direction: column;
}

header>h1 {
    margin: 0 0 0 0;
}

h1>a {
    color: #000;
    text-decoration: none;
}

h1>a:hover {
    text-decoration: underline;
}

a {
    color: #000;
}

header .header-right-area {
    display: flex;
    flex-flow: row nowrap;
}

button {
    background-color: rgb(49, 207, 255);

    border: none;
    border-radius: 4px;

    padding: 0.5rem 0.5rem 0.5rem 0.5rem;

    color: #000;

    transition: background-color 0.25s;
}

button:hover {
    background-color: rgb(46, 185, 228);
    cursor: pointer;
}

button:active {
    background-color: rgb(40, 161, 198)
}

header .header-buttons {
    display: flex;

    flex-flow: row wrap;
    align-items: center;

    gap: 0.25rem;

    overflow-x: auto;
}

header .header-short-points {
    display: none;
}

#header-reindeer-container {
    height: 0rem;
}

@media only screen and (max-width: 28rem) {
    header .header-points {
        display: none;
    }
}

@media only screen and (min-width: 28rem) and (max-width: 32.5rem) {
    header .header-points {
        display: none;
    }

    header .header-short-points {
        display: initial;
    }
}

main {
    width: 100%;
    flex-grow: 1;

    display: flex;
    flex-flow: column nowrap;
}

#challenge-cards {
    width: 100%;
    /*height: 100%;*/

    display: flex;

    flex-flow: row wrap;
    justify-content: left;
    align-content: center;
}

.challenge-card {
    margin: 0.5rem 0.5rem 0.5rem 0.5rem;
    padding: 0.2rem 0.2rem 0.2rem 0.2rem;

    display: flex;
    /*position: relative;*/

    flex-flow: column nowrap;
    align-items: center;
    justify-content: space-around;

    background-color: #eee;

    width: 7rem;
    height: 7rem;

    transition: background-color 0.5s, border-color 0.5s;
}

.challenge-card-name {
    width: 100%;
    text-align: center;

    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.challenge-card:hover {
    background-color: #ddd;
    cursor: pointer;
}

.challenge-card:active {
    background-color: #ccc;
}

.challenge-card:not(.completed) {
    border: 4px solid #eee;
}

.challenge-card:not(.completed):hover {
    border: 4px solid #ddd;
}

.challenge-card:not(.completed):active {
    border: 4px solid #ccc;
}

.challenge-card.completed {
    border: 4px solid #5c5;
}

.challenge-card.completed:hover {
    border: 4px solid #4b4;
}

.challenge-card.completed:active {
    border: 4px solid #3a3;
}

.challenge-card>h2 {
    margin: 0 0 0 0;
    padding: 0 0 0 0;

    font-size: 24pt;
}

#challenge-popups {
    display: none;
    /* display none now, flex later */

    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;

    margin: 0 0 0 0;
    padding: 0 0 0 0;

    position: fixed;
    z-index: 3;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    background-color: rgba(0, 0, 0, 0.5);
}

.challenge-popup {
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;

    position: absolute;
    width: 50rem;
    max-width: 95vw;
    height: 30rem;
    max-height: 95vh;
    overflow: auto;

    transition: transform 0.5s;
    transform: scale(0);

    background-color: #fff;
    border-style: none;
    border-radius: 8px;
}

.challenge-popup.zoom-effect {
    transform: scale(1);
}

.challenge-header {
    display: flex;
    flex-flow: row wrap;

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

    width: 100%;
}

.challenge-header>* {
    margin: 0.5rem 0.5rem 0.5rem 0.5rem;
}

.challenge-content-container {
    /*max-height: 20rem;
    overflow: auto;
    position: relative;*/
}

.challenge-content-overlay {
    pointer-events: none;
    position: absolute;
    width: 100%;
    height: 20rem;
}

.challenge-content-overlay.feedback-shown {
    height: 16rem;
    transition: .5s;
}

.challenge-content {
    margin: 1rem 1rem 1rem 1rem;

    line-height: 1.5rem;
    max-height: 20rem;

    overflow: auto;
}

.challenge-content.feedback-shown { /* change challenge-content-overlay too */
    max-height: 16rem;

    /*transition: max-height 0.5s, padding 0.5s, margin 0.5s, opacity 1s;*/
    transition: .5s;
}

.challenge-content-gradient-top, .challenge-content-gradient-bottom {
    position: absolute;
    width: 100%;
    left: 0;
    right: 0;
    height: 1rem;
    display: none;
}

.challenge-content-gradient-top {
    background: linear-gradient(to top, rgba(255, 255, 255, 0) 0%, #eee 100%);
}

.challenge-content-gradient-bottom {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #eee 100%);
    bottom: 0;
}

.challenge-popup-file-list {
    margin: 1rem 1rem 1rem 1rem;
    border-radius: 16px;
    padding: 0.25rem 0.5rem 0.25rem 0.5rem;

    background-color: #eee;

    display: flex;
    flex-flow: row wrap;
}

.challenge-popup-file-list-entry {
    padding: 1rem 1rem 1rem 1rem;
    border-radius: 8px;
    margin: 0.5rem 0.5rem 0.5rem 0.5rem;

    background-color: #fff;

    transition: box-shadow 0.5s;
}

a.challenge-popup-file-list-entry {
    color: #000;
}

.challenge-popup-file-list-entry:hover {
    box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.5);
}

.category {
    color: #fff;
    border-radius: 10px;
    padding: 0px 5px 0px 5px;

    text-align: center;
}

.category-Einfach {
    background-color: rgb(54, 214, 116);
}

.category-Mittel {
    background-color: rgb(255, 167, 66);
}

.category-Schwer {
    background-color: rgb(214, 54, 54);
}

.category-Extrem {
    background-color: rgb(134, 54, 214);
}

.category-Crypto {
    background-color: #a7c7fc;
    color: #000;
}

.category-CSS {
    background-color: #66309a;
}

.category-GIT {
    background-color: #f15030;
}

.category-HTML {
    background-color: #e54c21;
}

.category-HTTP {
    background-color: #005b9c;
}

.category-JS {
    background-color: #e9c930;
}

.challenge-flag-submission {
    display: flex;
    flex-flow: column nowrap;
}

.challenge-input-form {
    align-self: center;
}

.challenge-flag-submission-feedback-container {
    position: relative;
}

.challenge-input {
    background-color: #eee;
    font-size: large;

    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    border: none;
    border-radius: 4px;

    width: 24rem;
    max-width: 95vw;
    margin: 0.125rem;
}

.challenge-input-button {
    background-color: rgb(54, 214, 116);
    color: #fff;
    font-size: large;

    min-width: 6rem;
    /*margin-left: .375rem;*/
    margin-bottom: 1rem;
}

.login-input-button {
    margin-bottom: 0rem;
}

.challenge-input-button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

.challenge-input-button:hover:not([disabled]) {
    background-color: rgb(49, 197, 106);
}

.challenge-input-button:active:not([disabled]) {
    background-color: rgb(44, 173, 94);
}

.centered-form {
    width: 100%;
    flex-grow: 1;

    display: flex;
    flex-flow: column nowrap;

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

.feedback {
    margin: 1rem 1rem 1rem 1rem;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 1rem;
}

.feedback.ok {
    background-color: rgb(157, 241, 189);
}

.feedback.fail {
    background-color: rgb(241, 162, 157);
}

.feedback.login {
    background-color: #ddd;
}

.feedback-flag-submission {
    margin-top: 0rem;

    max-height: 5rem;
    transition: max-height 0.5s, padding 0.5s, margin 0.5s, opacity 1s;
}

.feedback-flag-submission.minimized {
    max-height: 0rem;
    padding: 0rem 1rem 0rem 1rem;
    margin: 0rem 1rem 0rem 1rem;
    opacity: 0;
}

#bestenliste {
    border-collapse: collapse;
    margin-bottom: 2rem;
}

#bestenliste td, #bestenliste th {
    padding: 0.5rem 0.25rem 0.5rem 0.25rem;
}

#bestenliste tr {
    background-color: #eee;
}

#bestenliste tr:nth-child(2) {
    background-color: gold;
}

#bestenliste tr:nth-child(3) {
    background-color: silver;
}

#bestenliste tr:nth-child(4) {
    background-color: coral;
}

#bestenliste th:nth-child(2) {
    text-align: left;
}

#bestenliste td:nth-child(1), #bestenliste th:nth-child(1), #bestenliste td:nth-child(3), #bestenliste th:nth-child(3) {
    text-align: right;
}

#bestenliste th:nth-child(1) {
    padding-left: 0.5rem;
}

#bestenliste th:nth-child(3), #bestenliste td:nth-child(3) {
    padding-right: 1rem;
}

tr.bestenliste-self {
    font-weight: bold;
}

tr.bestenliste-anonymous-user {
    color: #999 !important;
}

tr.bestenliste-hidden-user {
    color: #ccc !important;
    font-style: oblique;
}

.bestenliste-form {
    margin-bottom: 1rem;
    text-align: center;
}

.bestenliste-form > button {
    margin-top: 0.5rem;
}

.footer-item-1 {
    align-self: center;
}

.footer-item-2 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.footer-placeholder {
    width: 20rem;
}

.footer-top {
    display: flex;
    /* margin-bottom: .5rem; */

    width: 100%;
    flex-wrap: wrap;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    flex-wrap: wrap;
}

@keyframes rainbow {
    0% {
        background-color: red;
    }

    20% {
        background-color: yellow;
    }

    40% {
        background-color: lime;
    }

    60% {
        background-color: blue;
    }

    80% {
        background-color: magenta;
    }

    100% {
        background-color: red;
    }
}

.rainbow-color {
    /*color: linear-gradient(130deg,#ff7a18,#af002d 41.07%,#973131 76.05%);*/
    /*background: linear-gradient(130deg,#ff7a18,#af002d 41.07%,#319197 76.05%);*/
    /*background: linear-gradient(0deg, rgba(255, 0, 0, 1) 0%, rgba(255, 255, 0, 1) 20%, rgba(0, 255, 0, 1) 40%, rgba(0, 0, 255, 1) 60%, rgba(255, 0, 255, 1) 80%);*/
    animation: rainbow 5s infinite;
    transition: color 1s;
    background-clip: unset;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    width: fit-content;
    margin-left: auto;
}

.category-explain {
    display: flex;
    margin-right: 1rem;
}

.bonus-explain {
    margin-left: 3rem;
}

.p-info {
    margin-top: 8rem;
}

.p-info.a {
    margin-top: 3rem;
}

.p-info.b {
    margin-left: 2rem;
}

.p-info {
    margin-top: 2rem;
}

.center-flex {
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenge-form {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: min-content;
}

.form-section {
    margin: 0.5rem 0rem 0.5rem 0rem;
}

.hidden {
    display: none;
}

.about-div {
    margin: 2rem;
    padding: 1rem;

    background-color: #eee;

    border-radius: 3px;
}

.challenge-over {
    background-color: #fff;
    padding: 2rem 1rem 0.25rem 1rem;
    margin-bottom: 1rem;
}

.challenge-solution {
    background-color: #eee;

    margin-bottom: 1rem;
    border-radius: 4px;
    padding: 0.5rem 1rem 0.5rem 1rem;
}

.challenge-solution-header {
    font-size: 14pt;

    margin: 0 0 0 0;
    padding: 0 0 0 0;
}

.challenge-solution-header:hover {
    cursor: pointer;
}

.challenge-solution-hidden {
    display: none;
}

.challenge-solution-content {
    margin-top: 0.5rem;
}

.challenge-solution-content code {
    font-family: Menlo, 'Courier New', Courier, monospace;
    background-color: #fff;

    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.challenge-input-radio-label::after {
    content: "";
    display: block;
}

.challenge-content code {
    font-family: Menlo, 'Courier New', Courier, monospace;
    background-color: #eee;
}

.challenge-code {
    word-break: break-all;
    font-family: Menlo, 'Courier New', Courier, monospace;

    padding: 1rem 2rem 1rem 1rem;
    margin: 1rem 0rem 1rem 0rem;
    background-color: #eee;
}

h3 {
    margin: 0.5rem 0rem 0.5rem 0rem;
}

.bittenichtausfuellen {
    display: none;
}

.grayed-out-text {
    color: #777;
}