/* Reset CSS */

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

ul {
    list-style: none;
}

a, button {
    cursor: pointer;
}

a {
    color: inherit;
}

/* Colors */

:root {
    --error: #ff4d4d;
    --success: #28a745;
    --black1: #1e1f22;
    --black2: #2e2f33;
    --black3: #4d4d4d;
    --text: #fff;
}

/* Bases */

body {
    font-family: Jetbrains Mono, monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--black1);
    color: var(--text);
}

/* flash message */

.flashes {
    padding: 0;
    width: 80%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    position: fixed;
    top: 20px;
}

/* Animation for fade-in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animation for fade-out */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.flashes li {
    padding: 15px 10px;
    margin-bottom: 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    animation: fadeIn .3s;
}

.flashes li.fade-out {
    /* Add animation for fade-out */
    animation: fadeOut .5s;
    opacity: 0;
}

.flashes .error {
    background-color: rgba(255, 77, 77, 0.7);
    color: var(--text);
}

.flashes .message {
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--black1);
}

.flashes .success {
    background-color: rgba(40, 167, 69, 0.7);
    color: var(--text);
}

/* responsive */
@media (max-width: 550px) {
    .flashes li {
        font-size: 14px;
    }
}

/* Pop-up model */

.modal {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(200,200,200,0);
    backdrop-filter: blur(0);
    transition: backdrop-filter 0.2s ease, background-color 0.2s ease;
}
.modal.show {
    backdrop-filter: blur(3px);
    background-color: rgba(200,200,200,0.4);
}

.modal-content {
    background-color: var(--black1);
    color: var(--text);
    margin: 0 15px;
    padding: 20px 40px;
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
    border-radius: 10px;
    justify-content: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.modal.show .modal-content {
    opacity: 1;
    transform: translateY(0);
}

.modal-content p {
    text-align: center;
    font-size: 18px;
}

.modal-content form {
    display: flex;
    flex-direction: row;
    gap: 25px;
    justify-content: center;
    align-items: center;
}

.modal-content form button {
    padding: 8px 10px;
    background-color: var(--black2);
    color: var(--text);
    border: none;
    border-radius: 5px;
    font-size: 17px;
}

.modal-content form button:last-of-type {
    background-color: var(--black3);
}


