

/* Reset & Base Layout */
body {
    background-color: #16181d;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Container Styling */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background-color: #1A1D23;
    border-radius: 8px;
    border: 5px solid #23262f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

/* Title */
.title {
    color: #B0B7C5;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Form Field Wrapper */
.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.username-input {
    width: 100%;
    max-width: 200px; /* Match chat-button */
    height: auto;
    padding: 12px 24px; /* Same padding */
    background-color: #2b2d31;
    border: 1px solid #23262f;
    border-radius: 5px; /* Same border radius */
    color: #99A1AE;
    font-size: 16px; /* Match font size */
    font-weight: bold; /* Match text weight */
    transform: scale(1.1); /* Match button scale */
    transition: all 0.3s ease-in-out; /* Match transition */
    box-sizing: border-box;
    text-align: center; /* Optional: aligns text like a button */
}


.username-input:focus {
    outline: none;
    border-color: #555866;
}

.username-input::placeholder {
    color: #555866;
}

/* Validation Message */
.validation-message {
    color: #FF4C4C;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Error State */
.username-input.input-error {
    border: 2px solid red;
    background-color: #ffe6e6;
    transition: all 0.3s ease;
}

/* Readonly State */
.username-input[readonly],
.username-input.locked {
    cursor: not-allowed;
    background-color: #23262f;
    border-color: #3F444F;
}

/* Button Container */
.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Submit Button */
.chat-button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    transform: scale(1.1);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background-color: #4C82FB;
    color: #FFFFFF;
    transition: all 0.3s ease-in-out;
    width: 100%;
    max-width: 200px;
}

.chat-button:hover {
    background-color: #3B6AD9;
    transform: scale(1.2);
}

.chat-button:active {
    transform: scale(0.98);
}

/* Loader State */
.chat-button.loading {
    position: relative;
    pointer-events: none;
}

.chat-button.loading::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #4C82FB;
    border-radius: 5px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Status Message */
#formStatusMessage {
    margin-top: 20px;
    color: green;
    font-size: 0.95rem;
}
