/* Tâm sự dev styles */
.tamsu-header {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tamsu-title {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.tamsu-description {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 0;
}

.btn-new-post {
    background: linear-gradient(135deg, var(--primary-color), #1565c0);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-new-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

/* Filters */
.tamsu-filters {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 16px;
    border-radius: 20px;
    color: #6c757d;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-right: 40px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Posts */
.tamsu-posts {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.post-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 15px;
}

.post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background-color: #f8f9fa;
}

.post-avatar {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1565c0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.post-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.post-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.post-title-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    cursor: pointer;
}

.post-title-link:hover {
    color: #0d47a1;
    text-decoration: none;
}

.post-meta {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    align-items: center;
}

.post-author {
    font-weight: 500;
    color: #495057;
}

.post-time {
    color: #6c757d;
}

/* Post Stats */
.post-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 100px;
    text-align: left;
}

.stat-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    min-width: 100px;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

.stat-number {
    font-weight: bold;
    color: #495057;
    text-align: right;
    min-width: 40px;
}

/* Last Reply */
.last-reply {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 180px;
    padding-left: 15px;
    border-left: 1px solid #f0f0f0;
}

.last-reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.last-reply-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.last-reply-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.last-reply-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-reply-time {
    font-size: 11px;
    color: #6c757d;
    line-height: 1.2;
}

/* User Info Popover */
.user-info-popover {
    width: 350px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #dee2e6;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1565c0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto;
}

.user-name-large {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.user-display-name {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.user-type {
    margin-bottom: 8px;
}

.user-type .badge {
    font-size: 12px;
}

.user-join-date {
    font-size: 12px;
    color: #6c757d;
}

.user-stats {
    margin-top: 10px;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
}



/* Modal */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color), #1565c0);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-title {
    font-weight: 600;
}

/* CKEditor container */
#postEditor {
    min-height: 300px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .tamsu-header .row {
        text-align: center;
    }

    .tamsu-header .col-md-4 {
        margin-top: 15px;
    }

    .filter-tabs {
        justify-content: center;
        margin-bottom: 15px;
    }

    .tamsu-filters .col-md-6:last-child {
        margin-top: 15px;
    }

    .post-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    .post-avatar {
        margin: 0 auto;
    }

    .post-content {
        order: 2;
    }

    .post-stats {
        order: 3;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        margin: 10px 0;
    }

    .last-reply {
        order: 4;
        border-left: none;
        border-top: 1px solid #f0f0f0;
        padding-left: 0;
        padding-top: 10px;
        justify-content: center;
        min-width: auto;
    }

    .post-meta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .user-info-popover {
        width: 300px;
    }
}

/* Animation for popover */
.user-info-popover {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}