@import url('https://fonts.googleapis.com/css2?family=Nata+Sans:wght@100..900&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background-color: #141414;
    color: #dbe9ff;
    font-family: "Nata Sans", sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    background: #1b1b1b;
    border-bottom: 2px solid #292929;
    text-align: center;
    padding: 1rem;
    gap: 1rem;
}

#balance {
    padding: 0.5rem 1rem;
    border: 1px solid #292929;
    border-radius: 8px;
}

#game {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    gap: 2rem;
    flex-wrap: wrap;
}

#options {
    display: flex;
    flex-direction: column;
    background-color: #292929;
    padding: 1rem;
    border-radius: 10px;
    gap: 1rem;
    border: 1px solid #33383d;
    min-width: 260px;
    flex: 0 1 300px;
}
#options p {
    color: #ffffff40;
    font-family: Arial, sans-serif;
}

#board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    max-width: 500px;
    width: 100%;
    padding: 1rem;
    position: relative;
    border-radius: 10px;
    background-color: #292929;
}

#over {    
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    inset: 0;
    background: rgba(39, 39, 39, 0.85);
    border-radius: 10px;
    font-size: 1.5rem;
    text-align: center;
}

.card {
    background-color: #1b1b1b;
    border: 2px solid #292929;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}
.card:hover {
    background-color: #1d1d1d;
    transform: scale(1.05);
}

footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    background: #1b1b1b;
    border-top: 2px solid #292929;
    margin-top: auto;
    font-size: 0.9rem;
}

button {
    height: 2.8rem;
    border-radius: 6px;
    color: #fff;
    background-color: rgb(0, 166, 171);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
button:hover {
    background-color: rgb(0, 130, 134);
}
button:active {
    background-color: rgb(0, 69, 71);
    box-shadow: 0 2px 5px rgba(0, 146, 151, 0.2);
}

.input-container {
    background-color: #1b1b1b;
    border: 1px solid #292929;
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #dbe9ff;
    font-family: "Nata Sans", sans-serif;
    width: 100%;
    position: relative;
}
.input-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.input-inner label {
    font-size: 11px;
    color: #abbbcf;
    margin-bottom: 2px;
}
.input-inner input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    width: 100%;
}
.input-container span {
    color: #d7e8ff;
    font-weight: 600;
    font-size: 20px;
}

@media (max-width: 900px) {
    #game {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    #options {
        width: 100%;
        max-width: 500px;
        border-radius: 10px;
        order: 1;
    }

    #board {
        order: 2;
        grid-template-columns: repeat(5, 1fr);
        max-width: 500px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 0.5rem;
    }

    #options {
        width: 95%;
        padding: 1rem;
        font-size: 0.9rem;
    }

    #board {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
        max-width: 350px;
    }

    .card {
        font-size: 1.1rem;
    }

    button {
        height: 2.4rem;
        font-size: 0.9rem;
    }

    #over {
        font-size: 1.2rem;
    }

    footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    #board {
        grid-template-columns: repeat(3, 1fr);
    }

    #options {
        width: 100%;
    }

    .card {
        font-size: 1rem;
    }
}
