/* Share Section */
.share-container {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
    /* Pushed down */
}

.input-wrapper {
    position: relative;
}

#post-input {
    width: 100%;
    height: 60px;
    /* Thinner */
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 15px;
    resize: none;
    font-family: inherit;
    outline: none;
    padding-bottom: 30px;
    /* Space for footer */
}

.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
}

.media-actions {
    display: flex;
    gap: 8px;
}

.media-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-btn:hover {
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
}

.media-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 35px;
    /* Space for footer */
}

.media-preview-container.hidden {
    display: none;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Media Carousel in Posts */
.post-media-container {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #000;
    width: calc(100% + 32px);
    /* Fill padding of parent */
    margin-left: -16px;
    /* Offset padding */
    margin-right: -16px;
}

.post-media-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.post-media-carousel::-webkit-scrollbar {
    display: none;
}

.media-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 500px;
}

.media-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.post-video {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    background: #000;
}



.carousel-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
}



.char-count {
    font-size: 11px;
    color: var(--text-secondary);
}

.btn-sm {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

#share-btn.hidden {
    display: none;
}

#share-btn:active {
    transform: scale(0.98);
}

/* Post list */
#posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
    /* Added padding to prevent sticking to footer */
}

.post-item {
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    /* Stacked layout */
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.post-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
    width: 100%;
}

.post-footer {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.post-item:active {
    transform: scale(0.99);
}

.post-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.post-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.follow-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #000000;
    border: 1.5px solid var(--accent-color);
    border-radius: 50%;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 2;
    transition: 0.2s;
}

.follow-badge:active {
    transform: scale(1.2);
}

.post-content-wrapper {
    flex: 1;
}

.post-user-info {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.verified-icon-lg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-left: 1px;
    margin-top: -4px;
    display: inline-block;
}

.clickable {
    cursor: pointer;
}

.post-text {
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-primary);
    word-break: break-word;
}

.post-actions {
    display: flex;
    justify-content: flex-end;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

.star-icon {
    width: 20px;
    height: 20px;
    filter: grayscale(1) brightness(2);
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn.liked .star-icon {
    filter: none;
    transform: scale(1.2);
}

.like-btn.liked {
    color: var(--star-active);
}