body {
    margin: 0;
    padding: 0;
    font-family: 'Edu QLD Hand', cursive;
    background-image: none;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}
* {
    outline: none;
}

input,
select {
    font-family: inherit;
}

ul {
    display: block;
    margin: 0;
    padding: 0;
}

li {
    margin: 0;
    padding: 0;
}

.screen-navigation {
    text-align: center;
    margin: 30px;
}

button {
    border: 2px solid white;
    background-color: #177777;
    color: white;
    font-size: 1.5em;
    border-radius: 5px;
    padding: 3px 30px;
    cursor: pointer;
}

#theme-selector {
    user-select: none;
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 6px 10px;
    background: rgba(0, 0, 0, 0.55);
}

.theme-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0;
    padding: 4px;
    border: 2px solid transparent;
    border-radius: 4px;
    background: transparent;
}

.theme-option img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.theme-option.active {
    border-color: white;
    background: rgba(255, 255, 255, 0.18);
}

#operation-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
}

.operation-tab {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1em;
    padding: 4px 10px;
}

.operation-tab.active {
    border-bottom-color: white;
    color: white;
}

#try-button {
    background: gray;
}

.back-arrow {
    position: absolute;
    top: 14px;
    left: 18px;
    width: auto;
    margin: 0;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 2em;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.back-arrow:hover,
.back-arrow:focus-visible {
    opacity: 1;
}

#restart-button {
    background: #177777;
}
/* 
#ask {
    font-size: 2em;
    vertical-align: middle;
    color: #77fcfc;
} */


#question {
    text-align: center;
}

.result-prompt {
    animation: answer-prompt-blink 0.75s ease-in-out 2 !important;
}

@keyframes answer-prompt-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

#progress {
    position: absolute;
    top: 14px;
    right: 18px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1em;
    font-weight: bold;
}

#correct-result {
    display: none;
}

#type-result {
    display: inline-block;
    min-width: 108px;
    margin-left: 2px;
}

#result::-webkit-inner-spin-button,
#result::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#result[type="number"] {
    -moz-appearance: textfield;
}

#result.incorrect-result {
    user-select: none;
    color: #c62828;
    border-color: #c62828;
    font-weight: bold;
    background: #fff !important;
    -webkit-text-fill-color: #c62828;
    animation: none;
}

#attempts {
    margin-top: 6px;
}
.state-null,
.state-failed,
.state-ok,
.state-pending {
    display: inline-block;
    width: 44px;
    height: 44px;
    
    box-sizing: border-box;
    overflow: visible;
}

.state-null {
    width: 16px;
    height: 16px;
    margin: 8px;
    border: 2px solid rgba(128, 128, 128, 0.521);
    background-color: rgba(255,255,255, 0.7);
}

.state-pending {
    width: 44px;
    height: 44px;
    margin: 0;
    background-image: var(--pending-point-icon, url('./themes/minecrat/ok.png'));
    background-size: contain;
    filter: grayscale(1);
    opacity: 0.35;
}
.state-ok {
    background-image: var(--point-icon, url('./themes/minecrat/ok.png'));
    background-size: contain;
    border-radius: 0;
    overflow: visible;
}

.state-failed {
    background-image:url('./failed.png');
    background-size: contain;
    border-radius: 0;
}

#screen1,
#screen2 {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 100%;

    box-sizing: border-box;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    background-color: #01070c70;
}

h1,
#ask,
#summary,
#range span {
    color: white;
    vertical-align: middle;
    font-size: 1.5em;
    font-weight: bold;
}

#range-from,
#range-to,
#result {
    color: #095181;
    border-radius: 20px;
    border: 2px solid #095181;
    text-align: center;
    display: inline-block;
    vertical-align: middle;
    font-size: 2em;
    width: 100px;
    background-color: rgba(255,255,255,0.8)
}

#attempts {
    margin-top: 20px;
}
#attempts li {
    border-radius: 20px;
}

#pozdro {
    font-family: 'Moon Dance', cursive;
    width: 100%;
    text-align: center;
    position: fixed;
    bottom: 15px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    font-size: 1.5em;
}

@media (max-width: 700px), (hover: none) and (pointer: coarse) {
    #theme-selector {
        left: 50%;
        right: auto;
        flex-direction: row;
        gap: 2px;
        padding: 4px;
        transform: translateX(-50%);
    }

    .theme-option {
        width: 40px;
        height: 40px;
        padding: 3px;
    }

    .theme-option img {
        width: 32px;
        height: 32px;
    }

    #screen1,
    #screen2 {
        top: calc(50% + 28px);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
}