/* Post Cards */
.post-card {
    background: var(--surface-elevated);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: var(--space-md);
    transition: all var(--transition-fast);
    animation: fadeInUp 0.4s ease backwards;
}

.post-card:active {
    transform: scale(0.995);
}

/* Staggered animation for posts */
.post-card:nth-child(1) { animation-delay: 0s; }
.post-card:nth-child(2) { animation-delay: 0.05s; }
.post-card:nth-child(3) { animation-delay: 0.1s; }
.post-card:nth-child(4) { animation-delay: 0.15s; }
.post-card:nth-child(5) { animation-delay: 0.2s; }

/* Circle attribution row */
.post-circle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--heat-color);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.post-circle-row:hover {
    opacity: 0.8;
}

.post-circle-row svg {
    flex-shrink: 0;
}

.post-circle-name {
    font-weight: 600;
    color: var(--heat-color);
}

.post-circle-members {
    color: var(--text-muted);
    font-weight: 400;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    overflow: hidden;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

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

/* Spark donate button in header - dark olive circle with gold icon */
.spark-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #3A3729;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.spark-btn:hover {
    background: #4A4639;
    transform: scale(1.05);
}

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

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

/* Post menu button */
.post-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--surface-elevated);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.post-menu-btn i {
    width: 16px;
    height: 16px;
}

.post-author-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-color);
}

.post-time {
    font-size: 10px;
    color: var(--text-muted);
}

.post-content {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
    white-space: pre-wrap;
    color: #E4E4E7;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.post-tags:empty {
    display: none;
}

/* Actions Row */
.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    color: #71717A;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.action-btn:hover {
    color: var(--text-color);
}

.action-btn.active {
    color: var(--primary-color);
}

.action-btn i {
    width: 18px;
    height: 18px;
}

.action-btn svg {
    flex-shrink: 0;
}

.action-btn span:empty {
    display: none;
}

/* Heat action - coral color */
.action-heat {
    color: #FF6B6B;
}

.action-heat:hover {
    color: #FF8B8B;
}

/* Views - non-clickable, muted */
.action-views {
    cursor: default;
}

.action-views:hover {
    color: #71717A;
}

/* Spacer to push share/bookmark to right */
.actions-spacer {
    flex: 1;
}

/* Legacy heat-count class (keeping for compatibility) */
.heat-count {
    display: none;
}

/* Donate button - prominent yellow per design */
.donate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    background: #FBBF24;
    color: #0D0D0F;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.donate-btn:hover {
    background: #F59E0B;
    transform: translateY(-1px);
}

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

/* Compact donate button (for header if needed) */
.donate-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--spark-soft);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.donate-btn-sm:hover {
    background: rgba(251, 191, 36, 0.2);
    transform: scale(1.05);
}

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

.donate-btn-sm svg {
    flex-shrink: 0;
}

/* Legacy reactions (keeping for compatibility) */
.post-reactions {
    display: none;
}

.reaction-btn {
    display: none;
}

/* Comment button */
.comment-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 12px;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.comment-btn:hover {
    color: var(--primary-color);
}

.comment-btn.active {
    color: var(--primary-color);
}

.comment-btn i {
    width: 16px;
    height: 16px;
}

/* Comments */
.comment {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 6px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    color: white;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

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

.comment-author {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-color);
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-content {
    font-size: 14px;
    line-height: 1.4;
    margin-left: 36px;
    color: var(--text-color);
}

.comment-reply {
    margin-left: 36px;
    padding-left: var(--space-md);
    border-left: 2px solid var(--primary-color);
    margin-top: var(--space-sm);
}

.reply-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    margin-left: 36px;
    margin-top: var(--space-xs);
    transition: color var(--transition-fast);
}

.reply-btn:hover {
    color: var(--primary-color);
}

/* Mention dropdown */
.mention-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    margin-bottom: 4px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
}

.mention-dropdown.visible {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mention-item:hover,
.mention-item.selected {
    background: var(--surface-elevated);
}

.mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mention-name {
    font-weight: 500;
    font-size: 14px;
}

.mention-username {
    font-size: 12px;
    color: var(--text-muted);
}

/* Highlighted mentions in posts */
.mention-link {
    color: var(--primary-color);
    cursor: pointer;
}

/* Hashtags */
.hashtag-link {
    color: var(--primary-color);
    cursor: pointer;
}

.hashtag-link:hover {
    text-decoration: underline;
}

/* Post Composer */
.post-composer {
    background: var(--surface-color);
    border: none;
    border-radius: 0;
    padding: 0;
}


.post-composer textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-elevated);
    color: var(--text-color);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.5;
    margin-bottom: 12px;
    transition: border-color var(--transition-fast);
}

.post-composer textarea:focus {
    border-color: var(--primary-color);
}

.post-composer textarea::placeholder {
    color: var(--text-muted);
}

.post-composer-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.post-composer-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-composer-textarea {
    width: 100%;
    min-height: 100px;
    padding: var(--space-md);
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
}

.post-composer-textarea::placeholder {
    color: var(--text-muted);
}

.post-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--surface-elevated);
    border-top: 1px solid var(--border-color);
}

.post-composer-actions {
    display: flex;
    gap: var(--space-sm);
}

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

.composer-action-btn:hover {
    background: var(--surface-color);
    color: var(--primary-color);
}

.post-composer-submit {
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.post-composer-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.post-composer-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.post-composer .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Composer Toolbar */
.composer-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.composer-toolbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.composer-toolbar-btn:hover {
    background: var(--surface-elevated);
    color: var(--primary-color);
}

.composer-toolbar-btn.active {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.composer-toolbar-btn i {
    width: 20px;
    height: 20px;
}

.composer-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.composer-char-count {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* Tags Panel */
.tags-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tag.selected,
.tag-chip.selected {
    background: var(--primary-soft);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Tag Chips (profile interests) */
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tag-chip:hover {
    border-color: var(--primary-color);
    background: var(--surface-color);
}

.tag-chip.selected {
    background: var(--primary-soft);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.tag-chip i {
    width: 16px;
    height: 16px;
}

/* Recording Indicator */
.recording-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.recording-dot {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: recording-pulse 1.5s infinite;
}

@keyframes recording-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

.recording-timer {
    font-family: monospace;
    font-size: 14px;
    color: var(--text-color);
}

.recording-stop-btn {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: #ef4444;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Voice Preview */
.voice-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.voice-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-preview-info {
    flex: 1;
}

.voice-preview-duration {
    font-size: 12px;
    color: var(--text-muted);
    font-family: monospace;
}

.voice-preview-actions {
    display: flex;
    gap: 8px;
}

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

.voice-preview-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.voice-preview-delete:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Visibility Dropdown */
.visibility-dropdown {
    position: relative;
    margin-bottom: 12px;
}

.visibility-trigger,
.visibility-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.visibility-trigger:hover,
.visibility-btn:hover {
    border-color: var(--primary-color);
}

.visibility-trigger i:first-child,
.visibility-btn i:first-child {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.visibility-label {
    flex: 1;
}

.visibility-menu,
.visibility-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.visibility-menu.visible,
.visibility-options.visible {
    display: block;
    animation: fadeInUp 0.2s ease;
}

.visibility-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--border-color);
}

.visibility-option:last-child {
    border-bottom: none;
}

.visibility-option:hover {
    background: var(--surface-elevated);
}

.visibility-option.active {
    background: var(--primary-soft);
}

.visibility-option i {
    color: var(--text-secondary);
}

.visibility-option.active i {
    color: var(--primary-color);
}

.visibility-option i {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.visibility-option-text {
    flex: 1;
}

.visibility-option-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.visibility-option-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Post Donate Modal Styles */
.donate-hint-text {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

.spark-preset-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.spark-preset-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    background: var(--spark-soft);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--spark-color);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.spark-preset-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: var(--spark-color);
}

.spark-preset-btn.selected {
    background: var(--spark-color);
    color: #0D0D0F;
    border-color: var(--spark-color);
}

.spark-preset-btn.selected svg {
    fill: #0D0D0F;
}

.spark-custom-input {
    display: flex;
    gap: 8px;
}

.spark-amount-input {
    flex: 1;
    padding: 14px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

.spark-amount-input:focus {
    outline: none;
    border-color: var(--spark-color);
}

.spark-amount-input::placeholder {
    color: var(--text-muted);
}

.spark-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--spark-color);
    border: none;
    border-radius: 12px;
    color: #0D0D0F;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.spark-send-btn:hover {
    background: #F59E0B;
    transform: scale(1.02);
}

.spark-send-btn:active {
    transform: scale(0.98);
}

/* Post Modal - Larger */
.modal-post {
    max-width: 480px;
    width: 95%;
}

/* Post Panels */
.post-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.panel-header i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Challenge List in Post */
.challenge-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

.challenge-list::-webkit-scrollbar {
    width: 4px;
}

.challenge-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.challenge-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 12px;
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.challenge-item:hover {
    border-color: var(--primary-color);
}

.challenge-item.selected {
    background: var(--primary-soft);
    border-color: var(--primary-color);
}

.challenge-item-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.challenge-item-info {
    flex: 1;
    min-width: 0;
}

.challenge-item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.challenge-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.challenge-item-prize {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #FBBF24;
    flex-shrink: 0;
}

.challenge-item-check {
    display: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.challenge-item.selected .challenge-item-check {
    display: flex;
}

.challenge-item.selected .challenge-item-prize {
    display: none;
}

/* Toolbar button with selection indicator */
.composer-toolbar-btn.has-selection {
    color: var(--primary-color);
    background: var(--primary-soft);
}

/* Post Options Row */
.post-options-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.post-options-row .visibility-dropdown {
    flex: 1;
    margin: 0;
}

.post-options-row .circle-post-selector {
    flex: 1;
}
