/* Feed Page Specific Styles */
.feed-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 16px 24px;
    min-height: calc(100vh - 200px);
}

.feed-header {
    text-align: center;
    margin-bottom: 32px;
    padding-top: 20px;
}

.feed-header h1 {
    font-size: 1.6em;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    font-weight: 700;
}

.feed-header p {
    font-size: 0.9em;
    color: var(--text-light);
}

.feed-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.feed-filters .domain-tab:nth-child(4),
.feed-filters .domain-tab:nth-child(5) {
    /* Remove grid-specific styling */
}

.feed-filters .domain-tab:nth-child(4) {
    /* Remove grid-specific styling */
}

.domain-tab {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 36px;
    white-space: nowrap;
}

.domain-tab i {
    font-size: 14px;
}

.domain-tab span {
    font-size: 13px;
    font-weight: 600;
}

.domain-tab.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.domain-tab:hover:not(.active) {
    background: #f3f4f6;
    color: #6366f1;
    transform: translateY(-1px);
}

.recordings-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recording-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.recording-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #6366f1;
}

.recording-card.playing {
    border-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 18px;
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #e5e7eb;
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: #6366f1;
}

.user-info {
    flex: 1;
}

.user-info .name {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
    cursor: pointer;
    transition: color 0.3s;
}

.user-info .name:hover {
    color: #6366f1;
}

.user-info .timestamp {
    font-size: 13px;
    color: #9ca3af;
}

.domain-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-badge.self-love {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
}

.domain-badge.addiction {
    background: linear-gradient(135deg, #fecaca 0%, #f87171 100%);
    color: #7f1d1d;
}

.domain-badge.negativity {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    color: #78350f;
}

.domain-badge.mindfulness {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #5b21b6;
}

.domain-badge.relationship {
    background: linear-gradient(135deg, #fecdd3 0%, #fda4af 100%);
    color: #9f1239;
}

.domain-badge.motivation {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #9a3412;
}

.domain-badge.laziness {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
    color: #3730a3;
}

.domain-badge.family-love {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

/* Legacy domain badges (keep for backward compatibility) */
.domain-badge.kindness {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
}

.domain-badge.gratitude {
    background: linear-gradient(135deg, #d9f99d 0%, #bef264 100%);
    color: #3f6212;
}

.domain-badge.growth {
    background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
    color: #3730a3;
}

.domain-badge.health {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    color: #78350f;
}

/* Audio Player */
.audio-player {
    margin-bottom: 16px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.play-btn:active {
    transform: scale(0.98);
}

.progress-container {
    flex: 1;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* Card Actions */
.card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background: #f9fafb;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
    min-width: auto;
}

.action-btn:hover {
    background: #f3f4f6;
    color: #6366f1;
    transform: translateY(-2px);
}

.action-btn.active,
.action-btn.like-btn.active {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #dc2626;
}

.action-btn.like-btn.active i {
    color: #dc2626;
}

.action-btn .like-count,
.action-btn .comment-count,
.action-btn .share-count {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.action-btn i.liked {
    color: #ef4444 !important;
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Follow Status Button */
.follow-status-btn {
    min-width: auto;
}

.follow-status-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    transform: translateY(-2px);
}

.follow-status-btn.connected {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    cursor: default;
}

.follow-status-btn.connected span {
    display: none;
}

.follow-status-btn.connected:hover {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    transform: none;
}

.follow-status-btn.pending {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
    cursor: default;
}

.follow-status-btn.pending span {
    display: none;
}

.follow-status-btn.pending:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    transform: none;
}

/* Follow Modal */
#followModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

#followModal .modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease-out;
}

#followModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Avatar Follow Button */
.user-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar-follow-btn {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    z-index: 10;
}

.avatar-follow-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

.avatar-follow-btn:active {
    transform: scale(0.95);
}

.follow-btn {
    padding: 10px 20px;
    border: 2px solid #6366f1;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    transition: all 0.3s;
    white-space: nowrap;
}

.follow-btn:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
}

.follow-btn.following {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Comments Section */
.comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
    background: #f9fafb;
    padding: 12px 14px;
    border-radius: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-header strong {
    font-size: 14px;
    color: #1f2937;
}

.comment-time {
    font-size: 12px;
    color: #9ca3af;
}

.comment-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.comment-input-container {
    background: #f9fafb;
    padding: 14px;
    border-radius: 12px;
}

.comment-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.comment-type-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
}

.comment-type-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.text-comment-input {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.comment-textarea {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    min-height: 60px;
    transition: all 0.3s;
}

.comment-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.login-to-comment {
    text-align: center;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
}

.login-to-comment a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: underline;
}

/* Voice Comment Modal */
.voice-comment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.voice-comment-modal.active {
    display: flex;
}

.voice-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.voice-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.voice-modal-header h3 {
    font-size: 22px;
    color: #1f2937;
    margin-bottom: 8px;
}

.voice-modal-header p {
    font-size: 14px;
    color: #6b7280;
}

.voice-recording-controls {
    text-align: center;
    padding: 30px;
}

.voice-record-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    margin: 0 auto;
}

.voice-record-btn:hover {
    transform: scale(1.05);
}

.voice-record-btn.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.voice-timer {
    font-size: 24px;
    font-weight: 600;
    color: #6366f1;
    margin-top: 16px;
}

.voice-waveform {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 40px;
    margin: 20px 0;
}

.voice-waveform span {
    width: 4px;
    background: #6366f1;
    border-radius: 2px;
    animation: wave 1s infinite ease-in-out;
}

.voice-waveform span:nth-child(1) { animation-delay: 0s; }
.voice-waveform span:nth-child(2) { animation-delay: 0.1s; }
.voice-waveform span:nth-child(3) { animation-delay: 0.2s; }
.voice-waveform span:nth-child(4) { animation-delay: 0.3s; }
.voice-waveform span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 10px; }
    50% { height: 30px; }
}

.voice-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.voice-modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.voice-modal-actions .btn-cancel {
    background: #f3f4f6;
    color: #6b7280;
}

.voice-modal-actions .btn-cancel:hover {
    background: #e5e7eb;
}

.voice-modal-actions .btn-submit {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.voice-modal-actions .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.voice-modal-actions .btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .feed-container {
        padding: 40px 12px 20px;
    }
    
    .feed-header h1 {
        font-size: 1.6em;
    }
    
    .feed-filters {
        gap: 4px;
        padding: 6px;
    }
    
    .feed-filters .domain-tab:nth-child(1) {
        /* Flex layout - no special styling needed */
    }
    
    .feed-filters .domain-tab:nth-child(4),
    .feed-filters .domain-tab:nth-child(5) {
        /* Flex layout - no special styling needed */
    }
    
    .domain-tab {
        padding: 4px 8px;
        min-height: 28px;
        gap: 3px;
        font-size: 10px;
    }
    
    .domain-tab i {
        font-size: 11px;
    }
    
    .domain-tab span {
        font-size: 9px;
    }
    
    .recordings-grid {
        gap: 16px;
    }
    
    .recording-card {
        padding: 16px;
    }
    
    .card-actions {
        gap: 8px;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .follow-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}
