/* ==================== FEED CONTAINER ==================== */
.feed-container {
    max-width: 680px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* ==================== COMPOSE BOX ==================== */
.compose-box {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.compose-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.compose-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
}

.compose-input-wrapper {
    flex: 1;
}

.compose-textarea {
    width: 100%;
    min-height: 80px;
    padding: var(--space-sm);
    background: transparent;
    border: none;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    resize: none;
    outline: none;
}

.compose-textarea::placeholder {
    color: var(--text-dim);
}

.compose-divider {
    height: 1px;
    background: var(--border-default);
    margin: var(--space-md) 0;
}

.compose-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.compose-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.compose-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--fitness-teal);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.compose-action-btn:hover {
    background: var(--fitness-teal-light);
}

.compose-action-btn svg {
    width: 20px;
    height: 20px;
}

.compose-action-btn:disabled {
    color: var(--text-dim);
    cursor: not-allowed;
}

.compose-action-btn:disabled:hover {
    background: transparent;
}

.compose-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.compose-char-count {
    font-size: var(--text-xs);
    color: var(--text-dim);
}

.compose-char-count.warning {
    color: var(--warning);
}

.compose-char-count.error {
    color: var(--error);
}

.compose-submit-btn {
    padding: var(--space-sm) var(--space-lg);
}

/* Media Preview */
.compose-media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.compose-media-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.compose-media-item img,
.compose-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compose-media-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-media-remove svg {
    width: 14px;
    height: 14px;
}

/* Platform Selector */
.compose-platform-selector {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs);
    background: var(--bg-input);
    border-radius: var(--radius-full);
}

.platform-option {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    opacity: 0.5;
    transition: all var(--transition-fast);
}

.platform-option:hover {
    opacity: 0.8;
}

.platform-option.active {
    opacity: 1;
    background: var(--bg-hover);
}

.platform-option svg {
    width: 16px;
    height: 16px;
}

.platform-option[data-platform="soulmate"] { color: var(--soulmate-red); }
.platform-option[data-platform="creator"] { color: var(--creator-orange); }
.platform-option[data-platform="ai"] { color: var(--ai-gold); }
.platform-option[data-platform="professional"] { color: var(--professional-yellow); }
.platform-option[data-platform="fitness"] { color: var(--fitness-teal); }

/* ==================== FEED TABS ==================== */
.feed-tabs {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-lg);
    overflow: hidden;
}

.feed-tab {
    flex: 1;
    padding: var(--space-md);
    background: transparent;
    border: none;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.feed-tab:hover {
    color: var(--text-white);
    background: var(--bg-hover);
}

.feed-tab.active {
    color: var(--text-white);
}

.feed-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--fitness-teal);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}

/* ==================== POST CARD ==================== */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-md);
    transition: border-color var(--transition-fast);
}

.post-card:hover {
    border-color: var(--border-hover);
}

/* Post Header */
.post-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    padding-bottom: 0;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    background: var(--bg-input);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.post-avatar:hover {
    transform: scale(1.05);
}

.post-user-info {
    flex: 1;
    min-width: 0;
}

.post-user-top {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.post-display-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: var(--text-base);
    cursor: pointer;
}

.post-display-name:hover {
    text-decoration: underline;
}

.post-verified {
    color: var(--fitness-teal);
    width: 16px;
    height: 16px;
}

.post-username {
    font-size: var(--text-sm);
    color: var(--text-dim);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.post-time {
    font-size: var(--text-xs);
    color: var(--text-dim);
}

.post-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
}

.post-platform-badge[data-platform="soulmate"] {
    background: var(--soulmate-red-light);
    color: var(--soulmate-red);
}

.post-platform-badge[data-platform="creator"] {
    background: var(--creator-orange-light);
    color: var(--creator-orange);
}

.post-platform-badge[data-platform="ai"] {
    background: var(--ai-gold-light);
    color: var(--ai-gold);
}

.post-platform-badge[data-platform="professional"] {
    background: var(--professional-yellow-light);
    color: var(--professional-yellow);
}

.post-platform-badge[data-platform="fitness"] {
    background: var(--fitness-teal-light);
    color: var(--fitness-teal);
}

.post-menu-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-dim);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.post-menu-btn svg {
    width: 18px;
    height: 18px;
}

/* Post Body */
.post-body {
    padding: var(--space-md) var(--space-lg);
}

.post-content {
    font-size: var(--text-base);
    color: var(--text-white);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-content a {
    color: var(--fitness-teal);
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content .hashtag {
    color: var(--fitness-teal);
    cursor: pointer;
}

.post-content .hashtag:hover {
    text-decoration: underline;
}

.post-content .mention {
    color: var(--creator-orange);
    cursor: pointer;
}

.post-content .mention:hover {
    text-decoration: underline;
}

/* Post Media */
.post-media {
    margin-top: var(--space-md);
}

.post-media-grid {
    display: grid;
    gap: 2px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-media-grid.single {
    grid-template-columns: 1fr;
}

.post-media-grid.double {
    grid-template-columns: 1fr 1fr;
}

.post-media-grid.triple {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.post-media-grid.triple .post-media-item:first-child {
    grid-row: span 2;
}

.post-media-grid.quad {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.post-media-item {
    position: relative;
    background: var(--bg-input);
    cursor: pointer;
    overflow: hidden;
}

.post-media-item img,
.post-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.post-media-item:hover img,
.post-media-item:hover video {
    transform: scale(1.02);
}

.post-media-item.single img,
.post-media-item.single video {
    max-height: 500px;
    object-fit: contain;
    background: var(--bg-dark);
}

.post-media-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-media-play-btn svg {
    width: 28px;
    height: 28px;
    margin-left: 4px;
}

.post-media-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-white);
}

/* Post Actions */
.post-actions {
    display: flex;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--border-default);
}

.post-action {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-dim);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-action:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.post-action svg {
    width: 20px;
    height: 20px;
}

.post-action.liked {
    color: var(--soulmate-red);
}

.post-action.liked svg {
    fill: var(--soulmate-red);
}

.post-action.retweeted {
    color: var(--success);
}

.post-action.bookmarked {
    color: var(--ai-gold);
}

.post-action.bookmarked svg {
    fill: var(--ai-gold);
}

.post-action-spacer {
    flex: 1;
}

/* ==================== LOADING STATES ==================== */
.post-skeleton {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.post-skeleton-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.post-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.post-skeleton-info {
    flex: 1;
}

.post-skeleton-name {
    height: 16px;
    width: 120px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.post-skeleton-username {
    height: 12px;
    width: 80px;
    border-radius: var(--radius-sm);
}

.post-skeleton-content {
    height: 14px;
    margin-bottom: var(--space-sm);
    border-radius: var(--radius-sm);
}

.post-skeleton-content:last-child {
    width: 70%;
}

/* ==================== EMPTY STATE ==================== */
.feed-empty {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.feed-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-lg);
    color: var(--text-dim);
}

.feed-empty-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: var(--space-sm);
}

.feed-empty-text {
    font-size: var(--text-sm);
    color: var(--text-dim);
    margin-bottom: var(--space-lg);
}

/* ==================== LOAD MORE ==================== */
.load-more {
    display: flex;
    justify-content: center;
    padding: var(--space-lg);
}

.load-more-btn {
    padding: var(--space-sm) var(--space-xl);
}

/* ==================== INFINITE SCROLL OBSERVER ==================== */
.scroll-observer {
    height: 1px;
    width: 100%;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .feed-container {
        padding: var(--space-sm);
    }

    .compose-box {
        padding: var(--space-md);
    }

    .post-header {
        padding: var(--space-md);
        padding-bottom: 0;
    }

    .post-body {
        padding: var(--space-sm) var(--space-md);
    }

    .post-actions {
        padding: var(--space-xs) var(--space-sm);
    }

    .post-action {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-xs);
    }

    .post-action span {
        display: none;
    }

    .compose-footer {
        flex-wrap: wrap;
    }
}
