@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@300..700&family=Sixtyfour+Convergence&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

*:not(code) {
    font-family: 'Fredoka', sans-serif;
}

body {
    padding: 0 5% 0 5%;
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

.hiddenInput {
    position: absolute;
    color: transparent;
    z-index: -1;
    height: 0;
    width: 0;
    opacity: 0;
}

.hiddenInput [type="file"] {
    visibility: hidden;
}

.pageSelector {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pageSelector a {
    color: black;
    float: left;
    padding: 8px 16px;
    text-decoration: none;
    transition: background-color .3s;
}

.pageSelector a .active {
    background-color: dodgerblue !important;
    color: white;
}

.pageSelector a:hover:not(.active) {
    background-color: #ddd;
}

.page-current {
    background-color: #f0f0f0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.pigeon {
    width: 100px;
    height: 100px;
    transform: rotate(180deg);
    position: absolute;
    display: none;
}

.warning {
    text-align: center;
    background-color: #ffd6a0;
    border: 1px solid transparent;
}

.warning.header {
    width: 100%;
    justify-self: center;
}

.warning.floating {
    position: fixed;
    bottom: 10px;
    left: 30%;
    width: 40%;
    border-radius: 4px;
}

.warning::before {
    content: "⚠️";
    font-size: 1em;
    margin-right: 10px;
}

.error {
    text-align: center;
    background-color: #ff8c8c;
    border: 1px solid transparent;
}

.error.header {
    width: 100vw;
    justify-self: center;
}

.error.floating {
    position: fixed;
    bottom: 10px;
    left: 30%;
    width: 40%;
    border-radius: 4px;
}

.error::before {
    content: "❌";
    font-size: 1em;
    margin-right: 10px;
}


.button {
    border: 1px solid var(--post-outline-color);
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    height: 45px;
}

button {
    touch-action: manipulation;
    user-select: none;
}

.clickable {
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

a {
    touch-action: manipulation;
}

.button .icon {
    width: 25px;
    height: 25px;
    margin: 5px;
}

.button .label {
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
}

.button .short-label:not(.label) {
    display: none;
}

.profilePicture {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 5px;
    user-select: none;
    -webkit-user-select: none;
    aspect-ratio: 1/1;
}

.profilePicture.image {
    border: var(--post-outline-color) 1px solid;
}

.author-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
}

.tooltip {
    visibility: hidden;
    width: 50px;
    background-color: rgba(0, 0, 0, 0.388);
    color: #fff;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;
    width: 100px;
    bottom: 115%;
    left: 50%;
    margin-left: -50px;
    position: absolute;
    z-index: 10;
    font-size: 1em;
    touch-action: manipulation;
}

.tooltip::after {
    content: " ";
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 10;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.388) transparent transparent transparent;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: env(safe-area-inset-top);
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 5vh;
}

.modal-template {
    display: none;
}

.modal-content {
    background-color: var(--post-background-color);
    margin: 5px auto;
    border: 1px solid var(--post-outline-color);
    width: 80%;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 5vh;
    position: relative;
}

.close {
    position: absolute;
    right: 25px;
    top: 0;
    color: #000;
    font-size: 35px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: red;
    cursor: pointer;
}

.animate {
    -webkit-animation: animatezoom 0.3s;
    animation: animatezoom 0.3s
}

/* Container for the game request */
.game-request {
    width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    overflow: hidden;
    font-family: Arial, sans-serif;
    animation: fadeIn 0.4s ease-in-out;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Header section of the game request */
.game-request-header {
    background-color: #007bff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.game-request-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
}

.game-request-close {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: none;
}

.game-request-close:hover {
    transform: rotate(90deg);
}

/* Content of the game request */
.game-request-content {
    padding: 20px;
    text-align: center;
}

.game-request-text {
    font-size: 1em;
    margin-bottom: 20px;
    color: #333333;
}

/* Buttons container */
.game-request-buttons {
    display: flex;
    justify-content: space-around;
}

/* Button styles */
.game-request-buttons button {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: #000000;
}

/* Accept button */
.game-request-buttons .accept-button {
    background-color: #28a745;
}

.game-request-buttons .accept-button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Decline button */
.game-request-buttons .decline-button {
    background-color: #dc3545;
}

.game-request-buttons .decline-button:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

.vertical {
    display: flex;
    flex-direction: column;
}

.horizontal {
    display: flex;
    flex-direction: row;
}

textarea {
    padding: 10px;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    resize: none;
    height: 40px;
    overflow: hidden;
    width: 100%;
}

/* Keyframes for fade-in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}



@-webkit-keyframes animatezoom {
    from {
        -webkit-transform: scale(0)
    }

    to {
        -webkit-transform: scale(1)
    }
}

@keyframes animatezoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.spinner {
    display: flex;
    justify-content: center;
}


.pwaBar {
    display: none;
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    height: env(safe-area-inset-top);
    z-index: 1001;
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.025);
    mask-image: linear-gradient(to bottom, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0));
}

@media (max-width: 768px) and (display-mode: standalone) {
    .pwaBar {
        display: block;
    }

    body {
        padding:
            env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

@media (max-width: 768px) {

    .button {
        height: unset;
    }

    .author-info:hover .tooltip {
        visibility: visible;
        animation: tooltipFadeIn 0.2s forwards;
    }

    .button .label {
        display: none;
    }

    .button .short-label {
        display: block !important;
    }

    .author-name {
        display: none;
    }

    .auto-hiding {
        display: none !important;
    }
}

body.offline .online-only {
    opacity: 0.5;
    pointer-events: none;
}