body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7f6;
    margin: 0;
    padding: 0;
}

header {
    background: #333;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
}

header a {
    color: #fff;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

.login-container {
    width: 300px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    text-align: center;
    border-radius: 8px;
}

.login-container input, .login-container button {
    width: 80%;
    margin: 10px 0;
    padding: 10px;
}

input[type="submit"],
input[type="file"],
textarea {
    width: 100%; /* Make inputs take the full width */
    padding: 12px;
    font-size: 16px;
    margin-bottom: 10px; /* Space between elements */
    box-sizing: border-box; /* Include padding in width calculation */
}

.comment-form {
    width: 50%;
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
}

/* Make the textarea responsive */
.comment-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box; /* Prevent padding from causing overflow */
    padding: 10px;
    resize: vertical; /* Allow resizing vertically */
    min-height: 100px; /* Set a minimum height */
}

/* Make sure the textarea doesn't overflow on mobile */
@media (max-width: 768px) {
    .comment-form textarea {
        padding: 15px;
        font-size: 14px; /* Adjust font size for better readability on mobile */
    }
}


.comment-form button {
    margin-top: 10px;
    padding: 10px 20px;
}

.comment-feed {
    display: flex;
    flex-direction: column;
}

.comment {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
}

.comment img {
    max-width: 100%; /* Makes the image responsive */
    height: auto;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    font-size: 16px;
}


.comments-feed {
    width: 60%;
    margin: 20px auto;
}

.comment-card {
    background: white;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.1);
}

.comment-card p {
    word-wrap: break-word; /* Prevents long words or links from overflowing */
    word-break: break-word; /* Ensures long text breaks into multiple lines */
    overflow-wrap: break-word; /* Prevents text from spilling out of its container */
}


.comment-card img {
    max-width: 100%;
    margin-top: 10px;
    border-radius: 8px;
}

.timestamp {
    font-size: 0.8em;
    color: gray;
}

/* Base styles for desktop and larger screens */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

.container {
    width: 80%;
    margin: 0 auto;
    padding: 20px;
}

.comment {
    background-color: #fff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Responsive design for smaller screens (tablets, phones) */
@media (max-width: 768px) {
    .container {
        width: 90%;
        padding: 15px;
    }

    .comment {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        width: 100%;
        padding: 10px;
    }

    .comment {
        font-size: 12px;
        padding: 8px;
    }

    textarea {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }

    input[type="file"] {
        width: 100%;
    }

    input[type="submit"] {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }
}
