@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* GENERAL STYLING */
* {
    font-family: 'Poppins', sans-serif !important;
}

body {
    background-color: #2f2f2f;
    color: white;
    margin: 0;
    padding: 0;
}

/* MAIN USER INTERFACE */
.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container h1 {
    font-size: 2.5rem;
}

.attempts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.attempt {
    display: flex;
    gap: 10px;
}

.attempt-letter {
    --w: 50px;
    width: var(--w);
    height: var(--w);

    /* padding: 10px; */
    --border-color: #595959;
    border: 4px solid var(--border-color);
    border-radius: 10px;

    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.attempt-letter.incorrect {
    background-color: hsl(0, 74%, 47%);
    border-color: hsl(0, 74%, 65%);
}

.attempt-letter.partial {
    background-color: hsl(41, 74%, 47%);
    border-color: hsl(41, 74%, 65%);
}

.attempt-letter.correct {
    background-color: hsl(113, 74%, 40%);
    border-color: hsl(113, 74%, 66%);
}

.attempt-letter.cursor {
    /* border-color: #1c5abd; */
    animation: blink 0.9s linear infinite;
}

@keyframes blink {
    0% {
        border-color: var(--border-color);
    }

    30%, 70% {
        border-color: #1b57b5 /*#1c5abd*/;
    }

    100% {
        border-color: var(--border-color);
    }
}

.attempt-letter > span {
    margin: 0;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 400;
    user-select: none;
}

/* MESSAGE MODAL */
.message-popup {
    position: absolute;
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    z-index: 999;
    background-color: #191919;
    padding: 20px;
    border-radius: 20px;
    font-size: 1.1rem;
}

.message-popup[data-phase="in"] {
    animation: slide-in-from-top 0.5s ease-out forwards;
}

.message-popup[data-phase="out"] {
    animation: slide-out-from-bottom 0.5s ease-in forwards;
}

/* Slide into view */
@keyframes slide-in-from-top {
    0% {
        top: -100px;
    }

    100% {
        top: 10px;
    }
}

/* Slide out of view */
@keyframes slide-out-from-bottom {
    0% {
        top: 10px;
    }

    100% {
        top: -100px;
    }
}

.message-popup * {
    margin: 0;
}

/* END OF GAME MODAL */
.done-modal-wrapper {
    position: absolute;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
}

.done-modal-background {
    position: absolute;
    top: 0%;
    left: 0%;
    width: 100vw;
    height: 0vh;
    /* height: 100vh; */
    background-color: rgba(74, 73, 70, 70%);
    animation: openModalBackground 1s ease-in-out forwards;
}

@keyframes openModalBackground {
    0% {
        height: 0vh;
    }

    100% {
        height: 100vh;
    }
}

.done-modal {
    width: 50vw;
    height: 70vh;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.done-modal-top {
    width: 100%;
    height: 0%;
    /* height: 50%; */
    background-color: #2f2f2f;
    animation: openModal 1s cubic-bezier(0, 0.5, 0, 1) forwards 1s;
}

.done-modal-bottom {
    width: 100%;
    height: 0%;
    /* height: 50%; */
    background-color: #2f2f2f;
    animation: openModal 1s cubic-bezier(0, 0.5, 0, 1) forwards 1s;
}

@keyframes openModal {
    0% {
        height: 0%;
    }

    100% {
        height: 50%;
    }
}

.done-modal-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* opacity: 100%; */
    opacity: 0%;
    user-select: none;
    pointer-events: none;
    text-align: center;

    animation: showModalContent 0.2s linear forwards 2s;
}

@keyframes showModalContent {
    0% {
        opacity: 0%;
    }

    100% {
        opacity: 100%;
    }
}

.done-modal-content * {
    margin: 0;
    padding: 0;
}

.done-modal-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 10px;
}

.done-modal-title.win {
    color: hsl(113, 74%, 40%);
}

.done-modal-title.lose {
    color: hsl(0, 74%, 47%);
}

.done-modal-answer {
    font-size: 1.2rem;
}

.done-modal-answer span {
    font-weight: 700;
}

.done-modal-graph-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.done-modal-graph {
    width: 100%;
    height: 90%;
    /* outline: 2px solid red; */
}

/* CUSTOM CONTEXT MENU */
.contextmenu {
    width: 350px;
    height: fit-content;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #404040;
    /* padding: 10px; */
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    /* display: none; */
    box-shadow: 5px 5px 20px #282828;
    z-index: 999;
}

.contextmenu-option {
    display: flex;
    justify-content: left;
    align-items: center;
    padding: 5px 10px;
    cursor: pointer;

    display: none;
}

.contextmenu-option-visible {
    display: flex;
}

.contextmenu .contextmenu-option-visible:first-of-type {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.contextmenu .contextmenu-option-visible:last-of-type {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.contextmenu-option:hover {
    background-color: #545454;
}

.contextmenu-option-left {
    width: fit-content;
    display: flex;
    gap: 10px;
    align-items: center;
    user-select: none;
}

.contextmenu-option-right {
    margin-left: auto;
    width: fit-content;
    font-size: 0.7rem;
    color: #a1a1a1;
    user-select: none;
}