@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Secular+One&display=swap');

body {
    overflow: hidden;
    display: block;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    direction: rtl;
    background-color: transparent;
    text-align: center;
    font-family: "secular one", heebo;
    font-size: min(20vmin, 20vw);
}

body.pause #counter {
    animation: pulse 1.7s infinite ease-in-out alternate;
}

body.pause #counter span {
    color: rgb(223, 36, 36) !important;
}

body.pause #counter::before {
    content: "טיימר בהשהייה";
    font-size: 0.4em;
    color: red;
    text-shadow: inherit;
    display: block;
    line-height: 0.4em;
}

* {
    box-sizing: border-box;
}

#counter {
    position: absolute;
    inset: 0;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

.timer {
    display: flex;
    color: #fff;
    text-shadow: 0 1vmin #000, 0 0.5vmin 2vmin #000;
    cursor: pointer;
    flex-wrap: wrap;
    justify-content: center;
}

.timer>span {
    line-height: 1em;
    display: block;
    height: 1em;
    text-align: center;
    transition: color 0.2s;
}

.timer>span.number {
    --last: 0;
    aspect-ratio: 0.6;
    animation: none 1s ease-in reverse;
}

.timer>span.number:first-of-type {
    --last: 1;
}

.timer>span.dots {
    animation: flash 4s infinite ease-in-out;
    line-height: 80%;
}

.timer[animation=zoom] .number {
    animation-name: animationZoom;
}

.timer[animation=color] .number {
    animation-name: animationColor;
}

.timer[animation=skew] .number {
    animation-name: animationSkew;
}

.timer[animation=spin] .number {
    animation-name: animationSpin;
    animation-timing-function: ease-in-out;
}

.timer[animation=glitch] .number {
    animation-name: animationGlitch;
}

.timer[animation=blur] .number {
    animation-name: animationBlur;
}

@keyframes animationBlur {

    20%,
    80% {
        filter: blur(0);
    }

    0% {
        filter: blur(calc(0.04em * var(--last)));
    }

    100% {
        filter: blur(0.04em);
    }
}

@keyframes animationGlitch {

    10%,
    80% {
        text-shadow: 0 1vmin #000, 0 0.5vmin 2vmin #000;
        color: inherit;
    }

    0% {
        text-shadow: 0 1vmin #000, 0 0.5vmin 2vmin #000, calc(var(--last) * 0.1em) 0 rgba(255, 0, 0, 0.7), calc(var(--last) * -0.1em) 0 rgba(0, 255, 255, 0.7);
    }

    90%,
    92% {
        text-shadow: 0 1vmin #000, 0 0.5vmin 2vmin #000, 0.1em 0.05em rgba(0, 255, 255, 0.7), -0.1em -0.05em rgba(255, 0, 0, 0.7);
    }

    93%,
    95% {
        text-shadow: 0 1vmin #000, 0 0.5vmin 2vmin #000, 0.1em -0.05em rgba(0, 255, 255, 0.7), 0.1em 0.05em rgba(255, 0, 0, 0.7);
    }

    100% {
        text-shadow: 0 1vmin #ffffff, 0 0.5vmin 2vmin #000, 0.1em 0 rgba(255, 0, 0, 0.7), -0.1em 0 rgba(0, 255, 255, 0.7);
    }
}

@keyframes animationSpin {

    30%,
    70% {
        transform: translateY(0);
        opacity: 1;
    }

    0% {
        transform: translateY(calc(-30% * var(--last))) rotate(calc(-10deg * var(--last)));
        opacity: calc(1 - var(--last));
    }

    100% {
        transform: translateY(30%) rotate(10deg);
        opacity: 0;
    }
}

@keyframes animationSkew {

    10%,
    60% {
        transform: skew(0deg);
    }

    0% {
        transform: skew(calc(var(--last) * -20deg));
    }

    85% {
        transform: skew(-10deg);
    }

    100% {
        transform: skew(15deg);
    }
}

@keyframes animationColor {
    65% {
        color: inherit;
    }

    100% {
        color: red;
    }
}

@keyframes animationZoom {

    5%,
    70% {
        transform: scale(1);
    }

    0% {
        transform: scale(calc(1 - var(--last)));
    }

    100% {
        transform: scale(0);
    }
}

p {
    text-align: center;
    display: block;
    color: red;
    font-size: 5vmin;
    line-height: 90%;
    opacity: 0;
    transition: opacity 1s;
}

p[style="opacity: 0"] {
    pointer-events: none;
}

fly {
    position: absolute;
    right: -1em;
    display: block;
    width: fit-content;
    color: lime;
    text-shadow: 0 1vmin 0 #000, 0 0 1vmin #000;
    animation: jackInTheBox 1s, fadeOut 1s 0.95s forwards;
    transform-origin: 200% 50%;
    animation-timing-function: ease-out;
    font-weight: 900;
    font-size: 10vmin;
}

fly warp {
    transform: translateX(-10%) translateY(-70%);
    display: block;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    width: 100%;
    color: #fff;
    gap: 1em;
    text-shadow: 0 0.1em #000, 0 0.1em 0.3em #000;
    letter-spacing: 0.05em;
    font-weight: 900;
    font-size: max(0.1em, 1rem);
}

.stats>div {
    flex: 1;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 1em;
    min-width: calc(50% - 2.5em);
    padding: 1em;
    position: relative;
    box-shadow: inset 0 -0.15em 0 0.07em rgba(0, 0, 0, 0.4745098039), 0 1em 0.4em -0.6em rgba(0, 0, 0, 0.4078431373);
}

.stats>div:nth-child(-n+2) {
    background-color: rgba(20, 171, 0, 0.6);
}

.stats>div>h1 {
    margin: 0;
    font-size: 2em;
}

body:is(:hover, :active) .gui {
    display: flex;
}

.gui {
    display: none;
    position: absolute;
    z-index: 1;
    inset: 0;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.5);
    flex-direction: column;
    font-size: 1em;
}

.gui>div:nth-child(even) {
    flex: 1;
}

.gui>div:nth-child(odd) {
    background-color: gold;
    box-shadow: inset 0 0.5em rgba(255, 255, 255, 0.2588235294), inset 0 0.25em rgba(255, 255, 255, 0.3176470588), inset 0 0.05em #fff, 0 0 0.3em -0.1em #000;
    min-height: 1em;
    display: flex;
    gap: 0.3em;
    justify-content: center;
    align-items: stretch;
    padding: 0.1em 0.2em;
}

.gui>div:nth-child(odd)>button {
    font-size: 0.4em;
    flex: 1;
    width: max-content;
}

button {
    min-height: 1em;
    font-size: 1em;
    line-height: 1em;
    border-radius: 0.2em;
    font-family: inherit;
    letter-spacing: -0.05em;
    background-color: #ff4b4b;
    color: #fff;
    box-shadow: inset 0 -1.3em 0 -1em rgba(0, 0, 0, 0.161);
    border: 0.05em solid darkred;
    border-style: outset;
    padding: 0 0.3em;
    text-shadow: 0.04em 0.08em rgb(106, 0, 0), 0 0.08em 0.4em rgba(0, 0, 0, 0.4431372549);
    cursor: pointer;
}

button.green {
    background-color: #66ff25;
    border: 0.04em solid rgb(7, 139, 0);
    text-shadow: 0.04em 0.08em rgb(4, 106, 0), 0 0.08em 0.4em rgba(0, 0, 0, 0.4431372549);
}

button.green:hover {
    background-color: rgb(72, 239, 0);
}

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

button:active {
    transform: scale(0.98);
}

button:disabled {
    filter: saturate(0) brightness(0.8);
}

button:disabled:hover {
    background-color: inherit;
    transform: inherit;
}

.error,
#sl {
    color: red;
    background-color: rgba(0, 0, 0, 0.8156862745);
    border-radius: 0.2em;
    font-size: 0.2em;
    padding: 0.2em;
    position: absolute;
    z-index: 1;
}

.error *,
#sl * {
    margin: 0;
}

.error p,
#sl p {
    color: #fff;
    opacity: 1 !important;
    font-size: 0.6em;
}

#sl {
    display: none;
    transition: opacity 3s 1s;
    inset: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    z-index: 2;
}

.exch {
    position: absolute;
    left: -100vh;
    font-size: 0.1em;
}