/* Google Icons Styling */
.material-symbols-outlined {
    font-variation-settings:
            'FILL' 0,
            'wght' 400,
            'GRAD' 0,
            'opsz' 24
}

/* Base and Mobile-First Styles */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
}

.header {
    background-color: #ffffff;
    padding: 0 16px;
    border-bottom: 1px solid #dddfe2;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    max-width: 680px;
    margin: 0 auto;
}

.logo {
    color: #1877f2;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.feed {
    max-width: 680px;
    margin: 0 auto;
    padding-top: 16px;
}

.post {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 8px;
    max-height: 85vh;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
}

.post-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.post-author-info {
    display: flex;
    flex-direction: column;
}

.post-author {
    font-weight: 600;
    margin: 0;
}

.post-timestamp {
    font-size: 13px;
    color: #65676b;
    margin: 0;
}

.post-caption {
    padding: 4px 16px 12px 16px;
    font-size: 15px;
    line-height: 1.33;
}

.post-content {
    min-height: 0;
    overflow: hidden;
    cursor: pointer;
}

.post-content-image,
.post-content-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.post-feedback {
    display: flex;
    align-items: center;
    padding: 8px 16px;
}

.likes-count {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #65676b;
}

.likes-count .thumb-icon {
    font-size: 12px;
    background-color: #1877f2;
    color: white;
    padding: 3px;
    border-radius: 50%;
    margin-right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
    border-top: 1px solid #e9ebee;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    border-radius: 6px;
    background: none;
    border: none;
    position: relative;
}

.action-button:hover {
    background-color: #f2f2f2;
}

.action-button .material-symbols-outlined {
    margin-right: 6px;
    font-size: 22px;
}

.like-button.liked {
    color: #1877f2;
}

.like-emoji {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    opacity: 0;
    animation: floatUp 0.7s ease-out;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px);
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 15px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

#comment-input {
    width: 100%;
    min-height: 80px;
    margin-bottom: 10px;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 8px;
}

#submit-comment-btn {
    width: 100%;
    padding: 10px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
}

#submit-comment-btn:hover {
    background-color: #166fe5;
}

.close-full-image {
    position: absolute;
    top: 15px;
    right: 35px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
}

.full-image-content {
    max-width: 95vw;
    max-height: 95vh;
    display: block;
    margin: auto;
}

@media (min-width: 680px) {
    .post {
        border: 1px solid #dddfe2;
        box-shadow: none;
    }
}