/* Body and Main Styles */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background-color: #fafafa;
}

.container {
    margin-top: 50px;
    display: flex;
    flex-direction: row;
    height: calc(100vh - 50px); 
}

.input-area {
    width: 20%;
    padding: 20px;
    background-color: transparent;
}

.input-area textarea {
    width: 100%;
    height: 85%;
    padding: 10px;
    font-size: 1.1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    resize: none;
}

.input-area textarea:focus {
    outline: none;
}

#result::-webkit-scrollbar,
.input-area textarea::-webkit-scrollbar {
    width: 8px;
}

#result::-webkit-scrollbar-track,
.input-area textarea::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#result::-webkit-scrollbar-thumb,
.input-area textarea::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

#result::-webkit-scrollbar-thumb:hover,
.input-area textarea::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.input-area #name-count {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
    display: flex;
    justify-content: right;
}

.display-area {
    width: 80%;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    background-color: transparent;
}

#result {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    margin-bottom: 60px;
    font-size: 1.1rem;
}

.group-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.group {
    background-color: #c691f5;
    padding: 10px;
    border-radius: 8px;
    flex: 1 1 calc(33.333% - 20px);
    box-sizing: border-box;
    min-width: 150px; 
    max-width: 200px;
    margin: 5px;
    line-height: 1.7;
}

.controls {
    position: absolute;
    bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 15px;
    background-color: #fafafa;
}

#create-groups {
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    background-color: #ADCBFD;
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s ease, color 0.3s ease;
}

#create-groups:hover {
    background-color: #84A9E8;
}

.group-options {
    display: flex;
    align-items: center;
}

.group-options input {
    width: 45px;
    margin: 0 10px;
    padding: 10px;
    font-size: 1.1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.group-options input:focus {
    outline: none;
}

#reset {
    background-color: transparent;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: 0.3s ease, color 0.3s ease;
}

#reset .material-icons {
    color: #000;
    font-size: 2.2rem;
}

#reset .material-icons:hover {
    color: #FF5757;
}

/* Media Query for screens smaller than 800px */
@media (max-width: 800px) {
    .container {
        flex-direction: column;
    }

    .input-area,
    .display-area {
        width: 90%;
    }

    .input-area textarea {
        min-height: 200px;
        resize: vertical;
    }

    .controls {
        position: fixed;
        bottom: 0;
        width: 90%;
        justify-content: space-around;
        padding: 10px;
    }

    .input-area {
        padding-bottom: 80px; /* Ensure space for the fixed controls at the bottom */
    }

    .display-area {
        padding-bottom: 80px; /* Ensure space for the fixed controls at the bottom */
    }
}
