.nomefreefire-container {
    text-align: center;
    background: #000;
    color: #fff;
    padding: 20px;
    border: 3px solid black; /* Outer black border */
    box-shadow: inset 0 0 0 3px black; /* Inner black border */
}

#nickname-input {
    background: white;
    color: black;
    padding: 10px;
    border: 1px solid #fff;
    display: inline-block;
    margin: 10px auto;
    width: 60%;
    font-size: 16px;
    text-align: center;
}

#generate-button {
    background: navy;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    display: inline-block;
    margin-left: 10px;
    border-radius: 5px;
}

#generate-button:hover {
    background: #004080;
}

/* Grid layout - Auto adjust per row */
#nickname-results {
    display: flex;
    flex-wrap: wrap; /* Ensure wrapping */
    gap: 10px;
    justify-content: center; /* Keep alignment clean */
}

/* Sharp rectangle boxes for nicknames */
.styled-nick {
    font-size: 18px;
    background: white;
    color: black;
    padding: 10px 15px;
    border: 2px solid #fff;
    cursor: pointer;
    transition: background 0.3s ease-in-out, color 0.3s;
    text-align: center;
    width: auto; /* Allow width to adjust dynamically */
    display: inline-block; /* Prevent full-width stretching */
    min-width: 100px; /* Ensures minimum box width */
    max-width: 90%; /* Prevent excessive width */
    white-space: nowrap; /* Ensure text stays in one line */
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    #nickname-results {
        /* removed invalid grid-template-columns */
    }
}

@media screen and (max-width: 800px) {
    #nickname-results {
        /* removed invalid grid-template-columns */
    }
}

/* Adjust box width based on text length */
.styled-nick {
    width: auto;
    min-width: 100px;
    padding: 10px 15px;
}

/* Hover effect */
.styled-nick:hover {
    background: navy;
    color: white;
}

/* Copied text effect */
.copied-text {
    font-size: 18px;
    color: yellow;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    margin-left: 5px;
}

/* Ensure proper wrapping */
.styled-nick span {
    display: inline-block;
    word-break: break-word;
}

/* Box length adjustment based on text content */
.styled-nick {
    display: inline-block;
    width: auto; /* Fit content */
    min-width: auto; /* Allow shrinking */
    max-width: 700px; /* Ensure it doesn't get too wide */
    padding: 10px 15px;
    white-space: nowrap; /* Prevent wrapping */
}
