* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    background-image: url("images/backgroundScale0.7000.png");
    background-size: cover;
    margin: 0;
    background-attachment: fixed;
        /* Fixed background */
        background-position: center;
        /* Center the image */
        background-repeat: no-repeat;
        /* No repeat */
        padding-top: env(safe-area-inset-top);
        /* Offset top for notch space */
        padding-bottom: env(safe-area-inset-bottom);
        /* Offset bottom for iOS navigation */
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
}

#app {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-top: black 2px solid;
    border-bottom: black 2px solid;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 1.5em;
    margin: 0 0 10px;
    text-align: center;
}

#user-setup-form,
#post-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

#emoji-input {
    padding: 12px;
    font-size: 24px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

.color-picker,
.emoji-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Use 3 columns */
    gap: 10px;
    /* Space between buttons */
    margin: 10px 0;
}

.color-button {
    width: 100%;
    /* Make the buttons full width of the grid cell */
    height: 50px;
    border: 2px solid black;
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

.emoji-button {
    width: 100%;
    /* Make the buttons full width of the grid cell */
    height: 50px;
    /* Adjust height for uniformity */
    font-size: 34px;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
}

button {
    margin-top: 10px;
    padding: 12px;
    background-color: #1da1f2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:active {
    transform: scale(0.98);
}

.profile-button {
    position: absolute;
    /* Position the button absolutely within #app */
    top: 20px;
    /* Distance from the top */
    right: 20px;
    /* Distance from the right */
    background: transparent;
    /* Remove default button styles */
    border: none;
    /* Remove button border */
    cursor: pointer;
    /* Show pointer on hover */
}

.input-container {
    display: flex;
    /* Use Flexbox */
    align-items: flex-start;
    /* Ensure both elements stretch to the same height */
    margin-bottom: 10px;
    /* Space between the input area and posts */
}

@keyframes rainbow-border {
    0% {
        border-color: #FF5733;
    }

    14% {
        border-color: #FFC300;
    }

    28% {
        border-color: #33FF57;
    }

    42% {
        border-color: #33C1FF;
    }

    56% {
        border-color: #5733FF;
    }

    70% {
        border-color: #FF33A6;
    }

    100% {
        border-color: #FF5733;
    }
}

#post-content {
    resize: none;
    min-height: 60px;
    padding: 12px;
    flex-grow: 1;
    margin-right: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 2px solid;
    animation: rainbow-border 9s linear infinite;
}

.post-timestamp {
    font-size: 12px;
    color: black;
    margin-left: 8px;
}

.post-button {
    height: 40px;
    width: 40px;
    /* Match the height of the textarea */
    cursor: pointer;
    /* Change cursor on hover */
    background: black;
    /* Example background color */
    color: white;
    font-size: 25px;
    font-weight: bolder;
    /* Text color */
    border: none;
    /* Remove border */
    border-radius: 4px;
    /* Rounded corners */
    padding: 0 15px;
    /* Horizontal padding */
    transition: background-color 0.3s;
    /* Transition for hover effect */
    display: flex;
    /* Align text center */
    align-items: center;
    /* Center text vertically */
    justify-content: center;
    /* Center text horizontally */
}

.post-button:hover {
    background: gray;
    color: white;
}

#posts-container {
    margin-top: 10px;
    max-height: 60vh;
    overflow-y: auto;
}

.post {
    padding: 10px;
    margin: 10px 0;
    border: 2px solid black;
    border-radius: 3px;
}

.feed-text {
    font-size: 21px;
}

.profile {
    display: flex;
    align-items: center;
    margin-top: 5px;
    justify-content: space-between;
}

.profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.name-container {
    flex-grow: 1;
    margin-left: 4px;
}

.post-timestamp {
    font-size: 12px;
    color: #686868;
    text-align: right;
}

.profile-picture {
    width: 30px;
    /* Set the width of the profile picture */
    height: 30px;
    /* Set the height of the profile picture */
    border-radius: 50%;
    /* Make it circular */
    display: inline-flex;
    /* Use flex to center items */
    justify-content: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
    margin-right: 8px;
    /* Space between the profile picture and the comment text */
    font-size: 20px;
    /* Size of the emoji */
    color: white;
    /* Ensure the emoji is visible on dark backgrounds */
}

.comment-form {
    display: flex;
    /* Use flexbox for alignment */
    align-items: center;
    /* Center vertically */
    margin-top: 10px;
    /* Space between post and comment form */
}

.comment-input {
    flex-grow: 1;
    /* Allow input to grow */
    padding: 5px;
    /* Padding for better text placement */
    height: 30px;
    /* Set a consistent height */
    /* Border for visibility */
    outline: none;
    /* Remove outline on focus */
    border-radius: 5px;
    border: 2px solid;
    animation: rainbow-border 9s linear infinite;
}

.comment-image {
    width: 30px;
    /* Set a fixed width for the image */
    height: 30px;
    /* Set a fixed height for the image */
    margin-left: 5px;
    /* Space between input and image */
    cursor: pointer;
    /* Pointer on hover */
    display: flex;
    /* Flex to center text */
    align-items: center;
    /* Center text vertically */
    justify-content: center;
    /* Center text horizontally */
    background: white;
}

.comments {
    margin-top: 10px;
    /* Space above comments section */
    padding-left: 40px;
    /* Indent comments to distinguish them from posts */
}

.comment {
    display: flex;
    align-items: center;
    /* Align comment content */
    margin-top: 5px;
    /* Spacing between comments */
}

.comment-profile {
    display: flex;
    align-items: center;
    margin-right: 10px;
    /* Space between comment profile and text */
}

.comment-profile .profile-picture {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}