/* Home Page Styles - Modernized with Avatars */

/* Avatar Styles */
.thought-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.user-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.anon-avatar {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: #888;
    font-size: 1.5rem;
}

.avatar-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Author Name Styling */
.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary) !important;
}

.anon-name {
    font-size: 1rem;
    color: var(--text-muted);
}

.thought-timestamp {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.mood-emoji {
    font-size: 1.3rem;
    display: inline-block;
    animation: fadeIn 0.3s ease;
}

/* Online Counter */
.online-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.online-counter i {
    color: #4CAF50;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.online-counter strong {
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Mood Buttons - Enhanced */
.mood-btn {
    font-size: 1.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mood-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mood-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
}

.mood-btn:hover::before {
    opacity: 1;
}

.mood-btn.active {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.mood-btn.active::before {
    opacity: 1;
}

/* Button Styles - Enhanced */
.btn-slim {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-slim:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-slim.active {
    background: linear-gradient(135deg, var(--accent-color) 0%, #666 100%);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Like Button States - Enhanced */
.like-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.like-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.like-btn:active::before {
    width: 300px;
    height: 300px;
}

.like-btn.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-color: #dc3545;
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.3);
}

.like-btn.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    border-color: #bd2130;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
    transform: translateY(-2px);
}

.like-btn.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Thought Card - Enhanced */
.thought-card {
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.thought-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: left 0.5s;
}

.thought-card:hover::before {
    left: 100%;
}

.thought-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

/* Error Styling - Enhanced */
.text-danger {
    color: #ff6b6b !important;
}

.is-invalid {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25);
}

.invalid-feedback {
    display: block;
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 68, 68, 0.2) 100%);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.2);
}

/* Post Form - Enhanced */
.post-form-compact {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.post-form-compact::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #555, #333, #555);
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.post-form-compact:focus-within::before {
    opacity: 1;
}

.post-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.char-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

/* CAPTCHA Container - Enhanced */
.captcha-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.captcha-container img {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Reply Form - Enhanced */
.reply-form {
    padding: 1rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent-color);
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 8px 8px 0;
    animation: slideIn 0.3s ease;
}

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

.comment .reply {
    padding-left: 2rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.75rem;
    position: relative;
}

.comment .reply::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), transparent);
}

/* Filter Bar - Enhanced */
.filter-bar {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.filter-bar .btn-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

/* Comment Avatar Styles */
.comment-avatar {
    flex-shrink: 0;
}

.avatar-circle-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--border-color);
}

.avatar-circle-tiny {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .mood-btn {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }
    
    .post-form-compact {
        padding: 1rem;
    }
    
    .filter-bar {
        padding: 0.75rem 1rem;
    }
    
    .avatar-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
