.message-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    text-align: left;
}

.publish-message-btn {
    padding: 10px 20px;
    background: #3989e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    margin-left: 20px;
}

.publish-message-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.message-type-tabs {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.1);
}

.type-tab {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.type-tab:hover, .type-tab.active {
    background: #3989e5;
    
    color: #ffffff;
    transform: translateY(-2px);
}

.message-form-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.message-form-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: -5px;
}

.avatar-selection {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.avatar-selection::-webkit-scrollbar {
    width: 8px;
}

.avatar-selection::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.avatar-selection::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.avatar-selection::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.avatar-option {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    border-radius: 50%;
    padding: 3px;
}

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

.avatar-option.selected {
    border-color: #4a90e2;
    transform: scale(1.05);
}

.avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-check {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #4a90e2;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.avatar-option.selected .avatar-check {
    display: flex;
}

.submit-btn {
    padding: 10px 20px;
    background: #3989e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.message-list-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.message-list-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
}

.message-list {
    display: flex;
    flex-direction: column;
    
    gap: 20px;
}

.message-item {
    background: #f9f9f9;
    border-radius: 8px;
     
    padding: 0 10px;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 15px;
    cursor: pointer;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.message-main-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
    width: 100%;
    min-height: 100px;
    padding: 10px 0;
}

.message-item .message-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    flex-shrink: 0;
}

.message-item .message-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-start;
}

.message-item .message-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.message-actions .message-time {
    margin-left: 10px;
}

.message-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.message-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
}

.message-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
    flex-shrink: 0;
}

.message-nickname {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.message-time {
    font-size: 12px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.message-time i {
    font-size: 11px;
    color: #bbb;
}

.message-content {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    flex: 1;
    word-wrap: break-word;
    text-align: left;
}

.content-label {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    line-height: 1.4;
    white-space: nowrap;
}

.content-text {
    color: #555;
    line-height: 1.6;
    flex: 1;
}

.comment-btn {
    padding: 6px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.comment-btn:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.comment-count {
    font-size: 12px;
    color: #999;
}

.comment-form-container {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.comment-form-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-nickname,
.comment-content {
    width: 100%;
    padding: 12px 15px;
    border: 0.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

.comment-nickname:focus,
.comment-content:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.comment-content {
    min-height: 100px;
    resize: vertical;
}

.comment-submit-btn {
    padding: 10px 20px;
    background: #3989e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.comment-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.comments-list {
    margin-top: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    display: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.comments-list-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.no-comments {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.comment-content {
    margin-top: 6px;
}

.comment-content-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.comment-content-text {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    padding-left: 6px;
    border-left: 2px solid #e0e0e0;
}

.comment-item {
    padding: 10px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.comment-item:last-child {
    margin-bottom: 0;
}

.comment-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #4a90e2;
}



.comment-info {
    width: 100%;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 0.4px solid #f0f0f0;
}

.comment-nickname {
    width: 25%;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.comment-time {
    width: 75%;
    font-size: 12px;
    color: #999;
    font-weight: 400;
    text-align: left;
}

.comment-content {
    font-size: 14px;
    color: #34495e;
    line-height: 1.7;
    word-wrap: break-word;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    
}

.no-messages {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

@media (max-width: 768px) {
    .message-container {
        padding: 10px;
    }
    
    .message-type-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .type-tab {
        text-align: center;
    }
    
    .message-form-container,
    .message-list-container {
        padding: 20px;
    }
    
    .avatar-selection {
        justify-content: center;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-item {
        padding: 15px;
    }
    
    .message-main-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .message-header {
        align-self: flex-start;
    }
    
    .message-content {
        text-align: left;
    }
    
    .content-label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .content-text {
        font-size: 15px;
    }
    
    .message-actions {
        align-self: flex-start;
        justify-content: flex-start;
    }
    
    /* 响应式评论布局 */
    .comment-header {
        gap: 15px;
    }
    
    .comment-nickname {
        width: 50%;
    }
    
    .comment-time {
        width: 50%;
    }
}
