/* General Body Styles */
body {
    font-family: sans-serif;
    background-image: url('https://firebasestorage.googleapis.com/v0/b/hylifeaward.firebasestorage.app/o/Element%2Fsent%20mes%2F1.png?alt=media&token=ccb95634-4646-41d6-a129-0748957ae3cb');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    transition: opacity 0.5s ease-out;
}

body.fade-out {
    opacity: 0;
}

/* Main Container */
.container {
    position: relative;
    width: 98vw;
    max-width: 490px;
    aspect-ratio: 9 / 16;
    background-image: url('https://firebasestorage.googleapis.com/v0/b/hylifeaward.firebasestorage.app/o/Element%2Fsent%20mes%2F2.png?alt=media&token=f214db58-671e-4998-9d02-dd11034c6b33');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Explicitly positioned header image */
#header-image {
    position: absolute;
    top: 3%;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    height: auto;
}

/* Wrapper for Textarea and Counter */
#textarea-wrapper {
    position: absolute;
    top: 41%;
    left: 15%;
    width: 70%;
    height: 25%;
}

/* The actual, interactive textarea */
textarea#message-input {
    width: 100%;
    height: 80%; /* Leave space for the counter below */
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid rgba(173, 216, 230, 0.9);
    border-radius: 20px;
    background-color: rgba(173, 216, 230, 0.9);
    color: #000;
    font-size: 16px;
    resize: none;
    outline: none;
}

/* Character Counter */
#char-counter-container {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 14px;
    color: #444; /* Darker color for visibility on light background */
    z-index: 1; /* Ensure it's above the textarea */
}

/* Submit Button Image - Positioned Below Textarea */
#submit-button-img {
    position: absolute;
    top: 64%; /* Moved up slightly */
    left: 50%;
    transform: translateX(-50%); /* Center the button */
    width: 35%;
    height: auto;
    cursor: pointer;
    z-index: 10;
}

#submit-button-img:hover {
    transform: translateX(-50%) scale(1.05);
}