@import './snowflakes.css';

@supports(padding:max(0px)) {

    body,
    header,
    footer {
        padding-left: min(0vmin, env(safe-area-inset-left));
        padding-right: min(0vmin, env(safe-area-inset-right));
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

main {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: min(10vw, 2rem);
    padding: 5% 10%;
    height: 90%;
    display: grid;
    margin: 0 auto;
    grid-template-rows: min-content min-content 1fr;
    gap: 3rem;
    justify-content: stretch;

    grid-template-areas:
        "reset"
        "total"
        "counters";
}

button {
    background-color: transparent;
    color: white;
    border: none;
    font-size: larger;
    padding: 0.5rem;
    border-radius: 0.5rem;
    width: 100%;
}

.reset-button {
    border-radius: 0.5rem;
    position: relative;
    transform-style: preserve-3d;
    background-color: white;
    color: black;
}

.reset-button .shadow {
    position: absolute;
    inset: calc(-10px - 0px - 0px);
    border: calc(10px + 0px + 0px) solid #0000;
    border-radius: calc(10px + 0px + 0px + 0.5rem);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transform: translateZ(-1px);
    pointer-events: none;
}

.reset-button .shadow::before {
    content: "";
    position: absolute;
    inset: 0px;
    border-radius: 0.5rem;
    background: conic-gradient(from 90deg at 40% -25%, #ffd700, #f79d03, #ee6907, #e6390a, #de0d0d, #d61039, #cf1261, #c71585, #cf1261, #d61039, #de0d0d, #ee6907, #f79d03, #ffd700, #ffd700, #ffd700);
    filter: blur(10px);
    transform: translate(0px, 0px);
}

.total {
    font-family: monospace;
    background-color: white;
    color: black;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

#total {
    display: inline-block;
}

.counter-group {
    display: grid;
    gap: 2rem;
    align-self: end;
}

.counter {

    border: 3px solid transparent;
    color: white;
    border-radius: 15px;
    align-self: flex-end;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;

    background: hsl(340deg 100% 32% / 90%);
    backdrop-filter: blur();
}

.counter p {
    text-align: center;
}

p {
    margin: 0;
}

html {
    height: 100svh;
    width: 100svw;
}

@media all and (display-mode: fullscreen) {
    html {
        height: 100lvh;
    }
}

body {
    background: linear-gradient(#125, #111);
    color: white;
    width: inherit;
    height: inherit;
    touch-action: none;
}

@media all and (max-height: 650px) {
    main {
        font-size: 1.5rem;
    }
}

@media (pointer: coarse) {
    .counter button {
        -webkit-tap-highlight-color: red;
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.1);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.1);
    }

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

.heartBeat {
    animation-name: heartBeat;
    animation-duration: 1.3s;
    animation-timing-function: ease-in-out;
}
