* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {

    font-family: Arial, sans-serif;

    background: #f0f2f5;

    color: #222;

}


/* NAVBAR */

.navbar {

    width: 100%;

    height: 60px;

    background: white;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 30px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

    position: sticky;

    top: 0;

    z-index: 100;

}


.logo {

    font-size: 24px;

    font-weight: bold;

    color: #1877f2;

}


.user-info {

    font-weight: bold;

}


/* MAIN CONTAINER */

.container {

    max-width: 700px;

    margin: 30px auto;

    padding: 0 15px;

}


/* CREATE POST */

.create-post {

    background: white;

    padding: 20px;

    border-radius: 12px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

    margin-bottom: 25px;

}


.create-post h2 {

    margin-bottom: 15px;

}


textarea {

    width: 100%;

    height: 100px;

    resize: none;

    padding: 15px;

    border: 1px solid #ddd;

    border-radius: 10px;

    font-size: 16px;

    outline: none;

}


textarea:focus {

    border-color: #1877f2;

}


.post-tools {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 15px;

}


#mediaInput {

    display: none;

}


.media-button {

    cursor: pointer;

    color: #1877f2;

    font-weight: bold;

}


.post-button {

    border: none;

    background: #1877f2;

    color: white;

    padding: 10px 25px;

    border-radius: 8px;

    cursor: pointer;

    font-weight: bold;

}


.post-button:hover {

    background: #0d65d9;

}


/* MEDIA PREVIEW */

.media-preview {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

    margin-top: 15px;

}


.media-preview img,
.media-preview video {

    width: 120px;

    height: 120px;

    object-fit: cover;

    border-radius: 8px;

}


/* POST CARD */

.post-card {

    background: white;

    border-radius: 12px;

    padding: 20px;

    margin-bottom: 25px;

    box-shadow: 0 2px 8px rgba(0,0,0,0.1);

}


.post-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 15px;

}


.post-user {

    font-weight: bold;

    font-size: 17px;

}


.post-date {

    color: #777;

    font-size: 12px;

}


.delete-post {

    border: none;

    background: transparent;

    color: red;

    cursor: pointer;

    font-size: 18px;

}


.caption {

    font-size: 16px;

    margin-bottom: 15px;

    white-space: pre-wrap;

}


/* POST MEDIA */

.post-media {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

    gap: 8px;

}


.post-media img,
.post-media video {

    width: 100%;

    max-height: 500px;

    object-fit: cover;

    border-radius: 8px;

}


/* POST STATISTICS */

.post-stats {

    display: flex;

    justify-content: space-between;

    margin-top: 15px;

    color: #666;

    font-size: 14px;

}


/* ACTION BUTTONS */

.post-actions {

    display: flex;

    border-top: 1px solid #ddd;

    border-bottom: 1px solid #ddd;

    margin-top: 12px;

}


.post-actions button {

    flex: 1;

    padding: 12px;

    border: none;

    background: transparent;

    cursor: pointer;

    font-size: 15px;

}


.post-actions button:hover {

    background: #f0f2f5;

}


.like-button.liked {

    color: #1877f2;

    font-weight: bold;

}


/* COMMENTS */

.comments-section {

    margin-top: 15px;

}


.comment {

    background: #f0f2f5;

    border-radius: 10px;

    padding: 10px;

    margin-top: 10px;

}


.comment-header {

    display: flex;

    justify-content: space-between;

}


.comment-user {

    font-weight: bold;

}


.comment-text {

    margin-top: 5px;

}


.comment-stars {

    margin-top: 5px;

    color: #f5b301;

    letter-spacing: 2px;

}


/* COMMENT FORM */

.comment-form {

    display: flex;

    gap: 8px;

    margin-top: 15px;

}


.comment-input {

    flex: 1;

    padding: 10px;

    border: 1px solid #ddd;

    border-radius: 20px;

}


.comment-submit {

    border: none;

    background: #1877f2;

    color: white;

    padding: 8px 15px;

    border-radius: 20px;

    cursor: pointer;

}


/* STAR RATING */

.star-rating {

    display: flex;

    flex-direction: row-reverse;

    justify-content: flex-end;

    gap: 3px;

    margin-top: 8px;

}


.star-rating input {

    display: none;

}


.star-rating label {

    font-size: 25px;

    color: #ccc;

    cursor: pointer;

}


.star-rating input:checked ~ label {

    color: #f5b301;

}


.star-rating label:hover,
.star-rating label:hover ~ label {

    color: #f5b301;

}


/* AVERAGE RATING */

.average-rating {

    margin-top: 10px;

    font-size: 14px;

    color: #555;

}


@media (max-width: 600px) {

    .navbar {

        padding: 0 15px;

    }


    .post-tools {

        flex-direction: column;

        align-items: stretch;

        gap: 15px;

    }


    .post-button {

        width: 100%;

    }

}