:root {
    --content-href: #00a98f;
    --content-hover: #48C9B0;
}

html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Calibri', sans-serif;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;

    background: url("/static/img/prwords/background.png") no-repeat top left;
    background-size: contain;

    opacity: 0.7;

    pointer-events: none;
    z-index: -1;
}

h2 {
    color: #F07F3D;
}


a {
    padding: 3px;
    background-color: var(--content-href);
    border: 0;
    border-radius: 2px;
    text-decoration: none;
    color: white;
}

a:hover {
    background-color: var(--content-hover);
}

.text-container {
    position: relative;
    width: 70%;
    text-align: center;
    font-size: 1.2rem;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1rem;
}

.button-container button {
    flex: 1 0 calc((100% - 3 * 12px) / 4);
    box-sizing: border-box;
    cursor: pointer;
}

.word-button {
    padding: 0.8rem 0.5rem;
    font-size: 1.3rem;
    color: var(--content-href);
    background-color: #faf6f3;
    border: 2px var(--content-href) solid;
    border-radius: 0.3rem;

    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.word-button:hover {
    color: var(--content-hover);
    border: 2px var(--content-hover) solid;
    transform: scale(1.03);
}

.word-button:focus-visible {
    outline: 0;  
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.popup-window {
    position: relative;
    width: 60vw;
    height: 90vh;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

.popup-close {
    position: absolute;
    background-color: black;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    top: 10px;
    right: 5px;
    cursor: pointer;
}

.popup-close i {
    font-size: 32px;
    color:var(--content-href);
    pointer-events: none;
}

.popup-close i:hover {
    color:var(--content-hover);
}

.popup-image {
    flex: 1;
    width: 100%;
    object-fit: contain;
    min-height: 0;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.popup-buttons button {
    min-width: 140px;
    max-width: 180px;
    padding: 10px;
    font-size: 1em;
    color: var(--content-href);
    background-color: #faf6f3;
    border: 1px var(--content-href) solid;
    border-radius: 0.2rem;
    cursor: pointer;
}

.popup-buttons button:hover{
    color: var(--content-hover);
    border: 1px var(--content-hover) solid;
}

@media (max-width: 900px) {
    body::before {
        opacity: 0.15;
    }

    .text-container {
        width: 95%;
        font-size: 1rem;
    }

    .word-button {
        padding: 0.6rem 0.3rem;
        font-size: 1.3rem;
    }

    .popup-overlay {
        position: fixed;
        inset: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
    }

    .popup-window {
        width: 95vw;
        height: 80vh;
    }
}