@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image: url(https://i.pinimg.com/736x/98/08/1f/98081ffa37e8566f34f0cdfc98701488.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.wrapper {
    width: 420px;
    background: rgba(56, 56, 236, 0.13);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(55px);
    box-shadow: 0 0 30px solid rgba(0, 0, 0, .2);
    color: white;
    border-radius: 20px;
    padding: 2rem 3rem;    
}

.wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.wrapper h1 {
    font-size: 2rem;
    color: #fff;
    text-align: center;
}

.wrapper .username {
    position: relative;
    margin: 30px 0;
    max-width: 310px;
    border-bottom: 2px solid #fff;
}

.username label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.5s ease-in-out;
}

input:focus ~ label, 
input:valid ~ label {
    top: -5px;
}

.username input {
    width: 100%;
    height: 60px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0 35px 0 5px;
    color: #fff;
}

.username ion-icon {
    position: absolute;
    right: 8px;
    color: #fff;
    font-size: 1.2rem;
    top: 20px;
}

/*.wrapper .inputbox {
    position: relative;
    margin: 30px 0;
    max-width: 310px;
    border-bottom: 2px solid #fff;
}*/

.inputbox textarea {
    width: 100%;
    height: 150px;
    background: transparent;
    border: none;
    outline: none;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    font-size: 16px;
    color: #fff;
    padding: 20px 45px 20px 20px;
    resize: none;
}

.inputbox textarea::-webkit-scrollbar {
    width: 12px;
}

.inputbox textarea::-webkit-scrollbar-track {
    display: none;
}

.inputbox textarea::placeholder {
    color: #fff;
    opacity: 1;
}

#MessageSent{
    position: absolute;
    width: 8%;
    height: 50px;
    bottom: -18%;
    right: 23.5%;
    font-size: 1em;
    border: none;
    border-radius: 20px;
    color: #72C675;
    opacity: 0;
    font-family: 'Times New Roman', Times, serif;
    cursor: pointer;
    transition: opacity 2s;
}

#MessageFailed{
    position: absolute;
    width: 8%;
    height: 50px;
    bottom: -18%;
    right: 23.5%;
    font-size: 1em;
    border: none;
    border-radius: 20px;
    color: #C67272;
    opacity: 0;
    font-family: 'Times New Roman', Times, serif;
    cursor: pointer;
    transition: opacity 2s;
}

.inputbox label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.5s ease-in-out;
}

input:focus ~ label, 
input:valid ~ label {
    top: -5px;
}

.inputbox input {
    width: 100%;
    height: 60px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0 35px 0 5px;
    color: #fff;
}

.inputbox ion-icon {
    position: absolute;
    right: 8px;
    color: #fff;
    font-size: 1.2rem;
    top: 20px;
}

.forget {
    margin: 35px 0;
    font-size: 0.85rem;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.forget label {
    display: flex;
    align-items: center;
}

.forget label input {
    margin-right: 3px;
}

.forget a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.forget a:hover {
    text-decoration: underline;
}

button {
    width: 100%;
    height: 40px;
    border-radius: 40px;
    background-color: rgb(255, 255, 255, 1);
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.4s ease;
}

button a {
    text-decoration: none;
    color: #000;
}

button:hover {
    background-color: rgb(255, 255, 255, 0.5);
}

.discord {
    font-size: 0.9rem;
    color: #fff;
    text-align: center;
    margin: 25px 0 10px;
}

.discord p a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
}

.discord p a:hover {
    text-decoration: underline;
}


/* File Attachment */

.wrapper .attach label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

#fileInput {
    /* Hide the default file input visually */
    display: none;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
}

.file-label:hover {
    background-color: var(--hover-color);
}

button {
    width: 100%;
    height: 55px;
    border-radius: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
    background-color: var(--hover-color);
}

button:active {
    transform: scale(0.99);
}

/* ==================================== */
/* 📱 Mobile Responsiveness (Media Query) */
/* ==================================== */

@media (max-width: 500px) {
    /* For extra small screens (e.g., phones) */
    
    .wrapper {
        /* Reduce padding inside the form box to save space */
        padding: 1.5rem;
        /* Ensure it takes up most of the screen width, but not 100% to keep padding from the body */
        max-width: 95%; 
        border-radius: 16px; /* Slightly less aggressive rounding */
    }

    body {
        /* Reduce padding on the body for a full-screen look on mobile */
        padding: 10px; 
    }

    .wrapper h1 {
        /* Slightly reduce heading size on mobile */
        font-size: 1.8rem;
    }

    /* Make sure form elements have comfortable touch sizes */
    .username-group input, 
    .inputbox textarea, 
    button {
        padding: 12px 20px; /* Slightly less vertical padding */
        height: 50px; /* Reduced button/input height */
        font-size: 1rem; /* Base font size */
        border-radius: 10px;
    }
    
    .inputbox textarea {
        min-height: 120px; /* Smaller default height for textarea */
    }

    .file-label {
        /* Smaller, more compact file label */
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .footer-links {
        font-size: 0.75rem; /* Smaller footer text */
    }
}