/**
 * LA TANDA - Enhanced Social Feed Styles
 * Estilos para tarjetas sociales con avatares y engagement
 * Version: 8.0.0
 * Updated: 2026-02-03
 */

/* === Container === */
.social-feed-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === Header === */
.social-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-feed-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.social-feed-title i {
    color: #00FFFF;
}

/* === Filter Tabs === */
.feed-tabs-container {
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.feed-tabs-container::-webkit-scrollbar {
    display: none;
}

.feed-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    min-width: max-content;
}

.feed-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    min-height: 44px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
    .feed-tab:hover {
        background: rgba(255, 255, 255, 0.08);
        color: rgba(255, 255, 255, 0.9);
    }
}

.feed-tab.active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15) 0%, rgba(0, 204, 204, 0.15) 100%);
    border-color: rgba(0, 255, 255, 0.3);
    color: #00FFFF;
}

.feed-tab i {
    font-size: 0.9rem;
}

/* Trending Badge */
.trending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
    border-radius: 50%;
    margin-left: 6px;
    animation: pulse-fire 1.5s ease-in-out infinite;
}

.trending-badge i {
    font-size: 10px;
    color: #fff;
}

@keyframes pulse-fire {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* === Feed List === */
.social-feed-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === ENHANCED SOCIAL CARDS === */
.social-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .social-card:hover {
        border-color: rgba(0, 255, 255, 0.2);
        transform: translateY(-2px);
        box-shadow: 0 8px 32px rgba(0, 255, 255, 0.1);
    }
}

/* === Card Header === */
.social-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
}

.actor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
}

.actor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.actor-avatar.initials {
    background: rgba(0, 255, 255, 0.15);
}

.actor-avatar.initials span {
    color: #00FFFF;
}

.verified-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 14px;
    color: #00FFFF;
    background: #0f172a;
    border-radius: 50%;
    padding: 2px;
}

.actor-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.actor-name {
    display: block;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-type-label {
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-type-label i {
    font-size: 0.7rem;
}

.event-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

/* === Card Body === */
.social-card-body {
    padding: 0 16px 16px;
}

.event-title {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.4;
}

.event-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 12px;
    line-height: 1.5;
}

/* === Media === */

/* === Metadata === */
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.event-meta span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-meta .meta-price {
    color: #22d55e !important;
    font-weight: 600;
}

.event-meta .meta-numbers {
    color: #8b5cf6;
}

/* === Card Footer - Engagement === */
.social-card-footer {
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
}

.engagement-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    font-size: 0.9rem;
    font-family: inherit;
}

.engagement-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #00FFFF;
}

.engagement-btn:active {
    transform: scale(0.95);
}

.engagement-btn i {
    font-size: 1.1rem;
}

.engagement-btn span {
    font-size: 0.85rem;
    min-width: 12px;
}

/* Like button states */
.engagement-btn.like-btn:hover {
    color: #ff6b6b;
}

.engagement-btn.liked {
    color: #ff6b6b;
}

.engagement-btn.liked i {
    font-weight: 900;
}

/* Comment button hover */
.engagement-btn.comment-btn:hover {
    color: #3b82f6;
}

/* Share button hover */
.engagement-btn.share-btn:hover {
    color: #22d55e;
}

/* Bookmark button states */
.engagement-btn.bookmark-btn:hover {
    color: #fbbf24;
}

.engagement-btn.bookmarked {
    color: #fbbf24;
}

.engagement-btn.bookmarked i {
    font-weight: 900;
}

/* === Empty State === */
.social-feed-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.social-feed-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.social-feed-empty p {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    color: rgba(255, 255, 255, 0.6);
}

.social-feed-empty span {
    font-size: 0.9rem;
}

/* === Loading State === */
.social-feed-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

.social-feed-loading i {
    font-size: 1.5rem;
    color: #00FFFF;
}

/* === Load More === */
.social-feed-load-more {
    display: flex;
    justify-content: center;
    padding: 20px;
    color: #00FFFF;
    font-size: 1.25rem;
}

/* === Error State === */
.social-feed-error {
    text-align: center;
    padding: 40px 20px;
    color: #ff6b6b;
}

.social-feed-error i {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.social-feed-error p {
    margin: 0 0 15px 0;
}

.social-feed-error .btn-retry {
    background: transparent;
    border: 1px solid #00FFFF;
    color: #00FFFF;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.social-feed-error .btn-retry:hover {
    background: #00FFFF;
    color: #0f0f1a;
}

/* === Sentinel for infinite scroll === */
.social-feed-sentinel {
    height: 1px;
}

/* === Mobile Responsive === */
@media (max-width: 640px) {
    .social-feed-wrapper {
        padding: 0 10px;
    }

    .social-card-header {
        padding: 14px 14px 10px;
        gap: 10px;
    }

    .actor-avatar {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }

    .actor-name {
        font-size: 0.9rem;
    }

    .social-card-body {
        padding: 0 14px 14px;
    }

    .event-title {
        font-size: 0.95rem;
    }

    .event-desc {
        font-size: 0.85rem;
    }

    .event-meta {
        gap: 8px;
    }

    .event-meta span {
        font-size: 0.75rem;
    }

    .engagement-btn {
        padding: 10px 6px;
    }

    .engagement-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .social-feed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .social-card-header {
        padding: 12px 12px 8px;
    }

    .actor-avatar {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .social-card-body {
        padding: 0 12px 12px;
    }

    .engagement-btn span {
        display: inline;
        font-size: 0.75rem;
    }

    .social-card-footer {
        padding: 2px 4px;
    }

    .engagement-btn {
        padding: 10px;
    }

    .event-media img {
        max-height: 200px;
    }
}

/* ================================================
   COMPOSE BOX (Twitter-style)
   ================================================ */
.compose-box {
    background: rgba(22, 28, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.compose-box-inner {
    display: flex;
    gap: 12px;
}

.compose-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 255, 255, 0.1));
    border: 2px solid rgba(0, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compose-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.compose-avatar.has-image {
    background: transparent;
    border-color: rgba(0, 255, 255, 0.5);
}

.compose-avatar-initials {
    color: #00FFFF;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compose-input-wrapper {
    width: 100%;
}

.compose-input {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.5;
    resize: none;
    outline: none;
    padding: 8px 0;
    font-family: inherit;
    min-height: 28px;
    max-height: 300px;
    overflow-y: auto;
}

.compose-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.compose-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.compose-tools {
    display: flex;
    gap: 4px;
}

.compose-tool {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #00FFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    font-size: 1rem;
}

.compose-tool:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.1);
}

.compose-tool:active {
    transform: scale(0.95);
}

.compose-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compose-ai-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.compose-ai-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
    color: #00FFFF;
}

.compose-ai-btn i {
    font-size: 0.9rem;
}

.compose-submit-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #00FFFF, #00E5E5);
    border: none;
    border-radius: 20px;
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.compose-submit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

.compose-submit-btn:active {
    transform: scale(0.98);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .compose-box {
        padding: 10px;
        margin: 0 0 10px 0;
        border-radius: 12px;
        border-left: none;
        border-right: none;
    }

    .compose-box-inner {
        gap: 10px;
    }

    .compose-avatar {
        width: 36px;
        height: 36px;
    }

    .compose-content {
        gap: 8px;
    }

    .compose-input {
        font-size: 1rem;
    }

    .compose-tools {
        gap: 2px;
    }

    .compose-tool {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .compose-toolbar {
        padding-top: 8px;
    }

    .compose-ai-btn span {
        display: none;
    }

    .compose-ai-btn {
        padding: 8px 10px;
    }

    .compose-submit-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .feed-tabs {
        padding: 8px 0;
    }

    .feed-tab {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .compose-tool:nth-child(n+5) {
        display: none;
    }
}

/* Touch-friendly buttons for mobile */
.compose-tool,
.compose-ai-btn,
.compose-submit-btn,
.feed-tab {
    -webkit-tap-highlight-color: rgba(0, 255, 255, 0.2);
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Ensure buttons are clickable */
.compose-box button,
.feed-tabs button {
    position: relative;
    z-index: 1;
}

/* ========================================
   Image Upload Preview - Added 2026-02-02
   ======================================== */

.compose-image-preview {
    position: relative;
    margin: 8px 0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
}

.compose-image-preview img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.compose-image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.compose-image-remove:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.compose-image-remove i {
    font-size: 14px;
}

/* Active state for image button when image selected */
.compose-tool.active {
    color: #00FFFF;
    background: rgba(0, 255, 255, 0.15);
}

/* Event media in feed cards */
.event-media {
    margin: 12px 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.event-media img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .compose-image-preview img {
        max-height: 200px;
    }
    
    .event-media img {
        max-height: 280px;
    }
}

/* ========================================
   Multi-Image Grid (Twitter-style)
   Added: 2026-02-02
   ======================================== */

/* Image grid container */
.event-media-grid {
    display: grid;
    gap: 4px;
    border-radius: 16px;
    overflow: hidden;
    margin: 12px 0;
}

/* Single image - full width, natural aspect ratio */
.event-media-grid.grid-1 {
    grid-template-columns: 1fr;
}

.event-media-grid.grid-1 img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.2);
}

/* 2 images - side by side */
.event-media-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    aspect-ratio: 2 / 1;
}

.event-media-grid.grid-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3 images - 1 large left, 2 stacked right */
.event-media-grid.grid-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 16 / 9;
}

.event-media-grid.grid-3 img:first-child {
    grid-row: 1 / 3;
}

.event-media-grid.grid-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4 images - 2x2 grid */
.event-media-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    aspect-ratio: 1 / 1;
}

.event-media-grid.grid-4 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover effect on grid images */
.event-media-grid img {
    cursor: pointer;
    transition: filter 0.2s ease;
}

.event-media-grid img:hover {
    filter: brightness(0.9);
}

/* ========================================
   Compose Box - Multi-Image Preview
   ======================================== */

.compose-images-preview.has-images {
    display: grid;
    gap: 4px;
    margin: 8px 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.compose-images-preview.preview-1 {
    grid-template-columns: 1fr;
}

.compose-images-preview.preview-2 {
    grid-template-columns: 1fr 1fr;
}

.compose-images-preview.preview-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.compose-images-preview.preview-3 .preview-item:first-child {
    grid-row: 1 / 3;
}

.compose-images-preview.preview-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.preview-item {
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compose-images-preview.preview-1 .preview-item img {
    max-height: 250px;
    object-fit: contain;
}

.compose-images-preview:not(.preview-1) {
    aspect-ratio: 16 / 9;
}

/* Remove button for each image */
.preview-item .remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.preview-item:hover .remove-image {
    opacity: 1;
}

.preview-item .remove-image:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Image count badge */
.compose-image-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .event-media-grid.grid-1 img {
        max-height: 350px;
    }
    
    .compose-images-preview.preview-1 .preview-item img {
        max-height: 180px;
    }
}

/* === POST MENU (Edit/Delete) === */

.post-menu-container {
    position: relative;
    margin-left: auto;
}

.post-menu-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(20, 30, 48, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    min-width: 160px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.post-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.post-menu-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.post-menu-dropdown button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-menu-dropdown button i {
    width: 16px;
    text-align: center;
}

.post-menu-edit:hover {
    color: #00FFFF;
}

.post-menu-delete:hover {
    color: #ef4444;
}

/* === EDIT MODAL === */

.post-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.post-edit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.post-edit-modal-content {
    position: relative;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.post-edit-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.post-edit-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-edit-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.post-edit-modal-body {
    padding: 20px;
}

.post-edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.post-edit-textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.5);
}

.post-edit-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.post-edit-char-count {
    text-align: right;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

.post-edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.post-edit-cancel,
.post-edit-save {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.post-edit-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.post-edit-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.post-edit-save {
    background: #00FFFF;
    border: none;
    color: #0a1628;
}

.post-edit-save:hover {
    background: #00e5e5;
    transform: translateY(-1px);
}

.post-edit-save:disabled {
    background: rgba(0, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .post-edit-modal {
        padding: 10px;
    }

    .post-edit-modal-content {
        max-width: none;
    }

    .post-edit-textarea {
        min-height: 120px;
    }

    .post-menu-dropdown {
        min-width: 140px;
    }
}

/* Fix: Ensure compose preview is hidden when empty */
.compose-images-preview:empty,
.compose-images-preview[style*="display: none"] {
    display: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ========================================
   @Mentions & #Hashtags - Added 2026-02-03
   ======================================== */

/* Mention links */
.mention-link {
    color: #00FFFF;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.mention-link:hover {
    color: #00cccc;
    text-decoration: underline;
}

/* Hashtag links */
.hashtag-link {
    color: #8b5cf6;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.hashtag-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}

/* Hashtag filter bar */
.hashtag-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.hashtag-filter-bar strong {
    color: #8b5cf6;
}

.clear-filter-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.clear-filter-btn i {
    font-size: 14px;
}

/* Search filter bar */
.search-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 12px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.search-filter-bar strong {
    color: #00FFFF;
}

.search-filter-bar i.fa-search {
    margin-right: 6px;
    opacity: 0.7;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .hashtag-filter-bar,
    .search-filter-bar {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .clear-filter-btn {
        padding: 4px 8px;
    }
}

/* ========================================
   @Mention Autocomplete Dropdown
   Added: 2026-02-03
   ======================================== */

.mention-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 4px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mention-item:hover,
.mention-item.selected {
    background: rgba(0, 255, 255, 0.1);
}

.mention-item:first-child {
    border-radius: 11px 11px 0 0;
}

.mention-item:last-child {
    border-radius: 0 0 11px 11px;
}

.mention-item:only-child {
    border-radius: 11px;
}

.mention-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.mention-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mention-initials {
    color: #00FFFF;
    font-weight: 600;
    font-size: 14px;
}

.mention-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mention-name {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mention-name .verified-icon {
    color: #00FFFF;
    font-size: 12px;
}

.mention-handle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* Position the dropdown relative to input wrapper */
.compose-input-wrapper {
    position: relative;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .mention-autocomplete {
        max-height: 200px;
    }
    
    .mention-item {
        padding: 8px 12px;
        gap: 10px;
    }
    
    .mention-avatar {
        width: 36px;
        height: 36px;
    }
    
    .mention-name {
        font-size: 13px;
    }
    
    .mention-handle {
        font-size: 12px;
    }
}

/* ========================================
   Image Menu Dropdown
   ======================================== */
.compose-tool-container {
    position: relative;
    display: inline-block;
}

.compose-tool-caret {
    font-size: 10px;
    margin-left: 3px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.compose-tool-container:hover .compose-tool-caret {
    opacity: 1;
}

.compose-image-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: rgba(30, 30, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 0;
    min-width: 140px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.compose-image-menu.show {
    display: block;
    animation: menuFadeIn 0.15s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.compose-image-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.compose-image-option:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
}

.compose-image-option i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

/* Mobile: show menu above on small screens */
@media (max-width: 480px) {
    .compose-image-menu {
        left: 50%;
        transform: translateX(-50%);
        min-width: 160px;
    }
    
    .compose-image-option {
        padding: 12px 16px;
        font-size: 15px;
    }
}


/* === VIDEO SUPPORT === */

/* Video preview in compose box */
.preview-video {
    position: relative;
}

.preview-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.video-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    z-index: 2;
}

.video-badge i {
    font-size: 10px;
}

/* Video in feed */
.media-video-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.media-video-wrapper video {
    width: 100%;
    max-height: 400px;
    display: block;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.media-video-wrapper video.playing ~ .video-play-overlay {
    opacity: 0;
}

.media-video-wrapper:hover .video-play-overlay {
    color: rgba(255, 255, 255, 1);
}

/* Compose media menu (updated) */
.compose-media-wrapper {
    position: relative;
    display: inline-block;
}

.compose-media-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: rgba(30, 30, 35, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 0;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.compose-media-menu.show {
    display: block;
    animation: menuFadeIn 0.15s ease-out;
}

.compose-media-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.compose-media-option:hover {
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
}

.compose-media-option i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

/* Mobile adjustments for video */
@media (max-width: 480px) {
    .media-video-wrapper video {
        max-height: 70vh;
    }

    .video-play-overlay {
        font-size: 36px;
    }

    .compose-media-menu {
        left: 50%;
        transform: translateX(-50%);
        min-width: 190px;
    }

    .compose-media-option {
        padding: 12px 16px;
        font-size: 15px;
    }
}


/* === CAMERA MODAL === */
.camera-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.camera-modal.show {
    display: flex;
}

.camera-modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    overflow: hidden;
    width: 90%;
    max-width: 640px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.camera-modal-title {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.camera-modal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s, opacity 0.2s, transform 0.2s;
}

.camera-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.camera-modal-body {
    position: relative;
    background: #000;
    aspect-ratio: 16/9;
}

.camera-modal-body video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
}

.camera-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-btn-switch {
    width: 44px;
    height: 44px;
    font-size: 16px;
}

.camera-btn-switch:hover {
    border-color: #00ffff;
    color: #00ffff;
}

.camera-btn-capture {
    width: 64px;
    height: 64px;
    font-size: 28px;
    border-width: 3px;
    border-color: #fff;
}

.camera-btn-capture:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.camera-btn-capture:active {
    transform: scale(0.95);
}

.camera-btn-record {
    width: 64px;
    height: 64px;
    font-size: 28px;
    border-width: 3px;
    border-color: #ff4444;
    color: #ff4444;
}

.camera-btn-record:hover {
    background: rgba(255, 68, 68, 0.15);
}

.camera-btn-record.recording {
    background: #ff4444;
    color: #fff;
    animation: recordPulse 1s ease-in-out infinite;
}

@keyframes recordPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); }
}

.camera-timer {
    color: #ff4444;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 44px;
    text-align: center;
}

@media (max-width: 480px) {
    .camera-modal-content {
        width: 100%;
        max-width: none;
        border-radius: 0;
        height: 100%;
    }

    .camera-modal-body {
        aspect-ratio: auto;
        flex: 1;
    }

    .camera-modal-content {
        display: flex;
        flex-direction: column;
    }

    .camera-modal-footer {
        padding: 20px;
    }
}

/* ========================================
   EMOJI PICKER - Added 2026-02-05
   ======================================== */

.compose-emoji-wrapper,
.compose-gif-wrapper,
.compose-poll-wrapper {
    position: relative;
    display: inline-block;
}

.compose-emoji-panel {
    width: 100%;
    max-height: 300px;
    background: rgba(20, 28, 40, 0.98);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    margin-top: 8px;
    animation: menuFadeIn 0.15s ease-out;
}

.emoji-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
}

.emoji-tabs::-webkit-scrollbar {
    display: none;
}

.emoji-tab {
    flex: 1;
    padding: 8px 4px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.emoji-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.emoji-tab.active {
    color: #00FFFF;
    border-bottom: 2px solid #00FFFF;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 255, 0.3) transparent;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 22px;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.emoji-item:hover {
    background: rgba(0, 255, 255, 0.15);
    transform: scale(1.2);
}

.emoji-item:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .emoji-item {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}

/* ========================================
   POLL CREATOR - Added 2026-02-05
   ======================================== */

.compose-poll-panel {
    background: rgba(20, 28, 40, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 14px;
    padding: 14px;
    margin-top: 8px;
    animation: menuFadeIn 0.15s ease-out;
}

.poll-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #00FFFF;
}

.poll-panel-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.poll-panel-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.poll-option-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.poll-option-input:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.5);
}

.poll-option-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.poll-add-option {
    background: transparent;
    border: 1px dashed rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    color: #00FFFF;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.poll-add-option:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: rgba(0, 255, 255, 0.5);
}

.poll-duration-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.poll-duration-row select {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.poll-duration-row select:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.5);
}

/* ========================================
   POLL DISPLAY (in feed cards) - Added 2026-02-05
   ======================================== */

.poll-display {
    margin: 12px 0;
}

.poll-vote-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: transparent;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.poll-vote-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.6);
    transform: translateX(2px);
}

.poll-vote-btn:active {
    transform: scale(0.98);
}

.poll-result-bar {
    position: relative;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poll-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(0, 255, 255, 0.12);
    border-radius: 10px;
    transition: width 0.6s ease-out;
}

.poll-result-bar.winner .poll-bar-fill {
    background: rgba(0, 255, 255, 0.22);
}

.poll-option-text {
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.poll-option-text i {
    color: #00FFFF;
    font-size: 12px;
}

.poll-result-bar.winner .poll-option-text {
    font-weight: 600;
}

.poll-option-pct {
    position: relative;
    z-index: 1;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.poll-result-bar.winner .poll-option-pct {
    color: #00FFFF;
}

.poll-info {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

/* ========================================
   GIF PANEL - Added 2026-02-05
   ======================================== */

.compose-gif-panel {
    width: 100%;
    max-height: 380px;
    background: rgba(20, 28, 40, 0.98);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    animation: menuFadeIn 0.15s ease-out;
}

.gif-search-wrapper {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gif-search-input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.gif-search-input:focus {
    outline: none;
    border-color: rgba(0, 255, 255, 0.5);
}

.gif-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.gif-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
}

.gif-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 6px;
    overflow-y: auto;
    max-height: 280px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 255, 0.3) transparent;
}

.gif-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
}

.gif-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.gif-item:hover img {
    transform: scale(1.05);
}

.gif-loading,
.gif-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.gif-loading i {
    font-size: 24px;
    color: #00FFFF;
}

.gif-attribution {
    padding: 6px 10px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* GIF badge in compose preview */
.gif-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #00FFFF;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .gif-grid {
        max-height: 230px;
    }

    .compose-gif-panel {
        max-height: 320px;
    }
}

/* ========================================
   LOCATION PANEL
   ======================================== */
.compose-location-panel {
    width: 100%;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.location-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.location-panel-header i {
    color: #00FFFF;
    margin-right: 6px;
}

.location-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.location-panel-close:hover {
    color: #ff4757;
}

.location-panel-body {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    align-items: center;
}

.location-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.location-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.location-input:focus {
    border-color: rgba(0, 255, 255, 0.3);
}

.location-detect-btn {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    color: #00FFFF;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, background 0.2s, opacity 0.2s, transform 0.2s;
}

.location-detect-btn:hover {
    background: rgba(0, 255, 255, 0.2);
}

.location-detect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   INCOGNITO BAR
   ======================================== */
.compose-incognito-bar {
    width: 100%;
    margin-top: 8px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.compose-incognito-bar > i {
    color: #8b5cf6;
    font-size: 16px;
}

.compose-incognito-bar > span {
    flex: 1;
}

.incognito-bar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}

.incognito-bar-close:hover {
    color: #ff4757;
}

/* Active state for location/incognito buttons */
#composeLocationBtn.active {
    color: #00FFFF;
    background: rgba(0, 255, 255, 0.15);
}

#composeIncognitoBtn.active {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.15);
}

/* ========================================
   ANONYMOUS POST STYLING
   ======================================== */
.social-card.anonymous-post {
    border-color: rgba(139, 92, 246, 0.15);
}

.social-card.anonymous-post .actor-avatar {
    background: rgba(139, 92, 246, 0.12) !important;
}

/* ========================================
   POST LOCATION BADGE
   ======================================== */
.post-location-badge {
    margin-left: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.post-location-badge i {
    font-size: 0.65rem;
    margin-right: 3px;
}

@media (max-width: 480px) {
    .location-panel-body {
        flex-direction: column;
    }

    .location-detect-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   IMAGE LIGHTBOX
   ======================================== */
.media-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.media-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-content {
    position: relative;
    z-index: 5;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-content img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Make feed images clickable */
.lightbox-trigger {
    cursor: pointer;
    transition: filter 0.2s;
}

.lightbox-trigger:hover {
    filter: brightness(0.85);
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .lightbox-content img {
        max-width: 95vw;
        max-height: 80vh;
        border-radius: 4px;
    }
}

/* Deep link highlight for shared posts */
.social-card.highlight-shared {
    animation: highlightPulse 3s ease-out;
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.6), 0 0 20px rgba(0, 255, 255, 0.15);
}
@keyframes highlightPulse {
    0% { box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.3); }
    100% { box-shadow: none; }
}

/* ==========================================
   LINK PREVIEW - Compose & Feed
   ========================================== */

/* Compose link preview */
.compose-link-preview {
    margin: 8px 0 0;
}

.link-preview-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.link-preview-loading i {
    color: #00FFFF;
}

.link-preview-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.link-preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    z-index: 2;
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.link-preview-remove:hover {
    background: rgba(255, 0, 0, 0.6);
    color: #fff;
}

.link-preview-image {
    width: 100%;
    max-height: 180px;
    overflow: hidden;
}

.link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.link-preview-info {
    padding: 10px 12px;
}

.link-preview-domain {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.link-preview-domain i {
    margin-right: 4px;
    font-size: 0.65rem;
}

.link-preview-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.35;
    margin-bottom: 4px;
}

.link-preview-desc {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.35;
}

/* Feed post link preview card */
.feed-link-preview-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.feed-link-preview-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 255, 255, 0.2);
}

.feed-link-preview-image {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
}

.feed-link-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feed-link-preview-info {
    padding: 10px 14px;
}

.feed-link-preview-domain {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feed-link-preview-domain i {
    margin-right: 4px;
    font-size: 0.65rem;
}

.feed-link-preview-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.35;
    margin-bottom: 4px;
}

.feed-link-preview-desc {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.35;
}

@media (max-width: 600px) {
    .link-preview-image,
    .feed-link-preview-image {
        max-height: 140px;
    }
}

/* Post URLs - clickable links in feed text */
.post-link {
    color: #00FFFF;
    text-decoration: none;
    word-break: break-all;
    transition: opacity 0.15s ease;
}

.post-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ==========================================
   EMBED CONTAINERS - YouTube, Vimeo, Spotify, TikTok
   ========================================== */

.embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.embed-spotify {
    padding-bottom: 0;
    height: 152px;
}

.embed-tiktok {
    padding-bottom: 0;
    height: 740px;
    max-height: 80vh;
}

@media (max-width: 600px) {
    .embed-tiktok {
        height: 580px;
    }
}

/* ==========================================
   UPLOAD PROGRESS BAR
   ========================================== */

.upload-progress-bar {
    display: none;
    position: relative;
    width: 100%;
    height: 28px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin: 8px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00FFFF, #00CCCC);
    border-radius: 14px;
    transition: width 0.2s ease;
}

.upload-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Compose highlight animation (triggered by mobile FAB) */
.compose-highlight {
    animation: composeGlow 1.5s ease;
}
@keyframes composeGlow {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0); }
    30% { box-shadow: 0 0 20px 4px rgba(0, 255, 255, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 255, 0); }
}

/* Lightbox video styles */
#lightboxVideo {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Landscape mode for videos */
@media (orientation: landscape) and (max-height: 700px) {
    .media-video-wrapper video {
        max-height: 90vh;
        width: 100%;
    }
    .lightbox-content video {
        max-height: 95vh;
        max-width: 100vw;
    }
}

/* Focus-visible indicators for keyboard navigation */
.engagement-btn:focus-visible,
.compose-tool:focus-visible,
.compose-submit-btn:focus-visible,
.feed-tab:focus-visible,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible,
.post-menu-btn:focus-visible,
.post-menu-dropdown button:focus-visible,
.camera-btn:focus-visible,
.poll-vote-btn:focus-visible,
.btn-retry:focus-visible,
.clear-filter-btn:focus-visible {
    outline: 2px solid #00FFFF;
    outline-offset: 2px;
}
