*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background: #f2f2f2;
    font-family: Arial, sans-serif;
    touch-action: manipulation;
    /* overflow: hidden; */
}

body.modal {
    overflow: hidden;
}

.wrap {
    position: relative;
    height: calc(100vh - 80px);
    padding-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: start;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    font-family: 'Anton', sans-serif;
}

.timer {
    font-size: 20px;
    color: #222;
}

#restartGame {
    padding: 10px 20px;
    font-size: 16px;
    border: 1px solid #222;
    border-radius: 5px;
    background: linear-gradient(#4d4d4d, #222);
    color: #fff;
    text-shadow: 0 1px 0 #000;
    cursor: pointer;
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
    display: none;
    place-items: center;
    z-index: 999;
}

.universal-modal {
    top: 20px;
    background: #fff;
    width: min(500px, 90vw);
    padding: clamp(20px, 4vw, 40px) 10px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, .3);
    position: relative;
}

.modal-content h2 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.5rem, 10vw, 3.8rem);
    margin: 0 0 1.2em;
    color: #4d4d4d;
    text-shadow: 0 3px 0 #000;
}

.modal-content button {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.3rem, 6vw, 2rem);
    padding: .8em 1.5em;
    border: 1px solid #222;
    border-radius: 6px;
    background: linear-gradient(#4d4d4d, #222);
    color: #fff;
    text-shadow: 0 1px 0 #000;
    cursor: pointer;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 2rem;
    font-weight: bold;
    color: #4d4d4d;
    cursor: pointer;
    user-select: none;
}

.modal-close:hover {
    color: #000;
}