:root{
    /* font-size */
    --fz-root: 1rem; /* rem, everything else should be in em, unless there is a good reason for it not to be */
    --fz-h1: 2.5em;
    --fz-h2: 2.0em;
    --fz-h3: 1.5em;
    --fz-rainbow-btn: 1.5em;
}


/* mobile layout */

html {
    font-size: var(--fz-root);
}

body {
    font-family: "Tahoma", sans-serif;
    background-color :#E0E5EC;
    /* background-image is set in index.html */
    background-attachment: fixed;
    background-size: cover;
    color: black;
    text-align: center;
    margin-bottom: 100px;
    overscroll-behavior: none;
}

.content {
    margin: 0 auto;
    justify-content: center;
    width: 98%;
    max-width: 800px;
}

h1 {
    font-size: clamp(var(--fz-root), 7vw, var(--fz-h1));
}

h2 {
    font-size: clamp(var(--fz-root), 5vw, var(--fz-h2));
    margin-top: 5px;
    margin-bottom: 5px;
}

h3 {
    font-size: clamp(var(--fz-root), 4vw, var(--fz-h3));
    margin-top: 5px;
    margin-bottom: 5px;
}

p {
    font-size: clamp(var(--fz-root), 4vw, 1em);
    margin: 10px 0;
}

/* hide "Regularyly verify..." on mobile to reduce clutter */
.regularly-verify-text {
    display: none;
}

.header-n-nav{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
}

img {
    max-width: 50vw;
    max-height: 25vw;
    display: block;
    margin: auto;
}

input {
    border: none;
    outline:none;
    background: rgb(224,229,236,0);
    height: 30px;
    width: 100%;
    border-radius: 10px;
    padding-left: 10px;
    margin-left: -10px;
    box-shadow: inset 7px 7px 7px rgb(163,177,198,0.6),
                inset -7px -7px 7px  rgba(255,255,255, 0.5);
}

textarea {
    border: none;
    outline:none;
    background-color: rgb(224,229,236,0);
    height: 80px;
    width: 95%;
    max-width: 95%;
    border-radius: 10px;
    padding: 15px;
    margin-left: -10px;
    box-shadow: inset 7px 7px 7px rgb(163,177,198,0.6),
                inset -7px -7px 7px  rgba(255,255,255, 0.5);
}

.key-flip-video {
    margin-top: 3%;
    margin-bottom: 3%;
    width: 90%;
}

.still-alive-video {
    margin: 0 auto 0 auto;
    width: 90%;
    display: none;
}

.big-still-alive-button{
    display: none !important;
}

.small-still-alive-button {
    display: flex;
}

.loading-video{
    display: none;
}

.loading-video-top{
    display: none;
}

.loading-video-bottom{
    display: none;
}

.back-button-video{
    width: 14vw;
}

.back-button-big {
    width: 200px;
}

.start-page-button-div {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

section {
    display: flex;
    flex-flow: row wrap;
    max-width: 40vw;
    margin: auto;
    align-items: baseline;
}

#clickMeBtn {
    padding: 5px 20px;
    margin: 10px auto;
    float: right;
}

#greeting {
    margin: 10px auto;
    padding: 10px 60px;
    border: 1px solid #222;
}

#greeting:empty {
    display: none;
}


.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px auto;
}

.error-div {
    display: inline-block;
    justify-content: center;
    font-size: var(--fz-root);
    line-height: 1.5;
    border-radius: 10px;
    padding: 10px 20px;
}

.error-confirm-button {
    border-radius: 15px;
    padding: 5px 12px;
    margin-left: 15px;
}

.rainbow-button {
    margin: 10px auto;
    padding: 10px 5px;
    height: clamp(20px, 6vw, 40px);
    background-image: linear-gradient(90deg, #00C0FF 0%, #FFCF00 20%, #FC4F4F 40%, #f200ff 60%, #9000ff 80%, #00C0FF 100%);
    border-radius: 10px;
    max-width: 190;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: clamp(1em, 6vw, var(--fz-rainbow-btn));
    box-shadow: 9px 9px 16px rgb(163,177,198,0.6),
                -9px -9px 16px rgba(255,255,255, 0.5);
    /* width:33%; */
}

.rainbow-button:after {
    content: attr(data-text);
    text-transform:uppercase;
    border-radius: 7px;
    width: calc(100% + 10px);
    height: calc(100% + 10px);
    color: black;
    background-color: #E0E5EC;
    display:flex;
    align-items:center;
    justify-content:center;
}

.rainbow-button {
    animation:slidebg 20s linear infinite;
}

/* .trigger-animation {
    animation:slidebg 3s linear infinite;
} */

@keyframes slidebg {
    to {
        background-position:120vw;
    }
}


.panel {
    margin: 20px 0 20px 0;
    padding: 10px;
    line-height: 2;
    border-radius: 20px;
    background: rgb(224,229,236,0.8);
    backdrop-filter: blur(8px);
    box-shadow: 9px 9px 16px rgb(163,177,198,0.6),
        -9px -9px 16px  rgba(255,255,255, 0.5);
}

.hacker-console {
    background: rgba(0, 0, 0, 0.8);
    height: 73vh;
    overflow: scroll;
}

.console-text {
    color: rgb(0, 255, 0);
    font-family: monospace;
    font-size: 12pt;
    line-height: 1.3;
    white-space: pre-wrap;
}

.explainer {
    text-align: start;
    font-size: 1.25rem;
    padding: 15px 30px;
}


.description-and-wallet {
    display: block;
    align-items: center;
}

.description {
    margin: 0 10px;
}

.wallet {
    color:rgb(255, 255, 255);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    max-width: 500px;
    margin: 20px auto;
    padding: 30px 10px 30px 10px;
    line-height: 1;
    border-radius: 20px;
    background: rgba(38, 0, 255, 0.7);
    backdrop-filter: blur(8px);
    box-shadow: 9px 9px 16px rgb(163,177,198,0.6),
        -9px -9px 16px  rgba(255,255,255, 0.5);
}

.topup-button {
    border-radius: 15px;
    border: solid white;
    padding: 8px 10px;
    line-height: 1.4;
    color: white;
    background-color: rgba(255, 255, 255, 0);
}

.wallet-loading-animation {
    bottom: 25px;
    right: -100px;
}

form {
    padding: 0 5vw;
    line-height: 1.8;
}

span {
    display: block;
    overflow: hidden;
    padding: 0 10px 5px 25px;
}

label {
    float: left;
}

table {
    margin: 0px auto 0px auto;
    width: 100%;
}

.endStakeButton {
    font-family: inherit;
    font-size: 1.2rem;
    width: 100px;
    height: 40px;
    border-width: 5px;
    border-radius: 10px;
    border-color: rgb(255, 0, 0);
    background-color: rgba(255,255,255, 0);
}

.revealButton {
    font-family: inherit;
    font-size: 1.2rem;
    width: 90px;
    height: 40px;
    border-width: 5px;
    border-radius: 10px;
    border-color: rgb(0, 209, 80);
    background-color: rgba(255,255,255, 0);
}

.bottom-page-button {
    font-family: inherit;
    font-size: 1.2rem;
    padding: 5px 13px;
    margin: 10px 8px;
    border-radius: 20px;
    border-width: 8px;
    backdrop-filter: blur(8px);
}

#aboutButton {
    border: solid rgb(230, 195, 0);
    /* border color lightened by 33% */
    background-color:rgba(255, 238, 143, 0.5);
}

#demoButton {
    border: solid rgb(14, 175, 224);
    /* border color lightened by 33% */
    background-color:rgba(158, 228, 249, 0.5);
}

#introVideoButton {
    border: solid rgb(187, 10, 10);
    /* border color lightened by 33% */
    background-color:rgba(248, 118, 118, 0.5);
}

#litepaperButton {
    border: solid rgb(0, 146, 0);
    /* border color lightened by 33% */
    background-color:rgba(59, 251, 59, 0.5);
}

#logoutButton {
    border: solid rgb(212, 16, 230);
    /* border color lightened by 33% */
    background-color:rgba(242, 165, 249, 0.5);
}

#whoAmIButton {
    border: solid rgb(255, 215, 36);
    /* border color lightened by 33% */
    background-color:rgba(255, 246, 205, 0.66);
}


/* desktop layout */
@media screen and (min-width: 700px) {
    h1 {
        font-size: var(--fz-h1);
    }

    h3 {
        font-size: var(--fz-h3);
    }

    p {
        font-size: 16pt;
    }

    .content {
        width: 90%;
    }

    /* we show the hint on desktop */
    .regularly-verify-text {
        display: block;
    }

    /* start page's rainbow buttons have enough room on desktop to be next to one another */
    .start-page-button-div {
        flex-direction: row;
    }

    .rainbow-button {
        font-size: var(--fz-rainbow-btn);
        max-width: 999;
    }

    .description-and-wallet {
        display: flex;
    }

    .full-child-wallet {
        width: 50%;
    }

    .description {
        width: 50%;
        text-align: left;
    }

    form {
        padding: 0 50px;
        line-height: 1.8;
    }

    .back-button-video{
        width: 100px;
    }

    .small-still-alive-button {
        display: none;
    }

    .rainbow-button {
        animation:none;
    }

    .rainbow-button:hover {
        animation:slidebg 10s linear infinite;
    }

    .loading-video{
        z-index: -1;
        width: 80px;
        position: fixed;
        right: 60px;
        display: unset;
    }

    .loading-video-top{
        top: 20px;
        display: unset;
    }

    .loading-video-bottom{
        bottom: 15px;
        display: unset;
    }

    .big-still-alive-button{
        display: flex !important;
    }

    table {
        table-layout: fixed;
    }
}
